TizenRT Libs&Environment  v2.0 M2

Provides APIs for Standard Symbolic Constants and Types. More...

Collaboration diagram for UNISTD:

Files

file  unistd.h
 POSIX operating system APIs.
 

Macros

#define SEEK_SET   0 /* From the start of the file */
 
#define SEEK_CUR   1 /* From the current file offset */
 
#define SEEK_END   2 /* From the end of the file */
 
#define F_OK   0 /* Test existence */
 
#define R_OK   1 /* Test read permission */
 
#define W_OK   2 /* Test write permission */
 
#define X_OK   4 /* Test execute permission */
 
#define POSIX_VERSION
 
#define _POSIX_REALTIME_SIGNALS   1
 
#define _POSIX_MESSAGE_PASSING   1
 
#define _POSIX_PRIORITY_SCHEDULING   1
 
#define _POSIX_TIMERS   1
 
#define _POSIX_SYNCHRONIZED_IO   1
 
#define _POSIX_SYNC_IO   1
 
#define fdatasync(f)   fsync(f)
 
#define EXTERN   extern
 

Functions

pid_t getpid (void)
 get the process ID More...
 
unsigned int sleep (unsigned int seconds)
 suspend execution for an interval of time More...
 
int usleep (useconds_t usec)
 suspend execution for microsecond intervals More...
 
int pause (void)
 suspend the thread until a signal is received More...
 
int close (int fd)
 close a file descriptor More...
 
int dup (int fd)
 duplicate an open file descriptor More...
 
int dup2 (int fd1, int fd2)
 duplicate an open file descriptor More...
 
int fsync (int fd)
 synchronize changes to a file More...
 
off_t lseek (int fd, off_t offset, int whence)
 move the read/write file offset More...
 
ssize_t read (int fd, FAR void *buf, size_t nbytes)
 read from a file More...
 
ssize_t write (int fd, FAR const void *buf, size_t nbytes)
 write to another user More...
 
ssize_t pread (int fd, FAR void *buf, size_t nbytes, off_t offset)
 read from a file More...
 
ssize_t pwrite (int fd, FAR const void *buf, size_t nbytes, off_t offset)
 write on a file More...
 
int pipe (int fd[2])
 create an interprocess channel More...
 
int chdir (FAR const char *path)
 change working directory More...
 
FAR char * getcwd (FAR char *buf, size_t size)
 get the pathname of the current working directory More...
 
int rmdir (FAR const char *pathname)
 remove a directory More...
 
int unlink (FAR const char *pathname)
 call the unlink function More...
 
int getopt (int argc, FAR char *const argv[], FAR const char *optstring)
 command option parsing More...
 

Variables

EXTERN FAR char * optarg
 
EXTERN int optind
 
EXTERN int optopt
 

Detailed Description

Provides APIs for Standard Symbolic Constants and Types.

Macro Definition Documentation

#define _POSIX_MESSAGE_PASSING   1

Definition at line 96 of file unistd.h.

#define _POSIX_PRIORITY_SCHEDULING   1

Definition at line 99 of file unistd.h.

#define _POSIX_REALTIME_SIGNALS   1

Definition at line 95 of file unistd.h.

#define _POSIX_SYNC_IO   1

Definition at line 114 of file unistd.h.

#define _POSIX_SYNCHRONIZED_IO   1

Definition at line 104 of file unistd.h.

#define _POSIX_TIMERS   1

Definition at line 100 of file unistd.h.

#define EXTERN   extern

Definition at line 129 of file unistd.h.

#define F_OK   0 /* Test existence */

Definition at line 85 of file unistd.h.

#define fdatasync (   f)    fsync(f)

Definition at line 118 of file unistd.h.

#define POSIX_VERSION

Definition at line 92 of file unistd.h.

#define R_OK   1 /* Test read permission */

Definition at line 86 of file unistd.h.

#define SEEK_CUR   1 /* From the current file offset */

Definition at line 80 of file unistd.h.

#define SEEK_END   2 /* From the end of the file */

Definition at line 81 of file unistd.h.

#define SEEK_SET   0 /* From the start of the file */

Definition at line 79 of file unistd.h.

#define W_OK   2 /* Test write permission */

Definition at line 87 of file unistd.h.

#define X_OK   4 /* Test execute permission */

Definition at line 88 of file unistd.h.

Function Documentation

int chdir ( FAR const char *  path)

change working directory

#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int close ( int  fd)

close a file descriptor

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int dup ( int  fd)

duplicate an open file descriptor

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int dup2 ( int  fd1,
int  fd2 
)

duplicate an open file descriptor

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int fsync ( int  fd)

synchronize changes to a file

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
FAR char* getcwd ( FAR char *  buf,
size_t  size 
)

get the pathname of the current working directory

#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int getopt ( int  argc,
FAR char *const  argv[],
FAR const char *  optstring 
)

command option parsing

#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
pid_t getpid ( void  )

get the process ID

#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
off_t lseek ( int  fd,
off_t  offset,
int  whence 
)

move the read/write file offset

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int pause ( void  )

suspend the thread until a signal is received

#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int pipe ( int  fd[2])

create an interprocess channel

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
ssize_t pread ( int  fd,
FAR void *  buf,
size_t  nbytes,
off_t  offset 
)

read from a file

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
ssize_t pwrite ( int  fd,
FAR const void *  buf,
size_t  nbytes,
off_t  offset 
)

write on a file

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
ssize_t read ( int  fd,
FAR void *  buf,
size_t  nbytes 
)

read from a file

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int rmdir ( FAR const char *  pathname)

remove a directory

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
unsigned int sleep ( unsigned int  seconds)

suspend execution for an interval of time

#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int unlink ( FAR const char *  pathname)

call the unlink function

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0
int usleep ( useconds_t  usec)

suspend execution for microsecond intervals

#include <unistd.h>
The usleep() function suspends execution of the calling thread for (at least) usec microseconds. The sleep may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers.

Parameters
[in]usecmicrosecond intervals
Since
TizenRT v1.0
ssize_t write ( int  fd,
FAR const void *  buf,
size_t  nbytes 
)

write to another user

#include <unistd.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
TizenRT v1.0

Variable Documentation

EXTERN FAR char* optarg

Definition at line 138 of file unistd.h.

EXTERN int optind

Definition at line 139 of file unistd.h.

EXTERN int optopt

Definition at line 140 of file unistd.h.