Jump to content

PIPESEMSTATE: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== PIPESEMSTATE ==
Status of a named pipe that is attached to a semaphore.


Status of a named pipe that is attached to a semaphore.
=== Type ===
 
  [[BYTE]]  fStatus;
=== Type ===  
  BYTE  fFlag
 
  [[USHORT]]  usKey;
  [[OS2 API:DataType:BYTE|BYTE]]  fStatus;
  USHORT  usAvail
  [[OS2 API:DataType:BYTE|BYTE]]   fFlag
  [[OS2 API:DataType:USHORT|USHORT]]  usKey;
  [[OS2 API:DataType:USHORT|USHORT]] usAvail


==== C Declaration Method ====
==== C Declaration Method ====
typedef struct
typedef struct


=== Fields ===
=== Fields ===
;fStatus:A coded value that indicates the status of the named pipe.
:The following codes are available:
:0 - NPSS_EOI
::End of information buffer. No more information records follow, and subsequent fields in this information record have no defined value.
:1 - NPSS_RDATA
::Read data is available.
:2 - NPSS_WSPACE
::Write space is available.
:3 - NPSS_CLOSE
::The pipe is closed.
;fFlag:Additional information about the state of the named pipe.
:This parameter contains the following bit fields:
:Bit 7-1 - Reserved
:Bit 0 - NPSS_WAIT - If set, a thread is waiting at the other end of the pipe.
;usKey:A key value that distinguishes events arriving on different named pipes that are attached to the same semaphore.
:This value is specified in the key field when DosSetNPipeSem is issued.
;usAvail:Number of bytes available in the pipe.
:If fStatus has a value of 1, this field contains the number of bytes of data that are available to read from the pipe. If fStatus has a value of 2, this field contains the number of bytes of write space that are available in the pipe.


fStatus  A coded value that indicates the status of the named pipe.
[[Category:Data type]]
          The following codes are available:
          0  NPSS_EOI
            End of information buffer. No more information records follow, and
            subsequent fields in this information record have no defined value.
          1  NPSS_RDATA
            Read data is available.
          2  NPSS_WSPACE
            Write space is available.
          3  NPSS_CLOSE
            The pipe is closed.
fFlag    Additional information about the state of the named pipe.
          This parameter contains the following bit fields:
          Bit  Description
          7-1  Reserved
          0    NPSS_WAIT
              If set, a thread is waiting at the other end of the pipe.
 
usKey    A key value that distinguishes events arriving on different named
          pipes that are attached to the same semaphore. This value is specified
          in the key field when DosSetNPipeSem is issued.
 
usAvail  Number of bytes available in the pipe.
          If fStatus has a value of 1, this field contains the number of bytes
          of data that are available to read from the pipe. If fStatus has a
          value of 2, this field contains the number of bytes of write space
          that are available in the pipe.
 
 
 
 
[[OS2_API | Back to OS/2 API]]
 
 
[[Category:The OS/2 API Project]]

Latest revision as of 08:32, 6 January 2017

Status of a named pipe that is attached to a semaphore.

Type

BYTE   fStatus;
BYTE   fFlag
USHORT  usKey;
USHORT  usAvail

C Declaration Method

typedef struct

Fields

fStatus
A coded value that indicates the status of the named pipe.
The following codes are available:
0 - NPSS_EOI
End of information buffer. No more information records follow, and subsequent fields in this information record have no defined value.
1 - NPSS_RDATA
Read data is available.
2 - NPSS_WSPACE
Write space is available.
3 - NPSS_CLOSE
The pipe is closed.
fFlag
Additional information about the state of the named pipe.
This parameter contains the following bit fields:
Bit 7-1 - Reserved
Bit 0 - NPSS_WAIT - If set, a thread is waiting at the other end of the pipe.
usKey
A key value that distinguishes events arriving on different named pipes that are attached to the same semaphore.
This value is specified in the key field when DosSetNPipeSem is issued.
usAvail
Number of bytes available in the pipe.
If fStatus has a value of 1, this field contains the number of bytes of data that are available to read from the pipe. If fStatus has a value of 2, this field contains the number of bytes of write space that are available in the pipe.