KbdSynch: Difference between revisions
Appearance
m Ak120 moved page OS2 API:CPI:LEGACY:KbdSynch to KbdSynch |
No edit summary |
||
Line 1: | Line 1: | ||
== | {{Legacy | ||
|RepFunc= | |||
|Remarks=This page list the older version of the function for reference. | |||
}} | |||
This call synchronizes access from a keyboard subsystem to the keyboard device driver. | This call synchronizes access from a keyboard subsystem to the keyboard device driver. | ||
==Syntax== | ==Syntax== |
Revision as of 04:14, 16 September 2017
![]() | |
---|---|
It is recommended to use a newer replacement for this function. | |
Replacement: | |
Remarks: | This page list the older version of the function for reference. |
This call synchronizes access from a keyboard subsystem to the keyboard device driver.
Syntax
KbdSynch (IOWait)
Parameters
- IOWait (USHORT) - input
- Wait for the bond. Values are:
Value Definition 0 Indicates the requestor does not wait for access to the device driver. 1 Indicates the requestor waits for access to the device driver.
Return Code
rc (USHORT) - return
Return code descriptions are:
- 0 NO_ERROR
- 121 ERROR_SEM_TIMEOUT
Remarks
KbdSynch blocks all other threads within a session until return from the subsystem to the router. To ensure proper synchronization, KbdSynch should be issued by a keyboard subsystem if it intends to issue a DosDevIOCtl or access dynamically shared data. KbdSynch does not protect globally shared data from threads in other sessions.
Example Code
C Binding
#define INCL_KBD USHORT rc = KbdSynch(IOWait); USHORT IOWait; /* Indicate if wait */ USHORT rc; /* return code */
MASM Binding
EXTRN KbdSynch:FAR INCL_KBD EQU 1 PUSH WORD IOWait ;Indicate if wait CALL KbdSynch Returns WORD