CloseLocalSemaphore

Closes a local semaphore

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Thread

Syntax

  #include <nwsemaph.h>  
   
  int CloseLocalSemaphore  (  
     LONG   semaphoreHandle); 
  

Parameters

semaphoreHandle
(IN) Specifies the semaphore handle of an open semaphore.

Return Values

The following table lists return values and descriptions.

Value

Hex

Name

0

(0x00)

ESUCCESS

WARNING:A bad semaphore handle causes the server to abend.

Remarks

This function closes an open semaphore and makes any threads waiting on the semaphore runnable. After this function is called, the semaphore handle is no longer valid and should not be used again.

See Also

ExamineLocalSemaphore, OpenLocalSemaphore, SignalLocalSemaphore, TimedWaitOnLocalSemaphore, WaitOnLocalSemaphore