Luna/libc/include/unistd.h
apio 8fa72f3cf0
All checks were successful
continuous-integration/drone/push Build is passing
kernel+libc: Implement read()
2023-03-11 18:02:50 +01:00

44 lines
837 B
C

/* unistd.h: POSIX constants and functions. */
#ifndef _UNISTD_H
#define _UNISTD_H
#define __need_NULL
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
pid_t fork();
pid_t getpid();
int execv(const char*, char* const*);
int execve(const char*, char* const*, char* const*);
int execvp(const char*, char* const*);
/* Calls the operating system kernel for a specific service. */
long syscall(long num, ...);
/* Sleeps for X microseconds. */
int usleep(useconds_t us);
/* Sleeps for X seconds. */
unsigned long sleep(unsigned long seconds);
/* Closes a file descriptor. */
int close(int fd);
/* Reads bytes from a file descriptor. */
ssize_t read(int fd, void* buf, size_t size);
#ifdef __cplusplus
}
#endif
#endif