Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtGetRcvidPid()

Get the PID from a RCVID

Synopsis:

pid_t PtGetRcvidPid( int rcvid );

Library:

ph

Description:

This function should be used to obtain the process ID (PID) from the receive ID (RCVID). It might be needed if a nonspecific input procedure attaches a specific input procedure.

Returns:

The PID, or -1 on error.

Examples:

int general_input_proc( void *data, pid_t rcvid,
                        void *msg, size_t size)
{
    PtAppAddInput( NULL, PtGetRcvidPid(rcvid),
                   function, data );
    #if defined(__QNXNTO__)
        MsgReplyv( rcvid, ... );
    #else
        Reply( rcvid, ... );
    #endif
    return Pt_END;
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAppAddInput(), PtAppAddInputRemote(), PtGetRcvidPidNd()