Process-in-Process
|
Functions | |
int | pip_init (int *pipidp, int *ntasks, void **root_expp, uint32_t opts) |
Initialize the PiP library. More... | |
int | pip_fin (void) |
Finalize the PiP library. More... | |
int pip_init | ( | int * | pipidp, |
int * | ntasks, | ||
void ** | root_expp, | ||
uint32_t | opts | ||
) |
ntasks
, and root_expp
are input parameters. If this is called by a PiP task, then those parameters are output returning the same values input by the root. pip_init
is not called by a PiP task explicitly, then pip_init
is called magically and implicitly even if the PiP task program is NOT linked with the PiP library.[out] | pipidp | When this is called by the PiP root process, then this returns PIP_PIPID_ROOT , otherwise it returns the PiP ID of the calling PiP task. |
[in,out] | ntasks | When called by the PiP root, it specifies the maximum number of PiP tasks. When called by a PiP task, then it returns the number specified by the PiP root. |
[in,out] | root_expp | If the root PiP is ready to export a memory region to any PiP task(s), then this parameter is to pass the exporting address. If the PiP root is not ready to export or has nothing to export then this variable can be NULL. When called by a PiP task, it returns the exported address by the PiP root, if any. |
[in] | opts | Specifying the PiP execution mode and See below. |
EINVAL | ntasks is negative |
EBUSY | PiP root called this function twice or more without calling pip_fin. |
EPERM | opts is invalid or unacceptable |
EOVERFLOW | ntasks is too large |
ELIBSCN | verssion miss-match between PiP root and PiP task |
thread
, pthread
, process
, process:preload
, process:pipclone
, or process:got
. pip_preload.so
file, if the PiP execution mode is PIP_MODE_PROCESS_PRELOAD
(the opts
in pip_init
) and/or the PIP_MODE ennvironment is set to process:preload
. See also the pip_mode(1) command to set the environment variable appropriately and easily. PIP_GDB_SIGNALS
environment described below. SIGTERM
, another example, 'PIPE+INT' means SIGPIPE
and SIGINT
. Some signals such as SIGKILL and SIGCONT cannot be specified. pips
command (see also pips(1)) will be shown.int pip_fin | ( | void | ) |
EPERM
.EPERM | pip_init is not yet called |
EBUSY | one or more PiP tasks are not yet terminated |