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

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