NWWaitOnSemaphore(3nw)
NWWaitOnSemaphore --
waits on semaphore for specified time
Synopsis
#include <nwsync.h>
or
#include <nwcalls.h>
NWCCODE N_API NWWaitOnSemaphore
(NWCONN_HANDLE conn,
nuint32 semHandle,
nuint16 timeOutValue);
Description
The parameters are as follows:
- conn
-
(IN) Specifies the NetWare server connection handle.
- semHandle
-
(IN) Specifies the semaphore handle returned by calling
NWOpenSemaphore.
- timeOutValue
-
(IN) Specifies the length of time the application will wait for the semaphore.
Return values
- 0x0000
-
SUCCESSFUL
- 0x8801
-
INVALID_CONNECTION
- 0x89FE
-
TIMEOUT_FAILURE
- 0x89FF
-
LOCK_ERROR
Notices
NWWaitOnSemaphore decrements the semaphore value counter by 1
if it is greater than 0. If the semaphore value counter and the
timeOutValue parameter are both 0, a time out failure
(LOCK_ERROR) will be returned. If the value is 0 before the
time out expires, Successful is returned, and the application can access
the associated resource.
If the value is <0, NWWaitOnSemaphore queues the application
for the time interval specified in timeOutValue.
timeOutValue indicates how long the NetWare server should wait
if the semaphore value is negative. timeOutValue is specified in
units of 1/18 second (0 = no wait). It has no default value.
Services
Synchronization
NCP calls
None
References
NWCloseSemaphore(3nw),
NWExamineSemaphore(3nw),
NWOpenSemaphore(3nw),
NWSignalSemaphore(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.