History

ntsync: Introduce alertable waits.

NT waits can optionally be made "alertable". This is a special channel for thread wakeup that is mildly similar to SIGIO. A thread has an internal single bit of "alerted" state, and if a thread is alerted while an alertable wait, the wait will return a special value, consume the "alerted" state, and will not consume any of its objects. Alerts are implemented using events; the user-space NT emulator is expected to create an internal ntsync event for each thread and pass that event to wait functions.

Elizabeth Figura committed 1 year ago

Commit a1381791 parent e8640712 files · +63 −10Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/ntsync.h+2−1
@@ -34,7 +34,8 @@ struct ntsync_wait_args { · 33 unmodified lines
34 __u32 index;34 __u32 index;
35 __u32 flags;35 __u32 flags;
36 __u32 owner;36 __u32 owner;
37 __u32 pad[2];37 __u32 alert;
38 __u32 pad;
38};39};
39 40
40#define NTSYNC_MAX_WAIT_COUNT 6441#define NTSYNC_MAX_WAIT_COUNT 64