scheduler.hxx File Reference

Scheduler implementation. More...

#include <unistd.h>
#include <signal.h>
#include <sys/times.h>
#include <cassert>
#include <cstring>
#include <cerrno>
#include <map>
#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 olsr::sch::internal::install_sighandlers ()
void olsr::sch::term_handler (int)
 Termination signals handler function.
void olsr::sch::int_handler (int)
void olsr::sch::quit_handler (int)

Variables

std::ostream olsr::dump_prof
debug_ostream_t olsr::debug
utl::Mark olsr::terminate_now
bool olsr::do_dump_prof
sched_t olsr::scheduler
void(*) olsr::sch::internal::old_term_handler (int) = SIG_IGN
void(*) olsr::sch::internal::old_int_handler (int) = SIG_IGN
void(*) olsr::sch::internal::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


Generated on Mon Sep 10 17:02:13 2007 for Qolyester daemon by  doxygen 1.5.1