summaryrefslogtreecommitdiff
path: root/pfinet/linux/timer.h
blob: 2458746e8599969fa05f69f2620c78d34540d235 (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
#ifndef _HACK_TIMER_H_
#define _HACK_TIMER_H_

#include <cthreads.h>

enum tstate
{
  TIMER_INACTIVE,
  TIMER_STARTING,
  TIMER_STARTED,
  TIMER_EXPIRED,
  TIMER_FUNCTION_RUNNING,
};
 
struct timer_list
{
  struct timer_list *next, **prevp;
  unsigned long expires;
  unsigned long data;
  void (*function)(unsigned long);
};

void add_timer (struct timer_list *);
int del_timer (struct timer_list *);
void init_timer (struct timer_list *);

#endif