_pulse

QNX SDP8.0C Library ReferenceAPIDeveloper

Structure that describes a pulse

Synopsis:

#include <sys/neutrino.h>

struct _pulse {
    uint16_t                    type;
    uint16_t                    subtype;
    int8_t                      code;
    uint8_t                     zero[3];
    union sigval                value;
    int32_t                     scoid;
};

Description:

The _pulse structure describes a pulse, a fixed-size, nonblocking message that carries a small payload (four bytes of data plus a single byte code). The members include:

type
_PULSE_TYPE (0)
subtype
_PULSE_SUBTYPE (0)
code
A code that identifies the type of pulse. QNX OS reserves the negative codes (see below). You can define your own pulses, with a code in the range from _PULSE_CODE_MINAVAIL through _PULSE_CODE_MAXAVAIL.
value
Information that's relevant to the code. If you define your own pulses, you can decide what information you want to store in this field.
The value member is a sigval union defined as follows:
union sigval {
    int        sival_int;
    void     * sival_ptr;
    long       sival_long;
};
  • int sival_int — an integer to be interpreted by the pulse handler.
  • void *sival_ptr — a pointer to be interpreted by the pulse handler.
  • long sival_long — a long integer to be interpreted by the pulse handler.
scoid
Server connection ID.

The codes that the OS reserves, and the values sent with the pulse, include the following:

code value
_PULSE_CODE_COIDDEATH The connection ID of a connection that was attached to a destroyed channel
_PULSE_CODE_DISCONNECT No value defined
_PULSE_CODE_RESTART The cookie passed to MsgPause() that identifies the message that was paused
_PULSE_CODE_THREADDEATH The thread ID of the thread that died
_PULSE_CODE_UNBLOCK The receive ID (rcvid) associated with the blocking message

For more details, see ChannelCreate().

Classification:

QNX OS

Page updated: