Tizen RT Libs&Environment  v1.0 D5

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

Collaboration diagram for UNISTD:

Files

file  unistd.h
 POSIX operating system APIs.
 

Macros

#define ATEXIT_MAX   1
 
#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 vfork (void)
 The vfork() function has the same effect as fork(), except that the behavior is undefined if the process created by vfork() either modifies any data other than a variable of type pid_t used to store the return value from vfork(), or returns from the function in which vfork() was called, or calls any other function before successfully calling _exit() or one of the exec family of functions. More...
 
pid_t getpid (void)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
unsigned int sleep (unsigned int seconds)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int usleep (useconds_t usec)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int pause (void)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int close (int fd)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int dup (int fd)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int dup2 (int fd1, int fd2)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fsync (int fd)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
off_t lseek (int fd, off_t offset, int whence)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
ssize_t read (int fd, FAR void *buf, size_t nbytes)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
ssize_t write (int fd, FAR const void *buf, size_t nbytes)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
ssize_t pread (int fd, FAR void *buf, size_t nbytes, off_t offset)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
ssize_t pwrite (int fd, FAR const void *buf, size_t nbytes, off_t offset)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int pipe (int fd[2])
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int chdir (FAR const char *path)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
FAR char * getcwd (FAR char *buf, size_t size)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int rmdir (FAR const char *pathname)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int unlink (FAR const char *pathname)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int getopt (int argc, FAR char *const argv[], FAR const char *optstring)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) 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 102 of file unistd.h.

#define _POSIX_PRIORITY_SCHEDULING   1

Definition at line 105 of file unistd.h.

#define _POSIX_REALTIME_SIGNALS   1

Definition at line 101 of file unistd.h.

#define _POSIX_SYNC_IO   1

Definition at line 120 of file unistd.h.

#define _POSIX_SYNCHRONIZED_IO   1

Definition at line 110 of file unistd.h.

#define _POSIX_TIMERS   1

Definition at line 106 of file unistd.h.

#define ATEXIT_MAX   1

Definition at line 81 of file unistd.h.

#define EXTERN   extern

Definition at line 135 of file unistd.h.

#define F_OK   0 /* Test existence */

Definition at line 91 of file unistd.h.

#define fdatasync (   f)    fsync(f)

Definition at line 124 of file unistd.h.

#define POSIX_VERSION

Definition at line 98 of file unistd.h.

#define R_OK   1 /* Test read permission */

Definition at line 92 of file unistd.h.

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

Definition at line 86 of file unistd.h.

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

Definition at line 87 of file unistd.h.

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

Definition at line 85 of file unistd.h.

#define W_OK   2 /* Test write permission */

Definition at line 93 of file unistd.h.

#define X_OK   4 /* Test execute permission */

Definition at line 94 of file unistd.h.

Function Documentation

int chdir ( FAR const char *  path)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
int close ( int  fd)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
int dup ( int  fd)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
int dup2 ( int  fd1,
int  fd2 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
int fsync ( int  fd)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
pid_t getpid ( void  )

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
int pause ( void  )

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
unsigned int sleep ( unsigned int  seconds)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

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

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
int usleep ( useconds_t  usec)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0
pid_t vfork ( void  )

The vfork() function has the same effect as fork(), except that the behavior is undefined if the process created by vfork() either modifies any data other than a variable of type pid_t used to store the return value from vfork(), or returns from the function in which vfork() was called, or calls any other function before successfully calling _exit() or one of the exec family of functions.

This thin layer implements vfork by simply calling up_vfork() with the vfork() context as an argument. The overall sequence is:

1) User code calls vfork(). vfork() collects context information and transfers control up up_vfork(). 2) up_vfork()and calls task_vforksetup(). 3) task_vforksetup() allocates and configures the child task's TCB. This consists of:

  • Allocation of the child task's TCB.
  • Initialization of file descriptors and streams
  • Configuration of environment variables
  • Setup the intput parameters for the task.
  • Initialization of the TCB (including call to up_initial_state() 4) up_vfork() provides any additional operating context. up_vfork must:
  • Allocate and initialize the stack
  • Initialize special values in any CPU registers that were not already configured by up_initial_state() 5) up_vfork() then calls task_vforkstart() 6) task_vforkstart() then executes the child thread.
Returns
Upon successful completion, vfork() returns 0 to the child process and returns the process ID of the child process to the parent process. Otherwise, -1 is returned to the parent, no child process is created, and errno is set to indicate the error.
Since
Tizen RT v1.0
ssize_t write ( int  fd,
FAR const void *  buf,
size_t  nbytes 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0

Variable Documentation

EXTERN FAR char* optarg

Definition at line 144 of file unistd.h.

EXTERN int optind

Definition at line 145 of file unistd.h.

EXTERN int optopt

Definition at line 146 of file unistd.h.