summaryrefslogtreecommitdiff
path: root/src/unistd/write.c
blob: 584eda9f5647d0f31bcc848333705edfcc5d6ee7 (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)
*/