Rev 3343 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3343 | Rev 3770 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | */ |
33 | */ |
34 | 34 | ||
35 | #ifndef KERN_sparc64_TICK_H_ |
35 | #ifndef KERN_sparc64_TICK_H_ |
36 | #define KERN_sparc64_TICK_H_ |
36 | #define KERN_sparc64_TICK_H_ |
37 | 37 | ||
- | 38 | #include <arch/asm.h> |
|
38 | #include <arch/interrupt.h> |
39 | #include <arch/interrupt.h> |
39 | 40 | ||
- | 41 | /* mask of the "counter" field of the Tick register */ |
|
- | 42 | #define TICK_COUNTER_MASK (~(1l << 63)) |
|
- | 43 | ||
40 | extern void tick_init(void); |
44 | extern void tick_init(void); |
41 | extern void tick_interrupt(int n, istate_t *istate); |
45 | extern void tick_interrupt(int n, istate_t *istate); |
42 | 46 | ||
- | 47 | /** |
|
- | 48 | * Reads the Tick register counter. |
|
- | 49 | */ |
|
- | 50 | static inline uint64_t tick_counter_read(void) |
|
- | 51 | { |
|
- | 52 | return TICK_COUNTER_MASK & tick_read(); |
|
- | 53 | } |
|
- | 54 | ||
43 | #endif |
55 | #endif |
44 | 56 | ||
45 | /** @} |
57 | /** @} |
46 | */ |
58 | */ |