Jump to content

FSH SEMSET: Difference between revisions

From EDM2
Created page with "This function allows an FSD to set a semaphore unconditionally. ==Syntax== FSH_SEMSET(pSem) ==Parameters== ;pSem: is the handle to the system semaphore or the long addre..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function allows an FSD to set a semaphore unconditionally.  
This function allows an FSD to set a semaphore unconditionally.


==Syntax==
==Syntax==
  FSH_SEMSET(pSem)
FSH_SEMSET(pSem)
 
==Parameters==
==Parameters==
;pSem: is the handle to the system semaphore or the long address of the ram semaphore.  
;pSem: is the handle to the system semaphore or the long address of the ram semaphore.
 
==Returns==
==Returns==
If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:  
If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:
 
*ERROR_INTERRUPT the current thread received a signal.
*ERROR_INTERRUPT the current thread received a signal.  
*ERROR_EXCL_SEM_ALREADY_OWNED the exclusive semaphore is already owned.
 
*ERROR_TOO_MANY_SEM_REQUESTS there are too many semaphore requests in progress.
*ERROR_EXCL_SEM_ALREADY_OWNED the exclusive semaphore is already owned.  
*ERROR_PROTECTION_VIOLATION the semaphore is inaccessible.


*ERROR_TOO_MANY_SEM_REQUESTS there are too many semaphore requests in progress. 
*ERROR_PROTECTION_VIOLATION the semaphore is inaccessible.
==Calling Sequence==
==Calling Sequence==
<PRE>
<PRE>
Line 21: Line 20:
void far * pSem;
void far * pSem;
</PRE>
</PRE>
==Remarks==
==Remarks==
FSH_SEMSET may block.  
FSH_SEMSET may block.


;Note: OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.  
;Note: OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.


[[Category:IFS Interfaces]]
[[Category:IFS Interfaces]]
{{DISPLAYTITLE:FSH_SEMSET}}
{{DISPLAYTITLE:FSH_SEMSET}}

Latest revision as of 05:46, 20 February 2020

This function allows an FSD to set a semaphore unconditionally.

Syntax

FSH_SEMSET(pSem)

Parameters

pSem
is the handle to the system semaphore or the long address of the ram semaphore.

Returns

If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:

  • ERROR_INTERRUPT the current thread received a signal.
  • ERROR_EXCL_SEM_ALREADY_OWNED the exclusive semaphore is already owned.
  • ERROR_TOO_MANY_SEM_REQUESTS there are too many semaphore requests in progress.
  • ERROR_PROTECTION_VIOLATION the semaphore is inaccessible.

Calling Sequence

int far pascal FSH_SEMSET(pSem)

void far * pSem;

Remarks

FSH_SEMSET may block.

Note
OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.