Jump to content

KernWakeup: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m Ak120 moved page OS2 API:KEE:KernWakeup to KernWakeup
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This wakes up threads that are blocking in KernBlock. The eventid to be specified has to match the eventid used in KernBlock. It is possible to submit a 32 bit return value to the unblocked thread. The number of threads that are unblocked is returned.
==Synopsis==
==Synopsis==
  APIRET APIENTRY KernWakeup(ULONG eventid, ULONG flags, PULONG tcnt, ULONG retdata);
  APIRET APIENTRY KernWakeup(ULONG eventid, ULONG flags, PULONG tcnt, ULONG retdata);
==Description==
This wakes up threads that are blocking in KernBlock. The eventid to be specified has to match the eventid used in KernBlock. It is possible to submit a 32 bit return value to the unblocked thread. The number of threads that are unblocked is returned. must match


==Parameters==
==Parameters==
;eventid:Event id of the blocked thread(s).
;''eventid'' ([[ULONG]]) - input :Event id of the blocked thread(s).
;flags:One or more of the following flag bits:
;''flags'' ([[ULONG]]) - input :One or more of the following flag bits:
::KEE_WAKE_SINGLE - Only wakeup the first matching thread; by default, if multiple threads are waiting, all will be awaking.
::KEE_WAKE_SINGLE - Only wakeup the first matching thread; by default, if multiple threads are waiting, all will be awaking.
::KEE_WAKE_PRIOINCR - Run the woke threads with higher priority.
::KEE_WAKE_PRIOINCR - Run the woke threads with higher priority.
::KEE_WAKE_RETDATA - return data value specified to the KernBlock retdata variable. By default, nothing is returned.
::KEE_WAKE_RETDATA - return data value specified to the KernBlock retdata variable. By default, nothing is returned.
;tcnt:pointer to an ULONG to return the actual number of threads that were woke. Ignored when NULL.
;''tcnt'' ([[PULONG]]) - input:pointer to an ULONG to return the actual number of threads that were woke. Ignored when NULL.
;retdata:Data to be returned to the unblocked threads. Ignored when KEE_WAKE_RETDATA is not set.
;''retdata'' ([[ULONG]]) - input:Data to be returned to the unblocked threads. Ignored when KEE_WAKE_RETDATA is not set.


==Comments==
==Comments==
I don't know whether the priority increase issued by KEE_WAKE_PRIOINCR is permanent, or only for the current timeslice. It shouldn't be permanent.  
I don't know whether the priority increase issued by KEE_WAKE_PRIOINCR is permanent, or only for the current timeslice. It shouldn't be permanent.  


[[Category:The OS/2 API Project]]
[[Category:KEE]]

Latest revision as of 04:00, 28 May 2025

This wakes up threads that are blocking in KernBlock. The eventid to be specified has to match the eventid used in KernBlock. It is possible to submit a 32 bit return value to the unblocked thread. The number of threads that are unblocked is returned.

Synopsis

APIRET APIENTRY KernWakeup(ULONG eventid, ULONG flags, PULONG tcnt, ULONG retdata);

Parameters

eventid (ULONG) - input
Event id of the blocked thread(s).
flags (ULONG) - input
One or more of the following flag bits:
KEE_WAKE_SINGLE - Only wakeup the first matching thread; by default, if multiple threads are waiting, all will be awaking.
KEE_WAKE_PRIOINCR - Run the woke threads with higher priority.
KEE_WAKE_RETDATA - return data value specified to the KernBlock retdata variable. By default, nothing is returned.
tcnt (PULONG) - input
pointer to an ULONG to return the actual number of threads that were woke. Ignored when NULL.
retdata (ULONG) - input
Data to be returned to the unblocked threads. Ignored when KEE_WAKE_RETDATA is not set.

Comments

I don't know whether the priority increase issued by KEE_WAKE_PRIOINCR is permanent, or only for the current timeslice. It shouldn't be permanent.