63 #ifndef __INCLUDE_UNISTD_H 64 #define __INCLUDE_UNISTD_H 70 #include <sys/types.h> 71 #include <tinyara/compiler.h> 99 #undef _POSIX_SAVED_IDS 100 #undef _POSIX_JOB_CONTROL 101 #define _POSIX_REALTIME_SIGNALS 1 102 #define _POSIX_MESSAGE_PASSING 1 103 #undef _POSIX_MAPPED_FILES 104 #undef _POSIX_SHARED_MEMORY_OBJECTS 105 #define _POSIX_PRIORITY_SCHEDULING 1 106 #define _POSIX_TIMERS 1 107 #undef _POSIX_MEMLOCK 108 #undef _POSIX_MEMLOCK_RANGE 110 #define _POSIX_SYNCHRONIZED_IO 1 111 #undef _POSIX_ASYNCHRONOUS_IO 112 #undef _POSIX_PRIORITIZED_IO 116 #undef _POSIX_CHOWN_RESTRICTED 117 #undef _POSIX_NO_TRUNC 118 #undef _POSIX_VDISABLE 120 #define _POSIX_SYNC_IO 1 121 #undef _POSIX_ASYNC_IO 122 #undef _POSIX_PRIO_IO 124 #define fdatasync(f) fsync(f) 131 #if defined(__cplusplus) 132 #define EXTERN extern "C" 135 #define EXTERN extern 148 #define optarg (*(getoptargp())) 149 #define optind (*(getoptindp())) 150 #define optopt (*(getoptoptp())) 207 void _exit(
int status) noreturn_function;
218 unsigned int sleep(
unsigned int seconds);
230 int usleep(useconds_t usec);
269 int dup2(
int fd1,
int fd2);
285 off_t
lseek(
int fd, off_t offset,
int whence);
293 ssize_t
read(
int fd, FAR
void *buf,
size_t nbytes);
301 ssize_t
write(
int fd, FAR
const void *buf,
size_t nbytes);
309 ssize_t
pread(
int fd, FAR
void *buf,
size_t nbytes, off_t offset);
317 ssize_t
pwrite(
int fd, FAR
const void *buf,
size_t nbytes, off_t offset);
324 #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_MM_PGALLOC) && \ 325 defined(CONFIG_ARCH_USE_MMU) 330 FAR
void *sbrk(intptr_t incr);
357 int chdir(FAR
const char *path);
365 FAR
char *
getcwd(FAR
char *buf,
size_t size);
375 int access(FAR
const char *path,
int amode);
384 int rmdir(FAR
const char *pathname);
393 int unlink(FAR
const char *pathname);
397 #ifdef CONFIG_LIBC_EXECFUNCS 403 int execl(FAR
const char *path, ...);
404 int execv(FAR
const char *path, FAR
char *
const argv[]);
418 int getopt(
int argc, FAR
char *
const argv[], FAR
const char *optstring);
429 FAR
char **getoptargp(
void);
430 int *getoptindp(
void);
431 int *getoptoptp(
void);
436 #if defined(__cplusplus) unsigned int sleep(unsigned int seconds)
suspend execution for an interval of time
int dup(int fd)
duplicate an open file descriptor
int pipe(int fd[2])
create an interprocess channel
ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset)
read from a file
pid_t getpid(void)
get the process ID
int usleep(useconds_t usec)
suspend execution for microsecond intervals
ssize_t write(int fd, FAR const void *buf, size_t nbytes)
write to another user
int unlink(FAR const char *pathname)
call the unlink function
ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset)
write on a file
int rmdir(FAR const char *pathname)
remove a directory
int close(int fd)
close a file descriptor
off_t lseek(int fd, off_t offset, int whence)
move the read/write file offset
FAR char * getcwd(FAR char *buf, size_t size)
get the pathname of the current working directory
int chdir(FAR const char *path)
change working directory
ssize_t read(int fd, FAR void *buf, size_t nbytes)
read from a file
int getopt(int argc, FAR char *const argv[], FAR const char *optstring)
command option parsing
int fsync(int fd)
synchronize changes to a file
int dup2(int fd1, int fd2)
duplicate an open file descriptor
int access(FAR const char *path, int amode)
determine accessibility of a file descriptor
pid_t vfork(void)
The vfork() function has the same effect as fork(), except that the behavior is undefined if the proc...
int pause(void)
suspend the thread until a signal is received