[Zion] Add a thread sleep call.
For now this can only sleep in increments of the scheduler quantum (currently 50ms). It also uses a somewhat ineffecient way of tracking the sleeping threads - it will scale linearly with the number of sleeping threads.
This commit is contained in:
parent
66e94ac41b
commit
8adde27d9b
9 changed files with 48 additions and 5 deletions
|
|
@ -17,6 +17,7 @@ SYS4(ThreadStart, z_cap_t, thread_cap, uint64_t, entry, uint64_t, arg1,
|
|||
uint64_t, arg2);
|
||||
SYS0(ThreadExit);
|
||||
SYS1(ThreadWait, z_cap_t, thread_cap);
|
||||
SYS1(ThreadSleep, uint64_t, millis);
|
||||
|
||||
SYS5(AddressSpaceMap, z_cap_t, vmas_cap, uint64_t, vmas_offset, z_cap_t,
|
||||
vmmo_cap, uint64_t, align, uint64_t*, vaddr);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ const uint64_t kZionThreadCreate = 0x10;
|
|||
const uint64_t kZionThreadStart = 0x11;
|
||||
const uint64_t kZionThreadExit = 0x12;
|
||||
const uint64_t kZionThreadWait = 0x13;
|
||||
const uint64_t kZionThreadSleep = 0x14;
|
||||
|
||||
// Memory Calls
|
||||
const uint64_t kZionAddressSpaceMap = 0x21;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue