libc.info: Reentrant Syscalls

Go backward to Stubs
Go up to Syscalls
Go to the top op libc

Reentrant covers for OS subroutines

   Since the system subroutines are used by other library routines that
require reentrancy, `libc.a' provides cover routines (for example, the
reentrant version of `fork' is `_fork_r').  These cover routines are
consistent with the other reentrant subroutines in this library, and
achieve reentrancy by using a reserved global data block (*note
Reentrancy: Reentrancy.).
`_open_r'
     A reentrant version of `open'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _open_r(void *REENT,
              const char *FILE, int FLAGS, int MODE);
`_close_r'
     A reentrant version of `close'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _close_r(void *REENT, int FD);
`_lseek_r'
     A reentrant version of `lseek'.  It takes a pointer to the global
     data block, which holds `errno'.
          off_t _lseek_r(void *REENT,
              int FD, off_t POS, int WHENCE);
`_read_r'
     A reentrant version of `read'.  It takes a pointer to the global
     data block, which holds `errno'.
          long _read_r(void *REENT,
              int FD, void *BUF, size_t CNT);
`_write_r'
     A reentrant version of `write'.  It takes a pointer to the global
     data block, which holds `errno'.
          long _write_r(void *REENT,
              int FD, const void *BUF, size_t CNT);
`_fork_r'
     A reentrant version of `fork'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _fork_r(void *REENT);
`_wait_r'
     A reentrant version of `wait'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _wait_r(void *REENT, int *STATUS);
`_stat_r'
     A reentrant version of `stat'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _stat_r(void *REENT,
              const char *FILE, struct stat *PSTAT);
`_fstat_r'
     A reentrant version of `fstat'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _fstat_r(void *REENT,
              int FD, struct stat *PSTAT);
`_link_r'
     A reentrant version of `link'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _link_r(void *REENT,
              const char *OLD, const char *NEW);
`_unlink_r'
     A reentrant version of `unlink'.  It takes a pointer to the global
     data block, which holds `errno'.
          int _unlink_r(void *REENT, const char *FILE);
`_sbrk_r'
     A reentrant version of `sbrk'.  It takes a pointer to the global
     data block, which holds `errno'.
          char *_sbrk_r(void *REENT, size_t INCR);