Changeset 70527f1 in mainline for src/time/delay.c
- Timestamp:
- 2005-06-03T14:51:05Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 673104e
- Parents:
- ac5d02b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.