13 #define MQ_PRIO_MAX _MQ_PRIO_MAX
15 #define STDIN_FILENO 0
16 #define STDOUT_FILENO 1
17 #define STDERR_FILENO 2
26 unsigned int sleep(
unsigned int seconds);
34 int usleep(useconds_t usec);
61 int dup2(
int oldfd,
int newfd);
71 ssize_t
read(
int fd,
void *buf,
size_t count);
81 ssize_t
write(
int fd,
const void *buf,
size_t count);
91 off_t
lseek(
int fd,
long offset,
int whence);
108 char *
getcwd(
char *buf,
size_t size);
115 int chdir(
const char *path);
int chdir(const char *path)
Change working directory.
Definition: file.c:100
int dup2(int oldfd, int newfd)
Perform the same task as dup(), but use the file descriptor number specified by newfd.
Definition: file.c:35
int dup(int oldfd)
Create a copy of the file descriptor oldfd, using the lowest-numbered unused file descriptor for the ...
Definition: file.c:30
char * getcwd(char *buf, size_t size)
Get current working directory.
Definition: file.c:95
unsigned int sleep(unsigned int seconds)
To cause the calling thread to sleep either until the number of real-time seconds specified in second...
Definition: sched.c:40
off_t lseek(int fd, long offset, int whence)
Reposition the file offset of the open file description associated with the file descriptor fd.
Definition: file.c:70
int getpid(void)
Return the ID of the calling task.
int close(int fd)
Close a file descriptor, so that it no longer refers to any file and may be reused.
Definition: file.c:25
ssize_t write(int fd, const void *buf, size_t count)
Write up to count bytes from the buffer starting at buf to the file referred to by the file descripto...
Definition: file.c:55
int usleep(useconds_t usec)
Suspend execution of the calling thread for a given time in microseconds.
Definition: sched.c:46
ssize_t read(int fd, void *buf, size_t count)
Attempt to read up to count bytes from file descriptor fd into the buffer starting at buf.
Definition: file.c:45