Jump to content

MouSynch: Difference between revisions

From EDM2
Created page with "==Description== This call provides synchronous access for a mouse subsystem to the mouse device driver. ==Syntax== <PRE> MouSynch (IOWait) </PRE> ==Parameters== ; IOWa..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
This call provides synchronous access for a mouse subsystem to the mouse device driver.
This call provides synchronous access for a mouse subsystem to the mouse device driver.


==Syntax==
==Syntax==
<PRE>
  MouSynch (IOWait)
  MouSynch
 
    (IOWait)
</PRE>


==Parameters==
==Parameters==
; IOWait (USHORT) - input : Wait for access. The flag Word is defined as follows:
;IOWait (USHORT) - input : Wait for access. The flag Word is defined as follows:
::0 - Control immediately returned to requestor.
::1 - Requestor waits until mouse device driver is free.


    '''Value        Definition'''
0        Control immediately returned to requestor.
1        Requestor waits until mouse device driver is free.
==Return Code==
==Return Code==
rc (USHORT) - return
;rc (USHORT) - return:Return code descriptions are:
* 0  NO_ERROR
*121 ERROR_SEM_TIMEOUT


Return code descriptions are:
* 0    NO_ERROR
* 121        ERROR_SEM_TIMEOUT
==Remarks==
==Remarks==
MouSynch blocks all other threads within a session until the semaphore clears (returns from the subsystem to the router). To ensure proper synchronization, MouSynch should be issued by a mouse subsystem if it intends to access dynamically modifiable shared data for each session or if it intends to issue a DosDevIOCtl. MouSynch does not protect globally shared data from threads in other sessions.
MouSynch blocks all other threads within a session until the semaphore clears (returns from the subsystem to the router). To ensure proper synchronization, MouSynch should be issued by a mouse subsystem if it intends to access dynamically modifiable shared data for each session or if it intends to issue a DosDevIOCtl. MouSynch does not protect globally shared data from threads in other sessions.
==Example Code==
 
=== C Binding===
==Bindings==
===C===
<PRE>
<PRE>
#define INCL_MOU
#define INCL_MOU
USHORT  rc = MouSynch(IOWait);
USHORT  rc = MouSynch(IOWait);
 
USHORT IOWait;        /* Indicate wait/no wait */
USHORT           IOWait;        /* Indicate wait/no wait */
USHORT rc;            /* return code */
 
USHORT           rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  MouSynch:FAR
EXTRN  MouSynch:FAR
Line 47: Line 37:
</PRE>
</PRE>


==Related Functions==
[[Category:Mou]]
*
 
[[Category:The OS/2 API Project]]

Latest revision as of 18:14, 14 September 2019

This call provides synchronous access for a mouse subsystem to the mouse device driver.

Syntax

MouSynch (IOWait)

Parameters

IOWait (USHORT) - input
Wait for access. The flag Word is defined as follows:
0 - Control immediately returned to requestor.
1 - Requestor waits until mouse device driver is free.

Return Code

rc (USHORT) - return
Return code descriptions are:
  • 0 NO_ERROR
  • 121 ERROR_SEM_TIMEOUT

Remarks

MouSynch blocks all other threads within a session until the semaphore clears (returns from the subsystem to the router). To ensure proper synchronization, MouSynch should be issued by a mouse subsystem if it intends to access dynamically modifiable shared data for each session or if it intends to issue a DosDevIOCtl. MouSynch does not protect globally shared data from threads in other sessions.

Bindings

C

#define INCL_MOU
USHORT  rc = MouSynch(IOWait);
USHORT  IOWait;        /* Indicate wait/no wait */
USHORT  rc;            /* return code */

MASM

EXTRN  MouSynch:FAR
INCL_MOU            EQU 1

PUSH   WORD    IOWait        ;Indicate wait/no wait
CALL   MouSynch

Returns WORD