summaryrefslogtreecommitdiff
path: root/src/unistd/write.c
blob: 6982a359f00f76aea7ca7364ea5204ff6fcbfb6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
#include "nonstd/assert.h"
#include "../_syscall.h"

ssize_t write(int fildes, const void *buf, size_t nbyte)
{
	if (nbyte != 0) {
		ASSERT_NONNULL(buf);
	}
	SYSCALL(write, ssize_t, -1, fildes, buf, nbyte, 0, 0, 0);
}
/*
POSIX(1)
*/