1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2024-07-22 01:58:46 -03:00

38 lines
804 B
C

/*
* Timers and signals wrapper
*
* $Id: timers.h,v 1.1.1.1 2007/04/12 09:42:38 ian Exp $
*
*/
#ifndef TIMERS_H
#define TIMERS_H
/* System includes needed for types */
#include <time.h>
/* Local includes needed for types */
#include "units.h"
/* Type definitions */
typedef struct {
const Unit_t *unit;
unsigned int alarm_time;
void *data;
} Timer_t;
/* Global function prototypes */
Timer_t *timer_new(const Unit_t *unit);
void timer_free(const Unit_t *unit, Timer_t *timer);
void timer_alarm(const Unit_t *unit, Timer_t *timer, unsigned int nsecs,
void *data);
void timer_ack(const Unit_t *unit, Timer_t *timer);
Timer_t *timer_find_soonest(const Unit_t *unit);
/* Global data */
extern const Unit_t timer_unit;
extern volatile int sig_hup, sig_usr1, sig_usr2, sig_alarm;
#endif