Vhex-kernel/include/lib/unistd.h

35 lines
779 B
C
Raw Normal View History

2019-12-29 16:39:30 +01:00
#ifndef __LIB_UNISTD_H__
# define __LIB_UNISTD_H__
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
2019-12-29 16:39:30 +01:00
// TODO: move me
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
2019-12-29 16:39:30 +01:00
//TODO: move me
#define _SC_PAGE_SIZE 0
#define _SC_PAGESIZE _SC_PAGE_SIZE
// Process part
extern pid_t getpid(void);
extern pid_t getpgid(void);
extern pid_t getppid(void);
extern int setpgid(pid_t pid, pid_t pgid);
extern pid_t fexecve(const char *pathname, char **argv, char **envp);
// File part
extern ssize_t write(int fd, const void *buf, size_t count);
extern ssize_t read(int fd, void *buf, size_t count);
extern off_t lseek(int fd, off_t offset, int whence);
extern int close(int fd);
// System part
extern long sysconf(int name);
2019-12-29 16:39:30 +01:00
#endif /*__LIB_UNISTD_H__*/