Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

scheduler.hxx File Reference

Scheduler implementation. More...

#include <unistd.h>
#include <signal.h>
#include <sys/times.h>
#include <cassert>
#include <cstring>
#include <cerrno>
#include "scheduler.hh"
#include "utl/mark.hh"
#include "utl/log.hh"

Go to the source code of this file.

Namespaces

namespace  olsr
namespace  olsr::sch
namespace  olsr::sch::internal

Defines

#define QOLYESTER_SCH_SCHEDULER_HXX   1
#define GET_OLD_HANDLER(Signal, SmallSignal)
#define PUT_NEW_HANDLER(Signal, SmallSignal)

Functions

void install_sighandlers ()

Variables

void(* old_term_handler )(int) = SIG_IGN
void(* old_int_handler )(int) = SIG_IGN
void(* old_quit_handler )(int) = SIG_IGN


Detailed Description

Scheduler implementation.

Author:
Ignacy Gawedzki
Date:
Sat Sep 27 14:01:25 2003

Define Documentation

#define GET_OLD_HANDLER Signal,
SmallSignal   ) 
 

Value:

do { \
          struct sigaction      sa; \
          int                   ret; \
          while ((ret = ::sigaction(Signal, NULL, &sa)) < 0 && \
                 errno == EINTR); \
          assert(ret == 0); \
          old_ ## SmallSignal ## _handler = sa.sa_handler; \
        } while (0)

#define PUT_NEW_HANDLER Signal,
SmallSignal   ) 
 

Value:

do { \
          if (old_ ## SmallSignal ## _handler != SIG_IGN) { \
            struct sigaction    sa; \
            memset(&sa, 0, sizeof sa); \
            sa.sa_handler = SmallSignal ## _handler; \
            sigemptyset(&sa.sa_mask); \
            sa.sa_flags = SA_RESTART; \
            int                 ret; \
            while ((ret = ::sigaction(Signal, &sa, NULL)) < 0 && \
                   errno == EINTR); \
            assert(ret == 0); \
          } \
        } while (0)

#define QOLYESTER_SCH_SCHEDULER_HXX   1
 


Function Documentation

void install_sighandlers  ) 
 


Variable Documentation

void(* olsr::sch::internal::old_int_handler)(int) = SIG_IGN
 

void(* olsr::sch::internal::old_quit_handler)(int) = SIG_IGN
 

void(* olsr::sch::internal::old_term_handler)(int) = SIG_IGN
 


Generated on Thu Jul 28 21:21:49 2005 for Qolyester daemon by  doxygen 1.4.1