63 #ifndef __INCLUDE_UNISTD_H 64 #define __INCLUDE_UNISTD_H 70 #include <sys/types.h> 71 #include <tinyara/compiler.h> 93 #undef _POSIX_SAVED_IDS 94 #undef _POSIX_JOB_CONTROL 95 #define _POSIX_REALTIME_SIGNALS 1 96 #define _POSIX_MESSAGE_PASSING 1 97 #undef _POSIX_MAPPED_FILES 98 #undef _POSIX_SHARED_MEMORY_OBJECTS 99 #define _POSIX_PRIORITY_SCHEDULING 1 100 #define _POSIX_TIMERS 1 101 #undef _POSIX_MEMLOCK 102 #undef _POSIX_MEMLOCK_RANGE 104 #define _POSIX_SYNCHRONIZED_IO 1 105 #undef _POSIX_ASYNCHRONOUS_IO 106 #undef _POSIX_PRIORITIZED_IO 110 #undef _POSIX_CHOWN_RESTRICTED 111 #undef _POSIX_NO_TRUNC 112 #undef _POSIX_VDISABLE 114 #define _POSIX_SYNC_IO 1 115 #undef _POSIX_ASYNC_IO 116 #undef _POSIX_PRIO_IO 118 #define fdatasync(f) fsync(f) 125 #if defined(__cplusplus) 126 #define EXTERN extern "C" 129 #define EXTERN extern 142 #define optarg (*(getoptargp())) 143 #define optind (*(getoptindp())) 144 #define optopt (*(getoptoptp())) 206 void _exit(
int status) noreturn_function;
217 unsigned int sleep(
unsigned int seconds);
229 int usleep(useconds_t usec);
268 int dup2(
int fd1,
int fd2);
284 off_t
lseek(
int fd, off_t offset,
int whence);
292 ssize_t
read(
int fd, FAR
void *buf,
size_t nbytes);
300 ssize_t
write(
int fd, FAR
const void *buf,
size_t nbytes);
308 ssize_t
pread(
int fd, FAR
void *buf,
size_t nbytes, off_t offset);
316 ssize_t
pwrite(
int fd, FAR
const void *buf,
size_t nbytes, off_t offset);
323 #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_MM_PGALLOC) && \ 324 defined(CONFIG_ARCH_USE_MMU) 329 FAR
void *sbrk(intptr_t incr);
356 int chdir(FAR
const char *path);
364 FAR
char *
getcwd(FAR
char *buf,
size_t size);
374 int access(FAR
const char *path,
int amode);
383 int rmdir(FAR
const char *pathname);
392 int unlink(FAR
const char *pathname);
396 #ifdef CONFIG_LIBC_EXECFUNCS 402 int execl(FAR
const char *path, ...);
403 int execv(FAR
const char *path, FAR
char *
const argv[]);
414 void swab(FAR
const void *src, FAR
void *dest, ssize_t nbytes);
427 int getopt(
int argc, FAR
char *
const argv[], FAR
const char *optstring);
438 FAR
char **getoptargp(
void);
439 int *getoptindp(
void);
440 int *getoptoptp(
void);
445 #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
int pause(void)
suspend the thread until a signal is received