Back to index

glibc  2.9
Defines | Functions
sigwait.c File Reference
#include <errno.h>
#include <signal.h>
#include <stddef.h>
#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
#include <bits/libc-lock.h>

Go to the source code of this file.

Defines

#define __need_NULL

Functions

int __syscall_rt_sigtimedwait (const sigset_t *__unbounded, siginfo_t *__unbounded, const struct timespec *__unbounded, size_t)
static int do_sigwait (const sigset_t *set, int *sig)
 weak_extern (__pthread_sigwait)

Define Documentation

#define __need_NULL

Definition at line 21 of file sigwait.c.


Function Documentation

int __syscall_rt_sigtimedwait ( const sigset_t __unbounded,
siginfo_t *  __unbounded,
const struct timespec __unbounded,
size_t   
)
static int do_sigwait ( const sigset_t set,
int sig 
) [inline, static]

Definition at line 35 of file sigwait.c.

{
  int ret;

  /* XXX The size argument hopefully will have to be changed to the
     real size of the user-level sigset_t.  */
#ifdef INTERNAL_SYSCALL
  INTERNAL_SYSCALL_DECL (err);
  ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, CHECK_SIGSET (set),
                       NULL, NULL, _NSIG / 8);
  if (! INTERNAL_SYSCALL_ERROR_P (ret, err))
    {
      *sig = ret;
      ret = 0;
    }
  else
    ret = INTERNAL_SYSCALL_ERRNO (ret, err);
#else
  ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
                     NULL, NULL, _NSIG / 8);
  if (ret != -1)
    {
      *sig = ret;
      ret = 0;
    }
  else
    ret = errno;
#endif

  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 68 of file sigwait.c.

{
#ifndef NOT_IN_libc
  return __libc_maybe_call2 (pthread_sigwait, (set, sig),
                          do_sigwait (set, sig));
#else
  return do_sigwait (set, sig);
#endif
}

Here is the call graph for this function: