OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [timer.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.