Back to index

glibc  2.9
Defines | Functions
sigpause.c File Reference
#include <errno.h>
#include <signal.h>
#include <stddef.h>
#include <sysdep-cancel.h>
#include <sigset-cvt-mask.h>

Go to the source code of this file.

Defines

#define sigpause   __rename_sigpause

Functions

static int do_sigpause (int sig_or_mask, int is_sig)
int __sigpause (int sig_or_mask, int is_sig)
 libc_hidden_def (__sigpause)
 weak_alias (strong_alias(__default_sigpause, sigpause)

Define Documentation

#define sigpause   __rename_sigpause

Definition at line 20 of file sigpause.c.


Function Documentation

int __sigpause ( int  sig_or_mask,
int  is_sig 
)

Definition at line 53 of file sigpause.c.

{
  if (SINGLE_THREAD_P)
    return do_sigpause (sig_or_mask, is_sig);

  int oldtype = LIBC_CANCEL_ASYNC ();

  int result = do_sigpause (sig_or_mask, is_sig);

  LIBC_CANCEL_RESET (oldtype);

  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int do_sigpause ( int  sig_or_mask,
int  is_sig 
) [static]

Definition at line 32 of file sigpause.c.

{
  sigset_t set;

  if (is_sig != 0)
    {
      /* The modern X/Open implementation is requested.  */
      if (__sigprocmask (0, NULL, &set) < 0
         || sigdelset (&set, sig_or_mask) < 0)
       return -1;
    }
  else if (sigset_set_old_mask (&set, sig_or_mask) < 0)
    return -1;

  /* Note the sigpause() is a cancellation point.  But since we call
     sigsuspend() which itself is a cancellation point we do not have
     to do anything here.  */
  return __sigsuspend (&set);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 66 of file sigpause.c.

{
  return __sigpause (mask, 0);
}

Here is the call graph for this function:

weak_alias ( strong_alias __default_sigpause,
sigpause   
)

Definition at line 78 of file sigpause.c.

{
  return __sigpause (sig, 1);
}

Here is the call graph for this function: