Jump to content

FSH BUFSTATE: Difference between revisions

From EDM2
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
|Remarks=REMOVED in OS/2 Version 2.0  
|Remarks=REMOVED in OS/2 Version 2.0  
}}
}}
FSH_BUFSTATE is used retrieve or set the state of a buffer.


Get or set buffer state FSH_SEMREQUEST Request a semaphore.
==Syntax==
FSH_BUFSTATE (pBuf, flag, pState)
==Parameters==
; pBuf : pointer to buffer. This pointer was returned to the FSD by FSH_GETBUFFER
 
 
; flag : indicates get or set buf state.
:*flag == 0 indicates retrieve state
:*flag == 1 indicates set state
 
 
;pState : for set, points to new state of buffer on input. For retrieve, points to state of buffer.
:State == 0x00000080 indicates dirty buffer.
:All other values are reserved.
 
==Returns==
Error code if error detected, 0 otherwise.
 
ERROR_INVALID_PARAMETER - pointer to buffer is invalid or reserved state bits are set.  
 
==Calling Sequence==
<PRE>
int pascal FSH_BUFSTATE (pBuf, flag, pState)
 
char *          pBuf;
unsigned long  flag;
unsigned long * pState;
</PRE>


FSH_BUFSTATE - Get or set buffer state:
* To help avoid deadlocks, FSH_ADDSHARE should not be called while * owning an OS/2 buffer.
* FSH_BUFSTATE is used retrieve or set the state of a buffer.
==Remarks==
==Remarks==
* Reminder: OS/2 does not validate input parameters, so FSD should * call FSH_PROBEBUF where appropriate.  
;Note : To set the opposite of a defined state, call FSH_BUFSTATE with the bit not set. For example, to set a buffer not dirty, pass 0x00000000 as the new state.
 
;Reminder: OS/2 does not validate input parameters, so FSD should call FSH_PROBEBUF where appropriate.  


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

Latest revision as of 15:59, 20 February 2020

Legacy Function Warning
It is recommended to use a newer replacement for this function.
Replacement:
Remarks: REMOVED in OS/2 Version 2.0

FSH_BUFSTATE is used retrieve or set the state of a buffer.

Syntax

FSH_BUFSTATE (pBuf, flag, pState)

Parameters

pBuf
pointer to buffer. This pointer was returned to the FSD by FSH_GETBUFFER


flag
indicates get or set buf state.
  • flag == 0 indicates retrieve state
  • flag == 1 indicates set state


pState
for set, points to new state of buffer on input. For retrieve, points to state of buffer.
State == 0x00000080 indicates dirty buffer.
All other values are reserved.

Returns

Error code if error detected, 0 otherwise.

ERROR_INVALID_PARAMETER - pointer to buffer is invalid or reserved state bits are set.

Calling Sequence

int pascal FSH_BUFSTATE (pBuf, flag, pState)

char *          pBuf;
unsigned long   flag;
unsigned long * pState;

Remarks

Note
To set the opposite of a defined state, call FSH_BUFSTATE with the bit not set. For example, to set a buffer not dirty, pass 0x00000000 as the new state.
Reminder
OS/2 does not validate input parameters, so FSD should call FSH_PROBEBUF where appropriate.