Back to index

glibc  2.9
Functions
sighandler.c File Reference
#include "internals.h"

Go to the source code of this file.

Functions

void __pthread_sighandler (int signo, SIGCONTEXT ctx)
void __pthread_sighandler_rt (int signo, struct siginfo *si, struct ucontext *uc)
void __pthread_null_sighandler (int sig)

Function Documentation

Definition at line 71 of file sighandler.c.

{ }

Here is the caller graph for this function:

void __pthread_sighandler ( int  signo,
SIGCONTEXT  ctx 
)

Definition at line 21 of file sighandler.c.

{
  pthread_descr self;
  char * in_sighandler;
  self = check_thread_self();

  /* If we're in a sigwait operation, just record the signal received
     and return without calling the user's handler */
  if (THREAD_GETMEM(self, p_sigwaiting)) {
    THREAD_SETMEM(self, p_sigwaiting, 0);
    THREAD_SETMEM(self, p_signal, signo);
    return;
  }
  /* Record that we're in a signal handler and call the user's
     handler function */
  in_sighandler = THREAD_GETMEM(self, p_in_sighandler);
  if (in_sighandler == NULL)
    THREAD_SETMEM(self, p_in_sighandler, CURRENT_STACK_FRAME);
  CALL_SIGHANDLER(__sighandler[signo].old, signo, ctx);
  if (in_sighandler == NULL)
    THREAD_SETMEM(self, p_in_sighandler, NULL);
}

Here is the caller graph for this function:

void __pthread_sighandler_rt ( int  signo,
struct siginfo *  si,
struct ucontext uc 
)

Definition at line 45 of file sighandler.c.

{
  pthread_descr self;
  char * in_sighandler;
  self = check_thread_self();

  /* If we're in a sigwait operation, just record the signal received
     and return without calling the user's handler */
  if (THREAD_GETMEM(self, p_sigwaiting)) {
    THREAD_SETMEM(self, p_sigwaiting, 0);
    THREAD_SETMEM(self, p_signal, signo);
    return;
  }
  /* Record that we're in a signal handler and call the user's
     handler function */
  in_sighandler = THREAD_GETMEM(self, p_in_sighandler);
  if (in_sighandler == NULL)
    THREAD_SETMEM(self, p_in_sighandler, CURRENT_STACK_FRAME);
  __sighandler[signo].rt(signo, si, uc);
  if (in_sighandler == NULL)
    THREAD_SETMEM(self, p_in_sighandler, NULL);
}

Here is the caller graph for this function: