namespace: ashet.overlapped
Types
System Calls
syscall schedule(in async_call: *overlapped.ARC)Starts new asynchronous operations.
Note:
Until the operation has successfully completed or was cancelled, the ARC structure must be considered owned by the kernel and must not be changed from userspace. It can also change its contents spuriously until the operation is returned to userland.
syscall await_completion(in completed: []*overlapped.ARC, in options: Await_Options, out completed_count: usize)Awaits one or more scheduled asynchronous operations and returns the number of
completedelements.The kernel will fill out
completedup to the returned number of elements. All other values are undefined.Note:
For blocking operations, this function will suspend the current thread until the request has been completed.
Related Elements:
@ref await_completion_of
syscall await_completion_of(in events: []?*overlapped.ARC, out completed_count: usize)Awaits one or more explicit asynchronous operations and returns the number of
eventselements.The kernel will only await elements provided in
eventsand all of those events must not be awaited by anotherawait_completion_of.When the function returns,
eventswill have all completed events unchanged, and all unfinished events set tonull. This way, a simple check via index can be done instead of the need for iteration ofeventsto find what was finished.Note:
This syscall will always return as soon as a single event has finished.
Note:
It is invalid to await the same operation with two concurrent calls to
await_completion_of.Note:
Elements awaited with this function will be guaranteed to not be returned by another concurrent call to
await_completion.Note:
For blocking operations, this function will suspend the current thread until the request has been completed.
Related Elements:
@ref await_completion
syscall cancel(in aop: *overlapped.ARC)Cancels an asynchronous call.
Note:
If the operation has already completed, an error will be returned saying so.
Note:
The cancelled operation will not be returned by
await_completionorawait_completion_ofanymore.