ntfn_signal
| Number | 0x25 |
|---|---|
| Signature | (ntfn_handle, bits) -> 0 or -err |
| Group | handles |
| Since | 1.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
| Register | Name | Description |
|---|---|---|
r0 | ntfn_handle | Handle of the notification |
r1 | bits | Bitmask to OR in. Bit 31 is reserved and rejected |
Returns
0 on success.
Errors
| Code | Condition |
|---|---|
ERR_BADARG | Bit 31 was set |
ERR_BADHANDLE | No such handle |
ERR_BADTYPE | Handle is not a notification |
ERR_DEAD | The notification object is dead |