summaryrefslogtreecommitdiff
path: root/comm/SignalHandler.cc
blob: 1315812c0fa19598b9bbb9e6f85ded30194a491a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 *	The Unix Channel
 *
 *	by Michel Beaudouin-Lafon and Stephane Chatty
 *
 *	Copyright 1990-1993
 *	Laboratoire de Recherche en Informatique (LRI)
 *	Centre d'Etudes de la Navigation Aerienne
 *
 *	Multiplexer-based signal handlers
 *
 *	$Id$
 *	$CurLog$
 */

#include "Signal.h"
#include "Multiplexer.h"

UchBaseSignalHandler :: UchBaseSignalHandler (UchBaseMultiplexer& m, int sig)
: CcuBaseSignalHandler (sig),
  MyMpx (m)
{
}

UchBaseSignalHandler :: ~UchBaseSignalHandler ()
{
}


void
UchBaseSignalHandler :: Handle ()
{
	MyMpx.HandleSignal (*this);
}

void
UchBaseSignalHandler :: DeferredHandle (int)
{
}

UchSignalHandler :: UchSignalHandler (UchBaseMultiplexer& m, int sig, void (*h) (int, int))
: UchBaseSignalHandler (m, sig),
  Handler (h)
{
}

UchSignalHandler :: ~UchSignalHandler ()
{
}


void
UchSignalHandler :: DeferredHandle (int nb)
{
	(*Handler) (Signal, nb);
}