root/include/linux/timer.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_TIMER_H
   2 #define _LINUX_TIMER_H
   3 
   4 /*
   5  * DON'T CHANGE THESE!! Most of them are hardcoded into some assembly language
   6  * as well as being defined here.
   7  */
   8 
   9 /*
  10  * The timers are:
  11  *
  12  * BLANK_TIMER          console screen-saver timer
  13  *
  14  * BEEP_TIMER           console beep timer
  15  *
  16  * RS_TIMER             timer for the RS-232 ports
  17  * 
  18  * HD_TIMER             harddisk timer
  19  *
  20  * FLOPPY_TIMER         floppy disk timer (not used right now)
  21  * 
  22  * SCSI_TIMER           scsi.c timeout timer
  23  *
  24  * NET_TIMER            tcp/ip timeout timer
  25  *
  26  * COPRO_TIMER          387 timeout for buggy hardware..
  27  */
  28 
  29 #define BLANK_TIMER     0
  30 #define BEEP_TIMER      1
  31 #define RS_TIMER        2
  32 
  33 #define HD_TIMER        16
  34 #define FLOPPY_TIMER    17
  35 #define SCSI_TIMER      18
  36 #define NET_TIMER       19
  37 #define SOUND_TIMER     20
  38 #define COPRO_TIMER     21
  39 
  40 struct timer_struct {
  41         unsigned long expires;
  42         void (*fn)(void);
  43 };
  44 
  45 extern unsigned long timer_active;
  46 extern struct timer_struct timer_table[32];
  47 
  48 /*
  49  * This is completely separate from the above, and is the
  50  * "new and improved" way of handling timers more dynamically.
  51  * Hopefully efficient and general enough for most things.
  52  *
  53  * The "hardcoded" timers above are still useful for well-
  54  * defined problems, but the timer-list is probably better
  55  * when you need multiple outstanding timers or similar.
  56  *
  57  * The "data" field is in case you want to use the same
  58  * timeout function for several timeouts. You can use this
  59  * to distinguish between the different invocations.
  60  */
  61 struct timer_list {
  62         struct timer_list *next;
  63         unsigned long expires;
  64         unsigned long data;
  65         void (*function)(unsigned long);
  66 };
  67 
  68 extern void add_timer(struct timer_list * timer);
  69 extern void del_timer(struct timer_list * timer);
  70 
  71 #endif

/* [previous][next][first][last][top][bottom][index][help] */