[Previous] [Contents] [Index] [Next]

PtPulseArmPid()

Arm a pulse for delivery from a process with a given pid

Synopsis:

PtPulseMsgId_t *PtPulseArmPid( PtAppContext_t app, 
                               pid_t pulse, 
                               pid_t pid, 
                               PtPulseMsg_t *msg);

Description:

This function arms a pulse and creates a "pulse message" to be sent to another process. The other process can use the pulse message and PtPulseDeliver() to send the pulse back to this process.

The app argument is the address of the application context, a structure that manages all the data associated with this application. For Photon 1.1x, this must be specified as NULL, so that the default context is used.

The pulse argument is a pulse ID returned by PtAppCreatePulse().

The pid is a process ID of a process on the same node as this process, or a virtual circuit ID for a process on a different node. In either case, this argument identifies the process that will deliver the pulse to the process calling this function.


Note: If you also have a file descriptor associated with the process that's going to deliver the pulse, you should use PtPulseArmFd(), to arm the pulse.

The msg argument points a pulse message that's created by the function. You'll need to send it to the process that's going to deliver the pulse.

When the pulse is no longer needed, you should call PtPulseDisarm(), passing it the pulse-message ID returned by PtPulseArmPid(). Doing this releases any resources that PtPulseArmPid() allocated (e.g. a virtual proxy in QNX 4).

Returns:

A pointer to the pulse message ID, or NULL if an error occurs.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAppCreatePulse(), PtAppDeletePulse(), PtAppPulseTrigger(), PtChannelCreate(), PtPulseArmFd(), PtPulseDeliver(), PtPulseDisarm()

Interprocess Communication and Lengthy Operations in the Photon Programmer's Guide


[Previous] [Contents] [Index] [Next]