File: x_timer.h

package info (click to toggle)
afbackup 3.3.6pl4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,872 kB
  • ctags: 3,143
  • sloc: ansic: 44,316; tcl: 4,189; sh: 2,263; csh: 2,077; makefile: 566; sed: 93; perl: 80
file content (72 lines) | stat: -rw-r--r-- 1,562 bytes parent folder | download
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/****************** Start of $RCSfile: x_timer.h,v $  ****************
*
* $Source: /home/alb/afbackup/afbackup-3.3.6/RCS/x_timer.h,v $
* $Id: x_timer.h,v 1.1 2001/11/02 10:37:28 alb Exp alb $
* $Date: 2001/11/02 10:37:28 $
* $Author: alb $
*
*
******* description ***********************************************
*
*		Posix Timer replacement functions
*
*******************************************************************/

#ifndef __X_TIMERS
#define __X_TIMERS __X_TIMERS

#include <lconf.h>
#include <signal.h>
#ifdef	INC_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef	INC_TIME_H
#include <time.h>
#endif
#ifdef	INC_SYS_TIMERS_H
#include <sys/timers.h>
#endif

#ifdef	TIMER_ABSTIME
#undef	TIMER_ABSTIME
#endif
#ifdef	TIMER_ADDREL
#undef	TIMER_ADDREL
#endif
#ifdef	_TIMER_PRESERVE_EXEC
#undef	_TIMER_PRESERVE_EXEC
#endif
#define	TIMER_ABSTIME		1
#define	TIMER_ADDREL		(TIMER_ABSTIME << 1)
#define	_TIMER_PRESERVE_EXEC	(TIMER_ABSTIME << 2)

#define	clock_getres(id, res)	restimer((id), (res), &_local_timer_ptr_)

#define	CLOCK_TYPE_REALTIME	1

struct Signal_Event {
  signal_t	sigev_signum;
};

typedef	int	ClockID;
typedef	int	Timer;

#ifdef	__cplusplus
extern	"C"	{
#endif

extern	Timer	timer_make(ClockID, struct Signal_Event *);
extern	int	timer_del(Timer);
extern	int	timer_get(Timer, struct itimerval *);
extern	int	timer_set(Timer, int, struct itimerval *,
						struct itimerval *);
extern	int	clock_get(ClockID, struct timeval *);

#ifdef	__cplusplus
}
#endif


#endif	/* __X_TIMERS */

/************ end of %M% **************************************/