Jump to content

KbdSynch: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
m Eliminate illogical and untrue assertions
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
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==
  KbdSynch (IOWait)
  KbdSynch (IOWait)
Line 6: Line 6:
==Parameters==
==Parameters==
; IOWait (USHORT) - input : Wait for the bond. Values are:
; IOWait (USHORT) - input : Wait for the bond. Values are:
'''Value        Definition'''
::0 - Indicates the requestor does not wait for access to the device driver.
0       Indicates the requestor does not wait for access to the device driver.
::1 - Indicates the requestor waits for access to the device driver.
1       Indicates the requestor waits for access to the device driver.


==Return Code==
==Return Code==
rc (USHORT) - return
;rc (USHORT) - return:Return code descriptions are:
Return code descriptions are:
* 0 NO_ERROR
* 0 NO_ERROR
* 121 ERROR_SEM_TIMEOUT
* 121 ERROR_SEM_TIMEOUT


==Remarks==
==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.
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==
==Bindings==
=== C Binding===
=== C ===
<PRE>
<PRE>
#define INCL_KBD
#define INCL_KBD
Line 26: Line 24:
USHORT  rc = KbdSynch(IOWait);
USHORT  rc = KbdSynch(IOWait);


USHORT           IOWait;        /* Indicate if wait */
USHORT IOWait;        /* Indicate if wait */
 
USHORT rc;            /* return code */
USHORT           rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  KbdSynch:FAR
EXTRN  KbdSynch:FAR

Latest revision as of 16:17, 3 January 2019

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:
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.

Bindings

C

#define INCL_KBD

USHORT  rc = KbdSynch(IOWait);

USHORT  IOWait;        /* Indicate if wait */
USHORT  rc;            /* return code */

MASM

EXTRN  KbdSynch:FAR
INCL_KBD            EQU 1

PUSH   WORD    IOWait        ;Indicate if wait
CALL   KbdSynch

Returns WORD