DosDeleteMuxWaitSem

DosDeleteMuxWaitSem deletes a specified semaphore from a muxwait list.

Syntax
DosDeleteMuxWaitSem( phmuxSemaphore, hsemSemaphore )

Parameters

 * PHMUX phmuxSemaphore (input):This is a pointer to the HMUX that will get the handle to the new semaphore.
 * HSEM hsemSemaphore (input):The handle to the semaphore to be removed from the muxwait list. It must be cast to HSEM from either HEV or HMTX.

Returns

 * APIRET rc:The following values can be returned:

Gotchas
This may only be called from a process that has gained proper access to the MuxWait semaphore via either DosCreateMuxWaitSem or DosOpenMuxWaitSem. If the deleted semaphore is the last semaphore in the muxwait list, all threads blocking on the MuxWait semaphore are unblocked.

If the deleted semaphore is the only "hold-out" in a MuxWait semaphore with the DCMW_WAIT_ALL attribute, all threads blocked on the MuxWait semaphore will be unblocked.

Sample Code

 * 1) define INCL_DOSSEMAPHORES
 * 2) include 

HMUX  hmuxMySemaphore;       /* my muxwait semaphore handle */ HMTX  hmtxMyOtherSemaphore;  /* my mutex semaphore handle */

/* wave the magic wand and... */	/* hmuxMySemaphore contains a valid muxwait sem handle */ /* hmtxMyOtherSemaphore contains a valid mutex sem handle */

rc = DosDeleteMuxWaitSem( nmuxMySemaphore,	                         (HSEM)hmtxMyOtherSemaphore);

if (rc != 0) {	 /* We got an error to take care of. */	}