- Timestamp:
- 2005-06-03T14:51:05Z (21 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 673104e
- Parents:
- ac5d02b
- Location:
- src/time
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/time/clock.c
rac5d02b r70527f1 44 44 #endif 45 45 46 /* 47 * Clock is called from an interrupt and is cpu_priority_high()'d. 46 /** Clock routine 47 * 48 * Clock routine executed from clock interrupt handler 49 * (assuming cpu_priority_high()). Runs expired timeouts 50 * and preemptive scheduling. 51 * 48 52 */ 49 53 void clock(void) -
src/time/delay.c
rac5d02b r70527f1 33 33 #include <arch.h> 34 34 35 /* 36 * Note that the delay loop is calibrated for each and every CPU in the system. 37 * Therefore it is necessary to cpu_priority_high() before calling the asm_delay_loop(). 35 /** Active delay 36 * 37 * Delay the execution for the given number 38 * of microseconds (or slightly more). The delay 39 * is implemented as CPU calibrated active loop. 40 * 41 * @param microseconds Number of usec to sleep. 42 * 38 43 */ 39 44 void delay(__u32 microseconds) 40 45 { 41 46 pri_t pri; 42 47 48 /* The delay loop is calibrated for each and every 49 CPU in the system. Therefore it is necessary to 50 cpu_priority_high() before calling the asm_delay_loop(). */ 43 51 pri = cpu_priority_high(); 44 52 asm_delay_loop(microseconds * CPU->delay_loop_const); -
src/time/timeout.c
rac5d02b r70527f1 39 39 #include <arch.h> 40 40 41 42 /** Initialize timeouts 43 * 44 * Initialize kernel timeouts. 45 * 46 */ 41 47 void timeout_init(void) 42 48 { … … 46 52 47 53 54 /** Initialize empty timeout list 55 * 56 * Initialize the timeout list to be empty. 57 * 58 * @param t Timeout list to be initialized. 59 * 60 */ 48 61 void timeout_reinitialize(timeout_t *t) 49 62 { … … 55 68 } 56 69 70 71 /** Initialize timeout list 72 * 73 * Initialize the timeout list and its spinlock. 74 * 75 * @param t Timeout list to be initialized. 76 * 77 */ 57 78 void timeout_initialize(timeout_t *t) 58 79 { … … 61 82 } 62 83 63 /* 64 * This function registers f for execution in about time microseconds. 84 85 /** Register timeout callback 86 * 87 * Insert the timeout handler f (with argument arg) 88 * to the timeout list and make it execute in 89 * time microseconds (or slightly more). 90 * 91 * @param t Timeout list. 92 * @patam time Number of usec in the future to execute 93 * the handler. 94 * @param f Timeout handler function. 95 * @param arg Timeout handler argument. 96 * 65 97 */ 66 98 void timeout_register(timeout_t *t, __u64 time, timeout_handler f, void *arg) … … 122 154 } 123 155 156 157 /** Unregister timeout callback 158 * 159 * Remove timeout from timeout list. 160 * 161 * @param t Timeout to unregister. 162 * 163 */ 124 164 int timeout_unregister(timeout_t *t) 125 165 {
Note:
See TracChangeset
for help on using the changeset viewer.
