Process-in-Process
 All Functions Groups Pages
Functions
PiP Query Functions

Functions

int pip_get_pipid (int *pipidp)
 get PiP ID of the calling task More...
 
int pip_is_initialized (void)
 Query is PiP library is already initialized. More...
 
int pip_get_ntasks (int *ntasksp)
 get the maximum number of the PiP tasks More...
 
int pip_get_mode (int *modep)
 get the PiP execution mode More...
 
const char * pip_get_mode_str (void)
 get a character string of the current execution mode More...
 
int pip_get_system_id (int pipid, pip_id_t *idp)
 deliver a process or thread ID defined by the system More...
 
int pip_isa_root (void)
 check if calling PiP task is a PiP root or not More...
 
int pip_isa_task (void)
 check if calling PiP task is a PiP task or not More...
 
int pip_is_threaded (int *flagp)
 check if PiP execution mode is pthread or not More...
 
int pip_is_shared_fd (int *flagp)
 check if file descriptors are shared or not. This is equivalent with the pip_is_threaded function. More...
 

Detailed Description

PiP query functions

Description
Query functions for PiP task

Function Documentation

int pip_get_pipid ( int *  pipidp)
Name
pip_get_pipid
Synopsis
#include <pip/pip.h>
int pip_get_pipid( int *pipidp );
Parameters
[out]pipidpThis parameter points to the variable which will be set to the PiP ID of the calling task
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMPiP library is not initialized yet
int pip_is_initialized ( void  )
Name
pip_is_initialized
Synopsis
#include <pip/pip.h>
int pip_is_initialized( void );
Returns
Return a non-zero value if PiP is already initialized. Otherwise this returns zero.
int pip_get_ntasks ( int *  ntasksp)
Name
pip_get_ntasks
Synopsis
#include <pip/pip.h>
int pip_get_ntasks( int *ntasksp );
Parameters
[out]ntaskspMaximum number of PiP tasks is returned
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMPiP library is not yet initialized
int pip_get_mode ( int *  modep)
Name
pip_get_mode
Synopsis
#include <pip/pip.h>
int pip_get_mode( int *modep );
Parameters
[out]modepReturned PiP execution mode
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMPiP library is not yet initialized
See Also
pip_get_mode_str
const char* pip_get_mode_str ( void  )
Name
pip_get_mode_str
Synopsis
#include <pip/pip.h>
char *pip_get_mode_str( void );
Returns
Return the name string of the current execution mode. If PiP library is note initialized yet, then this return NULL.
See Also
pip_get_mode
int pip_get_system_id ( int  pipid,
pip_id_t *  idp 
)
Name
pip_get_system_id
Synopsis
#include <pip/pip.h>
int pip_get_system_id( int *pipid, uintptr_t *idp );
Description
The returned object depends on the PiP execution mode. In the process mode it returns TID (Thread ID, not PID) and in the thread mode it returns thread (pthread_t) associated with the PiP task This function can be used regardless to the PiP execution mode.
Parameters
[out]pipidPiP ID of a target PiP task
[out]idpa pointer to store the ID value
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMThe PiP library is not initialized yet
int pip_isa_root ( void  )
Name
pip_isa_root
Synopsis
#include <pip/pip.h>
int pip_isa_root( void );
Returns
Return a non-zero value if the caller is the PiP root. Otherwise this returns zero.
int pip_isa_task ( void  )
Name
pip_isa_task
Synopsis
#include <pip/pip.h>
int pip_isa_task( void );
Returns
Return a non-zero value if the caller is the PiP task. Otherwise this returns zero.
int pip_is_threaded ( int *  flagp)
Name
pip_is_threaded
Synopsis
#include <pip/pip.h>
int pip_is_threaded( int *flagp );
Parameters
[out]flagpset to a non-zero value if PiP execution mode is Pthread
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMThe PiP library is not initialized yet
int pip_is_shared_fd ( int *  flagp)
Name
pip_is_shared_fd
Synopsis
#include <pip/pip.h>
int pip_is_shared_fd( int *flagp );
Parameters
[out]flagpset to a non-zero value if FDs are shared
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMThe PiP library is not initialized yet