示例#1
0
/* Read the contents of the symbolic link PATH into no more than
   LEN bytes of BUF.  The contents are not null-terminated.
   Returns the number of characters read, or -1 for errors.  */
ssize_t
__readlink (const char *path, char *buf, size_t len)
{
  size_t nread;
  return NACL_CALL (__nacl_irt_dev_filename.readlink (path, buf, len, &nread),
                    nread);
}
示例#2
0
文件: getdents.c 项目: siddhesh/glibc
ssize_t
internal_function
__getdents (int fd, char *buf, size_t nbytes)
{
  size_t nread;
  return NACL_CALL (__nacl_irt_fdio.getdents (fd, (void *) buf, nbytes, &nread),
                    nread);
}
示例#3
0
/* Write NBYTES of BUF to FD.  Return the number written, or -1.  */
ssize_t
__libc_write (int fd, const void *buf, size_t nbytes)
{
  size_t wrote;
  return NACL_CALL (__nacl_irt_fdio.write (fd, buf, nbytes, &wrote), wrote);
}
示例#4
0
文件: munmap.c 项目: siddhesh/glibc
int
__munmap (__ptr_t addr, size_t len)
{
  return NACL_CALL (__nacl_irt_memory.munmap (addr, len), 0);
}
示例#5
0
文件: getpid.c 项目: siddhesh/glibc
/* Get the process ID of the calling process.  */
pid_t
__getpid (void)
{
  int pid;
  return NACL_CALL (__nacl_irt_dev_getpid.getpid (&pid), pid);
}
示例#6
0
/* Duplicate FD, returning a new file descriptor open on the same file.  */
int
__dup (int fd)
{
  int result;
  return NACL_CALL (__nacl_irt_fdio.dup (fd, &result), result);
}
示例#7
0
/* Change the current directory to PATH.  */
int
__chdir (const char *path)
{
  return NACL_CALL (__nacl_irt_dev_filename.chdir (path), 0);
}
示例#8
0
/* Truncate the file referenced by FD to LENGTH bytes.  */
int
__ftruncate (int fd, off_t length)
{
  return NACL_CALL (__nacl_irt_dev_fdio.ftruncate (fd, length), 0);
}
示例#9
0
/* Make a link to FROM called TO.  */
int
__link (const char *from, const char *to)
{
  return NACL_CALL (__nacl_irt_dev_filename.link (from, to), 0);
}
示例#10
0
/* Change the permissions of the file referenced by FD to MODE.  */
int
__fchmod (int fd, mode_t mode)
{
  return NACL_CALL (__nacl_irt_dev_fdio.fchmod (fd, mode), 0);
}
示例#11
0
文件: read.c 项目: siddhesh/glibc
/* Read NBYTES into BUF from FD.  Return the number read or -1.  */
ssize_t
__libc_read (int fd, void *buf, size_t nbytes)
{
  size_t nread;
  return NACL_CALL (__nacl_irt_fdio.read (fd, buf, nbytes, &nread), nread);
}
示例#12
0
/* Get current value of CLOCK and store it in TP.  */
int
__clock_gettime (clockid_t clock_id, struct timespec *tp)
{
  return NACL_CALL (__nacl_irt_clock.clock_gettime (clock_id, tp), 0);
}
示例#13
0
/* Return the time used by the program so far (user time + system time).  */
clock_t
clock (void)
{
  nacl_irt_clock_t result;
  return NACL_CALL (__nacl_irt_basic.clock (&result), result);
}
示例#14
0
int
__mprotect (__ptr_t addr, size_t len, int prot)
{
  return NACL_CALL (__nacl_irt_memory.mprotect (addr, len, prot), 0);
}
示例#15
0
/* Yield the processor.  */
int
__sched_yield (void)
{
  return NACL_CALL (__nacl_irt_basic.sched_yield (), 0);
}
示例#16
0
/* Synchronize at least the data part of a file with the underlying
   media.  */
int
fdatasync (int fd)
{
  return NACL_CALL (__nacl_irt_dev_fdio.fdatasync (fd), 0);
}
示例#17
0
/* Pause execution for a number of nanoseconds.  */
int
__libc_nanosleep (const struct timespec *requested_time,
                  struct timespec *remaining)
{
  return NACL_CALL (__nacl_irt_basic.nanosleep (requested_time, remaining), 0);
}
示例#18
0
文件: fchdir.c 项目: siddhesh/glibc
/* Change the current directory to FD.  */
int
__fchdir (int fd)
{
  return NACL_CALL (__nacl_irt_dev_fdio.fchdir (fd), 0);
}
示例#19
0
文件: access.c 项目: kraj/glibc
/* Test for access to FILE.  */
int
__access (const char *file, int type)
{
  return NACL_CALL (__nacl_irt_dev_filename.access (file, type), 0);
}