www.delorie.com/djgpp/doc/libc/libc_259.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

__dpmi_serialize_on_shared_memory

Syntax

 
#include <dpmi.h>

int __dpmi_serialize_on_shared_memory(unsigned long handle, int flags);

Description

Please refer to the DPMI Specification (see section DPMI Specification) for details on DPMI function call operation. Also see the DPMI Overview (see section DPMI Overview) for general information.

DPMI function AX = 0x0d02 (DPMI 1.0 only). Not supported by CWSDPMI and Windows.

This function serializes access to a shared memory block whose handle is given in handle. The bit-mapped variable flags defines the following bits:

bit 0
If set, return immediately if serialization is unavailable. If cleared, the program is suspended until the serialization becomes available.

bit 1
If set, perform shared serialization. If cleared, perform exclusive serialization.

bits 2-15
Reserved (should be zero).

An exclusive serialization blocks any serialization attempts for the same memory block from other virtual machines. A shared serialization blocks only exclusive serialization attempts from other virtual machines.

Return Value

-1 on error, else zero.

Portability

ANSI/ISO C No
POSIX No


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004