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  * TAPE_QIC02_TIMER     timer for QIC-02 tape driver (it's not hardcoded)
  29  */
  30 
  31 #define BLANK_TIMER     0
  32 #define BEEP_TIMER      1
  33 #define RS_TIMER        2
  34 
  35 #define HD_TIMER        16
  36 #define FLOPPY_TIMER    17
  37 #define SCSI_TIMER      18
  38 #define NET_TIMER       19
  39 #define SOUND_TIMER     20
  40 #define COPRO_TIMER     21
  41 
  42 #define TAPE_QIC02_TIMER        22      /* hhb */
  43 
  44 struct timer_struct {
  45         unsigned long expires;
  46         void (*fn)(void);
  47 };
  48 
  49 extern unsigned long timer_active;
  50 extern struct timer_struct timer_table[32];
  51 
  52 /*
  53  * This is completely separate from the above, and is the
  54  * "new and improved" way of handling timers more dynamically.
  55  * Hopefully efficient and general enough for most things.
  56  *
  57  * The "hardcoded" timers above are still useful for well-
  58  * defined problems, but the timer-list is probably better
  59  * when you need multiple outstanding timers or similar.
  60  *
  61  * The "data" field is in case you want to use the same
  62  * timeout function for several timeouts. You can use this
  63  * to distinguish between the different invocations.
  64  */
  65 struct timer_list {
  66         struct timer_list *next;
  67         unsigned long expires;
  68         unsigned long data;
  69         void (*function)(unsigned long);
  70 };
  71 
  72 extern void add_timer(struct timer_list * timer);
  73 extern void del_timer(struct timer_list * timer);
  74 
  75 #endif

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