root/include/linux/timer.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. init_timer

   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  * HD_TIMER2            (atdisk2 patches)
  21  *
  22  * FLOPPY_TIMER         floppy disk timer (not used right now)
  23  * 
  24  * SCSI_TIMER           scsi.c timeout timer
  25  *
  26  * NET_TIMER            tcp/ip timeout timer
  27  *
  28  * COPRO_TIMER          387 timeout for buggy hardware..
  29  *
  30  * QIC02_TAPE_TIMER     timer for QIC-02 tape driver (it's not hardcoded)
  31  *
  32  * MCD_TIMER            Mitsumi CD-ROM Timer
  33  *
  34  * GSCD_TIMER           Goldstar CD-ROM Timer
  35  *
  36  * OPTCD_TIMER          Optics Storage CD-ROM Timer
  37  *
  38  */
  39 
  40 #define BLANK_TIMER     0
  41 #define BEEP_TIMER      1
  42 #define RS_TIMER        2
  43 
  44 #define HD_TIMER        16
  45 #define FLOPPY_TIMER    17
  46 #define SCSI_TIMER      18
  47 #define NET_TIMER       19
  48 #define SOUND_TIMER     20
  49 #define COPRO_TIMER     21
  50 
  51 #define QIC02_TAPE_TIMER        22      /* hhb */
  52 #define MCD_TIMER       23
  53 
  54 #define HD_TIMER2       24
  55 #define GSCD_TIMER      25
  56 #define OPTCD_TIMER     26
  57 
  58 struct timer_struct {
  59         unsigned long expires;
  60         void (*fn)(void);
  61 };
  62 
  63 extern unsigned long timer_active;
  64 extern struct timer_struct timer_table[32];
  65 
  66 /*
  67  * This is completely separate from the above, and is the
  68  * "new and improved" way of handling timers more dynamically.
  69  * Hopefully efficient and general enough for most things.
  70  *
  71  * The "hardcoded" timers above are still useful for well-
  72  * defined problems, but the timer-list is probably better
  73  * when you need multiple outstanding timers or similar.
  74  *
  75  * The "data" field is in case you want to use the same
  76  * timeout function for several timeouts. You can use this
  77  * to distinguish between the different invocations.
  78  */
  79 struct timer_list {
  80         struct timer_list *next;
  81         struct timer_list *prev;
  82         unsigned long expires;
  83         unsigned long data;
  84         void (*function)(unsigned long);
  85 };
  86 
  87 extern void add_timer(struct timer_list * timer);
  88 extern int  del_timer(struct timer_list * timer);
  89 
  90 extern void it_real_fn(unsigned long);
  91 
  92 extern inline void init_timer(struct timer_list * timer)
     /* [previous][next][first][last][top][bottom][index][help] */
  93 {
  94         timer->next = NULL;
  95         timer->prev = NULL;
  96 }
  97 
  98 #endif

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