Exemple #1
0
static int do_fcntl_3_int (int fd, int cmd, int flags)
{
   int ret;

   while ((-1 == (ret = fcntl (fd, cmd, flags)))
	  && (0 == check_and_set_errno (errno)))
     ;

   return ret;
}
static int do_syscall_struct_2 (int (*fun)(int, int, void *), SLFile_FD_Type *f, int i, void *v)
{
    int fd;
    int ret;

    if (-1 == SLfile_get_fd (f, &fd))
        return -1;

    while ((-1 == (ret = (*fun) (fd, i, v)))
            && (0 == check_and_set_errno (errno)))
        ;

    return ret;
}
Exemple #3
0
static int do_fcntl_2 (SLFile_FD_Type *f, int cmd)
{
   int ret;
   int fd;

   if (-1 == SLfile_get_fd (f, &fd))
     return -1;
     
   while ((-1 == (ret = fcntl (fd, cmd)))
	  && (0 == check_and_set_errno (errno)))
     ;
   
   return ret;
}
static int do_syscall_1 (int (*fun)(int, int), SLFile_FD_Type *f, int arg)
{
    int fd;
    int ret;

    if (-1 == SLfile_get_fd (f, &fd))
        return -1;

    while ((-1 == (ret = (*fun) (fd, arg)))
            && (0 == check_and_set_errno (errno)))
        ;

    return ret;
}