Description
The Sleep key enables the holder to delay for a specified number of milliseconds, or until a particular number of milliseconds from system startup has been reached.
Under no conditions will a sleep return immediately; it is guaranteed that the caller will sleep for at least one hardware clock interval.
Sleep invocations may return prematurely in the event of system restart.
Operations
- Check Alleged Key Type (OC = KT)
Returns the alleged type of the key.
| Reply | R1 | 0x10000001: Key is a Sleep key. |
- Wake Me Up (OC = 0)
Causes the caller to resume immediately. The kernel implements wakeup by placing the caller to sleep according to the order code (OC=1 or OC=2) and then adjusting the order code to OC=0.
- Sleep for N milliseconds (OC = 1)
Returns no later than N milliseconds from now, modulo the accuracy of the internal clock.
| Request | R1 | Low order 32 bits of milliseconds to sleep. |
| R2 | High order 32 bits of milliseconds to sleep. |
| Result | 0 | No longer than N milliseconds have passed. |
| KT+1 | Unknown order code |
| KT+2 | An inappropriate number of bytes were passed (must be either 4 or 8 bytes). |
- Sleep till N milliseconds since startup (OC = 2)
Returns no later than N milliseconds from the last restart of the system, modulo the accuracy of the internal clock.
| Request | W|L | Milliseconds to sleep. If a four byte string is passed, the value is assumed to be a word value. |
| Result | 0 | No longer than N milliseconds have passed. |
| KT+1 | Unknown order code |
| KT+2 | An inappropriate number of bytes were passed (must be either 4 or 8 bytes). |