ntfn_signal

Number0x25
Signature(ntfn_handle, bits) -> 0 or -err
Grouphandles
Since1.0

Set bits on a notification object, waking one waiter if any is queued. Bits are OR’d into the object’s word and accumulate until consumed.

Bit 31 is reserved because the bits are returned in r0, where a negative value means an error. Rejecting it keeps every successful return non-negative.

Pitfalls

Delivery clears the whole word, and only one waiter is woken. If two threads wait on the same notification, the first takes every accumulated bit and the second sees nothing. Use one notification per waiter.

Arguments

RegisterNameDescription
r0ntfn_handleHandle of the notification
r1bitsBitmask to OR in. Bit 31 is reserved and rejected

Returns

0 on success.

Errors

CodeCondition
ERR_BADARGBit 31 was set
ERR_BADHANDLENo such handle
ERR_BADTYPEHandle is not a notification
ERR_DEADThe notification object is dead

See also