DosEnterCritSec

DosEnterCritSec

#define INCL_DOSPROCESS

USHORT  rc = DosEnterCritSec(VOID);

USHORT           rc;            /* return code */

Example

This example enters a section that will not be pre-empted, performs a simple task, and then exits quickly.

#define INCL_DOSPROCESS

USHORT flag;

   DosEnterCritSec();                       /* Enter critical code
                                               section */
   flag = TRUE;                             /* Perform some work */
   DosExitCritSec();                        /* Exit critical code section */


[Back: DosEditName]
[Next: DosEnumAttribute]