[196] | 1 |
|
---|
| 2 | /*
|
---|
| 3 | *@@sourcefile sem.h:
|
---|
| 4 | * header file for sem.c. See remarks there.
|
---|
| 5 | *
|
---|
| 6 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
| 7 | * numbering.
|
---|
| 8 | *
|
---|
| 9 | *@@include #define INCL_DOSSEMAPHORES
|
---|
| 10 | *@@include #include <os2.h>
|
---|
| 11 | *@@include #include "helpers\semaphores.h"
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | /*
|
---|
| 15 | * Copyright (C) 2002 Sander van Leeuwen.
|
---|
| 16 | * Copyright (C) 2002 Ulrich Mller.
|
---|
| 17 | * This file is part of the "XWorkplace helpers" source package.
|
---|
| 18 | * This is free software; you can redistribute it and/or modify
|
---|
| 19 | * it under the terms of the GNU General Public License as published
|
---|
| 20 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
| 21 | * "COPYING" file of the XWorkplace main distribution.
|
---|
| 22 | * This program is distributed in the hope that it will be useful,
|
---|
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 25 | * GNU General Public License for more details.
|
---|
| 26 | */
|
---|
| 27 |
|
---|
| 28 | #if __cplusplus
|
---|
| 29 | extern "C" {
|
---|
| 30 | #endif
|
---|
| 31 |
|
---|
| 32 | #ifndef SEM_HEADER_INCLUDED
|
---|
| 33 | #define SEM_HEADER_INCLUDED
|
---|
| 34 |
|
---|
| 35 | /*
|
---|
| 36 | *@@ FASTMTX:
|
---|
| 37 | *
|
---|
| 38 | */
|
---|
| 39 |
|
---|
| 40 | typedef struct _FASTMTX
|
---|
| 41 | {
|
---|
| 42 | LONG LockCount;
|
---|
| 43 | LONG RecursionCount;
|
---|
| 44 | ULONG OwningThread;
|
---|
| 45 | ULONG hmtxLock;
|
---|
| 46 | ULONG Reserved;
|
---|
| 47 | } FASTMTX, *PFASTMTX;
|
---|
| 48 |
|
---|
| 49 | APIRET semCreate(PFASTMTX pmtx,
|
---|
| 50 | PCSZ pszSemName);
|
---|
| 51 |
|
---|
| 52 | APIRET semOpen(PFASTMTX pmtx,
|
---|
| 53 | PCSZ pszSemName);
|
---|
| 54 |
|
---|
| 55 | APIRET semClose(PFASTMTX pmtx);
|
---|
| 56 |
|
---|
| 57 | APIRET semRequest(PFASTMTX pmtx);
|
---|
| 58 |
|
---|
| 59 | BOOL semAssert(PFASTMTX pmtx);
|
---|
| 60 |
|
---|
| 61 | BOOL semTry(PFASTMTX pmtx);
|
---|
| 62 |
|
---|
| 63 | APIRET semRelease(PFASTMTX pmtx);
|
---|
| 64 |
|
---|
[243] | 65 | LONG APIENTRY lockCompareExchange(PLONG dest, LONG xchg, LONG compare);
|
---|
| 66 | LONG APIENTRY lockDecrement(PLONG);
|
---|
| 67 | LONG APIENTRY lockExchange(PLONG, LONG);
|
---|
| 68 | LONG APIENTRY lockExchangeAdd(PLONG dest, LONG incr);
|
---|
| 69 | LONG APIENTRY lockIncrement(PLONG);
|
---|
[196] | 70 |
|
---|
| 71 | #endif
|
---|
| 72 |
|
---|
| 73 | #if __cplusplus
|
---|
| 74 | }
|
---|
| 75 | #endif
|
---|
| 76 |
|
---|