Subversion Repositories HelenOS-historic

Rev

Rev 404 | Rev 430 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 404 Rev 413
Line 40... Line 40...
40
 *
40
 *
41
 * @param usec Number of microseconds to sleep.
41
 * @param usec Number of microseconds to sleep.
42
 */
42
 */
43
void delay(__u32 usec)
43
void delay(__u32 usec)
44
{
44
{
45
    pri_t pri;
45
    ipl_t ipl;
46
   
46
   
-
 
47
    /*
47
    /* The delay loop is calibrated for each and every
48
     * The delay loop is calibrated for each and every
48
       CPU in the system. Therefore it is necessary to
49
     * CPU in the system. Therefore it is necessary to
49
       cpu_priority_high() before calling the asm_delay_loop(). */
50
     * call interrupts_disable() before calling the
-
 
51
     * asm_delay_loop().
-
 
52
     */
50
    pri = cpu_priority_high();
53
    ipl = interrupts_disable();
51
    asm_delay_loop(usec * CPU->delay_loop_const);
54
    asm_delay_loop(usec * CPU->delay_loop_const);
52
    cpu_priority_restore(pri);
55
    interrupts_restore(ipl);
53
}
56
}