|
OSAPI
0.29
Open System API
|
The process management module. More...

Typedefs | |
| typedef struct osapi_proc_id_S | t_proc_id |
| The Process identity type. | |
| typedef struct osapi_proc_info_S | t_proc_info |
| The process information type. | |
| typedef struct osapi_proc_libinfo_S | t_libinfo |
| Define the library info type. | |
| typedef struct osapi_proc_resources_S | t_proc_resources |
| The process resources type. | |
| typedef union osapi_proc_upid_U | t_upid |
| Define the Unique PID. | |
Functions | |
| t_status | proc_module_supported (void) |
| Is PROC module supported in the platform. More... | |
| t_status | proc_buffer_allocate (size_t bufsize, t_buffer *buffer) |
| Allocate memory in the HEAP using a buffer. More... | |
| t_status | proc_buffer_reAllocate (t_size bufsize, t_buffer *buffer) |
| Resize buffer memory. More... | |
| t_status | proc_buffer_deallocate (t_buffer *buffer) |
| Deallocate buffer memory. More... | |
| t_status | proc_buffer_getCapacity (const t_buffer *buffer, t_size *size) |
| Get the buffer capacity. More... | |
| t_status | proc_buffer_getData (const t_buffer *buffer, void **data) |
| Get the buffer (naked) memory address. More... | |
| t_status | proc_buffer_getSize (const t_buffer *buffer, t_size *size) |
| Get the current buffer memory usage. More... | |
| t_status | proc_buffer_setSize (t_size size, t_buffer *buffer) |
| Set the current buffer memory usage. More... | |
| t_status | proc_buffer_copy (const t_buffer *source, t_buffer *target) |
| Copy two buffer memories Buffers cannot overlap in any way (this generates an error) More... | |
| t_status | proc_buffer_copyFrom (const t_buffer *source, t_size targetSize, void *target) |
| Copy from a buffer to a naked/raw memory location. More... | |
| t_status | proc_buffer_copyTo (const void *source, t_size sourceSize, t_buffer *target) |
| Copy from a naked/raw memory into a buffer memory. More... | |
| t_status | proc_id_get (t_pid *pid) |
| Get the current process ID. More... | |
| t_status | proc_id_getParent (t_pid pid, t_pid *ppid) |
| Get the parent process ID. More... | |
| t_status | proc_id_getDescendents (t_pid pid, t_size tsize, t_size *csize, t_pid(*array)[]) |
| Get list of process IDs of children processes. More... | |
| t_status | proc_id_getUser (t_pid pid, t_uid *uid) |
| Get the User ID of the given process. More... | |
| t_status | proc_id_getGroup (t_pid pid, t_gid *gid) |
| Get the Group ID of the current process. More... | |
| t_status | proc_id_getSession (t_pid pid, t_pid *sid) |
| Get Session Identifier. More... | |
| t_status | proc_id_setSession (void) |
| Create a new Session. A new session is created with the current PID as being the Session ID. More... | |
| t_status | proc_id_getGroupMembers (t_pid pgid, t_size initialMembers, t_size *currentMembers, t_pid(*idList)[]) |
| Get the List of IDs of Process Group members. More... | |
| t_status | proc_id_getSessionMembers (t_pid sid, t_size initialMembers, t_size *currentMembers, t_pid(*idList)[]) |
| Get the List of IDs of Process Session members. More... | |
| t_status | proc_id_toString (t_pid pid, t_size size, t_char *string) |
| Convert a process ID to a C-String format. More... | |
| t_status | proc_id_fromString (t_char *string, t_pid *pid) |
| Convert a C-String into a process ID. More... | |
| t_status | proc_id_copy (t_pid source, t_pid *target) |
| Copy a source process ID to a target variable. More... | |
| t_status | proc_id_clear (t_pid *pid) |
| Reset ID to a default (and possible non usable) value. More... | |
| t_status | proc_uid_get (t_upid *upid) |
| Get the current process Unique ID A Process Unique ID is a unique incarnation of a process instance, i.e. no two processes will have the same UPID in the same node. More... | |
| t_status | proc_info_get (t_pid pid, t_proc_info *info) |
| Obtain raw process information This is the function call that allows clients to make a single call and obtain all raw process data. More... | |
| t_status | proc_info_getVirtualMemory (t_proc_info *info, t_size *size) |
| Extract the size of the process virtual memory from the process information. More... | |
| t_status | proc_info_getRealMemory (t_proc_info *info, t_size *size) |
| Extract the size of the process real memory, i.e. ram usage, from the process information. More... | |
| t_status | proc_info_getCPUConsumption (t_proc_info *info, t_size *size) |
| Extract the process CPU consumption (summary of user and system) from the process information. More... | |
| t_status | proc_info_getThreads (t_proc_info *info, t_size *number) |
| Extract the number of process kernel threads / LWPs from the process information. More... | |
| t_status | proc_info_getStartTime (t_proc_info *info, t_time *start) |
| Extract the process start time from the process information. More... | |
| t_status | proc_instance_create (t_proc *proc) |
| Create a new process instance. More... | |
| t_status | proc_instance_destroy (t_pid pid, int forced) |
| Terminate a running process. More... | |
| t_status | proc_instance_clone (int *isChild) |
| Clone the current process. More... | |
| t_status | proc_instance_isRunning (t_pid pid) |
| Is a process instance running. More... | |
| t_status | proc_instance_getState (t_pid pid, int *state) |
| Obtain the state of a given process. More... | |
| t_status | proc_instance_getChildStatus (t_pid *pid, t_proc_status *status) |
| Obtain status of a child process. More... | |
| t_status | proc_instance_getStatus (t_pid pid, t_proc_status *status) |
| Obtain a status of a process. More... | |
| t_status | proc_instance_getNumberOfDescendents (t_pid pid, t_size *number) |
| Obtain the number of children processes. More... | |
| t_status | proc_instance_getNumberOfGroupMembers (t_pid pgid, t_size *number) |
| Obtain the number of process group members. More... | |
| t_status | proc_instance_getNumberOfSessionMembers (t_pid sid, t_size *number) |
| Obtain the number of process session members. More... | |
| OSAPI_NORETURN void | proc_instance_terminate (int code) |
| Terminate the current process. It always succeeds. More... | |
| t_status | proc_instance_suspendExecution (void) |
| Suspend the execution of the current thread until an event occurs such as a signal in UNIX. More... | |
| t_status | proc_library_supported (void) |
| Is the load/unload of libraries supported in the platform? More... | |
| t_status | proc_library_load (char *path, char *options[], t_library *lib) |
| Load a library into the current process. More... | |
| t_status | proc_library_unload (t_library lib) |
| Unload a library from the current process. More... | |
| t_status | proc_library_getNumberOfLoaded (t_size *maxlibs) |
| Get the number of shared libraries loaded in the process. More... | |
| t_status | proc_library_getAllLoaded (t_size maxlibs, t_libinfo(*info)[]) |
| Get a list of name and version information for each process loaded/shared library. More... | |
| t_status | proc_library_getRelease (const t_char *name, t_size max, char *release) |
| Get the Release information of the named library. More... | |
| t_status | proc_list_allocate (t_size nItems, t_size itemSize, t_list *list) |
| Allocate memory in the HEAP for a list of items The "list" is implemented as an array of bytes. More... | |
| t_status | proc_list_reAllocate (t_size nItems, t_list *list) |
| Resize a list of items. More... | |
| t_status | proc_list_deallocate (t_list *list) |
| Deallocate list. More... | |
| t_status | proc_list_getCapacity (const t_list *list, t_size *size) |
| Get the list capacity in terms of allocated items. More... | |
| t_status | proc_list_hasCapacity (const t_list *list, t_size size) |
| Check if the list can store N items. More... | |
| t_status | proc_list_getRequiredCapacity (const t_list *list, t_size *size) |
| Get the required list capacity in terms of allocated items The required capacity is needed in case a list is not big enough to hold all elements. More... | |
| t_status | proc_list_getData (const t_list *list, t_size item, void **data) |
| Get the memory address of a given data item (of a list) More... | |
| t_status | proc_list_getSize (const t_list *list, t_size *size) |
| Get the current list usage in terms of number of items. More... | |
| t_status | proc_list_setSize (t_size size, t_list *list) |
| Set the current list usage. More... | |
| t_status | proc_list_setRequiredCapacity (t_size size, t_list *list) |
| Set the current list required capacity The required capacity is needed in case a list is not big enough to hold all elements. More... | |
| t_status | proc_list_copy (const t_list *source, t_list *target) |
| Copy two list memories List cannot overlap in any way (this generates an error) More... | |
| t_status | proc_list_copyFrom (const t_list *source, t_size sourceItem, t_size targetSize, void *target) |
| Copy from a list item to a naked/raw memory location. More... | |
| t_status | proc_list_copyTo (const void *source, t_size sourceSize, t_size targetItem, t_list *target) |
| Copy from a naked/raw memory into a list item. More... | |
| t_status | proc_rawMemory_allocate (t_size size, Byte type, void *mem) |
| Allocate memory in the process heap. More... | |
| t_status | proc_rawMemory_reAllocate (t_size newSize, void *mem) |
| Resize the previously allocated memory in the process heap. More... | |
| t_status | proc_rawMemory_deallocate (void *mem) |
| Deallocate a previously allocated heap memory block. More... | |
| t_status | proc_memory_allocate (t_size size, Byte type, t_memory *mem) |
| Allocate memory in the process heap. More... | |
| t_status | proc_memory_reAllocate (t_size newSize, t_memory *mem) |
| Resize the previously allocated memory in the process heap. More... | |
| t_status | proc_memory_deallocate (t_memory *location) |
| Deallocate a previously allocated heap memory block. More... | |
| t_status | proc_memory_getCapacity (const t_memory *mem, t_size *size) |
| Retrieve the total allocated memory size, in bytes. More... | |
| t_status | proc_memory_getData (const t_memory *mem, void **data) |
| Get the raw memory address for the given memory descriptor. More... | |
| t_status | proc_memory_copy (const t_memory *source, t_memory *target) |
| Copy between two memories using memory descriptors. More... | |
| t_status | proc_memory_copyFrom (const t_memory *source, t_size targetSize, void *target) |
| Copy from a memory descriptor into a raw memory. More... | |
| t_status | proc_memory_copyTo (const void *source, t_size sourceSize, t_memory *target) |
| Copy from a raw source memory into a memory descriptor. More... | |
| t_status | proc_data_clear (t_proc *proc) |
| Reset process plan information to default system specific values. More... | |
| t_status | proc_data_setName (t_char *name, t_proc *proc) |
| Set the name of the new process. More... | |
| t_status | proc_data_setUser (t_uid uid, t_proc *proc) |
| Change the current process User ID. More... | |
| t_status | proc_data_setGroup (t_gid gid, t_proc *proc) |
| Change the current process Group ID. More... | |
| t_status | proc_data_setCmdLine (t_size size, char *array[], t_proc *proc) |
| Fills a process data structure with the execution command line. More... | |
| t_status | proc_data_setEnvironment (t_size size, char *array[], t_proc *proc) |
| Fills a process data structure with the new process environment. More... | |
| t_status | proc_data_getName (t_proc *proc, t_char **name) |
| Get the name of the planned process. More... | |
| t_status | proc_data_getCmdLine (t_proc *proc, t_size *nargs, char ***args) |
| Obtains the command line argument list. More... | |
| t_status | proc_data_getEnvironment (t_proc *proc, t_size *nargs, char ***environ) |
| Fills a process data structure with the new process environment. More... | |
| t_status | proc_data_getPID (t_proc *proc, t_pid *pid) |
| Retrieve the process ID from the process type. More... | |
| t_status | proc_data_getUser (t_proc *proc, t_uid *uid) |
| Retrieve the User ID from the process type. More... | |
| t_status | proc_data_getGroup (t_proc *proc, t_gid *gid) |
| Retrieve the User ID from the process type. More... | |
| t_status | proc_resource_getVirtualMemory (t_pid pid, t_size *size) |
| Get the size of the process virtual memory. More... | |
| t_status | proc_resource_getRealMemory (t_pid pid, t_size *size) |
| Get the size of the process real memory, i.e. ram usage. More... | |
| t_status | proc_resource_getCPU (t_pid pid, t_size *size) |
| Get the process CPU consumption (summary of user and system) More... | |
| t_status | proc_resource_getThreads (t_pid pid, t_size *number) |
| Get the number of process kernel threads / LWPs. More... | |
| t_status | proc_signal_supported (int *supportLevel) |
| Are signals supported by the OSAPI library? More... | |
| t_status | proc_signal_clearAll (void) |
| Unblock of all signals. If there are any blocked signal, these will be unblocked. More... | |
| t_status | proc_signal_send (t_pid pid, t_signal sigNumber) |
| Send a signal to a process The signal identifier will be the standard POSIX constant SIG_xxx. More... | |
| t_status | proc_signal_sendByName (t_pid pid, t_char *sigName) |
| Send a signal to a process The signal identifier will be the standard POSIX name "SIG_xxx". More... | |
| t_status | proc_signal_setHandler (t_signal sigNumber, t_sig_func sigFunc) |
| Set a signal handler function for a given signal number. More... | |
| t_status | proc_signal_setHandlerByName (t_char *sigName, t_sig_func sigFunc) |
| Set a signal handler function for a given signal name. More... | |
| t_status | proc_signal_resetHandler (t_signal sigNumber) |
| Reset a signal to the default behavior. More... | |
| t_status | proc_signal_resetHandlerByName (t_char *sigName) |
| Reset a signal to the default behavior. More... | |
| t_status | proc_signal_getName (t_signal sigNumber, t_char **sigName) |
| Get the name of a signal The function maps a signal number to a signal name. More... | |
| t_status | proc_signal_getNumber (t_char *sigName, t_signal *sigNumber) |
| Get the name of a signal The function maps a signal number to a signal name. More... | |
| t_status | proc_time_getStart (t_pid pid, t_time *start) |
| Get the start time of a process. More... | |
The process management module.
Allocate memory in the HEAP using a buffer.
| [in] | bufsize | - Size of the buffer to allocate |
| [out] | buffer | - Address of the buffer memory |
Copy two buffer memories Buffers cannot overlap in any way (this generates an error)
| [in] | source | - Address of the source buffer |
| [out] | target | - Address of the target/destination buffer |
Copy from a buffer to a naked/raw memory location.
| [in] | source | - Address of the source buffer |
| [in] | targetSize | - Size of destination memory buffer |
| [out] | target | - Raw destination memory address |
Copy from a naked/raw memory into a buffer memory.
| [in] | source | - Raw source memory address |
| [in] | sourceSize | - Size of the source memory content |
| [out] | target | - Address of the target/destination buffer |
Deallocate buffer memory.
| [in] | buffer | - Address of the buffer memory |
Get the buffer capacity.
| [in] | buffer | - Address of the buffer memory |
| [out] | size | - Buffer capacity |
Get the buffer (naked) memory address.
| [in] | buffer | - Address of the buffer memory |
| [out] | data | - Address of the managed naked/raw HEAP memory |
Get the current buffer memory usage.
| [in] | buffer | - Address of the buffer memory |
| [out] | size | - Current memory usage |
Resize buffer memory.
| [in] | bufsize | - New size of the buffer |
| [out] | buffer | - Address of the buffer memory |
Set the current buffer memory usage.
| [in] | size | - New current memory usage |
| [out] | buffer | - Address of the buffer memory |
| t_status proc_data_clear | ( | t_proc * | proc | ) |
Reset process plan information to default system specific values.
| [in,out] | proc | - process type |
Obtains the command line argument list.
| [in] | proc | - Process type |
| [out] | nargs | - The number of command line arguments |
| [out] | args | - The command line arguments |
Fills a process data structure with the new process environment.
| [in] | proc | - Process type |
| [out] | nargs | - The number of environment arguments |
| [out] | environ | - The environment arguments |
| t_status proc_data_getGroup | ( | t_proc * | proc, |
| t_gid * | gid | ||
| ) |
Retrieve the User ID from the process type.
| [in] | proc | - Process type |
| [out] | gid | - User ID |
Get the name of the planned process.
| [in] | proc | - process type |
| [out] | name | - Process name |
| t_status proc_data_getPID | ( | t_proc * | proc, |
| t_pid * | pid | ||
| ) |
Retrieve the process ID from the process type.
| [in] | proc | - Process type |
| [out] | pid | - process ID |
| t_status proc_data_getUser | ( | t_proc * | proc, |
| t_uid * | uid | ||
| ) |
Retrieve the User ID from the process type.
| [in] | proc | - Process type |
| [out] | uid | - User ID |
Fills a process data structure with the execution command line.
| [in] | size | - Number of elements of the (C-String) array |
| [in] | array | - The command line array |
| [out] | proc | - The process type |
Fills a process data structure with the new process environment.
| [in] | size | - Number of elements of the C-String array |
| [in] | array | - The environment array |
| [out] | proc | - The process type |
| t_status proc_data_setGroup | ( | t_gid | gid, |
| t_proc * | proc | ||
| ) |
Change the current process Group ID.
| [in] | gid | - New Group ID |
| [out] | proc | - process type |
Set the name of the new process.
| [in] | name | - Process name |
| [out] | proc | - process type |
| t_status proc_data_setUser | ( | t_uid | uid, |
| t_proc * | proc | ||
| ) |
Change the current process User ID.
| [in] | uid | - New User ID |
| [out] | proc | - process type |
| t_status proc_id_clear | ( | t_pid * | pid | ) |
Reset ID to a default (and possible non usable) value.
| [in,out] | pid | - The process ID variable to reset |
| t_status proc_id_copy | ( | t_pid | source, |
| t_pid * | target | ||
| ) |
Copy a source process ID to a target variable.
| [in] | source | - The process ID to copy |
| [out] | target | - The copied process ID |
Convert a C-String into a process ID.
| [in] | string | - The C-String to be converted into a process ID |
| [out] | pid | - The process ID obtained from the C-String |
| t_status proc_id_get | ( | t_pid * | pid | ) |
Get the current process ID.
| [out] | pid | - The process ID |

Get list of process IDs of children processes.
| [in] | pid | - The process ID for which children are obtained |
| [in] | tsize | - The size of the array |
| [out] | csize | - The number of found children processes |
| [out] | array | - List of process IDs of children |
| t_status proc_id_getGroup | ( | t_pid | pid, |
| t_gid * | gid | ||
| ) |
Get the Group ID of the current process.
| [in] | pid | - Target Process ID |
| [out] | gid | - User ID |
| t_status proc_id_getGroupMembers | ( | t_pid | pgid, |
| t_size | initialMembers, | ||
| t_size * | currentMembers, | ||
| t_pid(*) | idList[] | ||
| ) |
Get the List of IDs of Process Group members.
| [in] | pgid | - The target Process Group ID for which to retrieve the member IDs |
| [in] | initialMembers | - Number of found members of group / Size of the array |
| [out] | currentMembers | - Number of members discovered during the execution of the operations / Current array size |
| [out] | idList | - List with process IDs of group members |
| t_status proc_id_getParent | ( | t_pid | pid, |
| t_pid * | ppid | ||
| ) |
Get the parent process ID.
| [in] | pid | - The process ID for which the parent ID process is required |
| [out] | ppid | - The parent process ID |
| t_status proc_id_getSession | ( | t_pid | pid, |
| t_pid * | sid | ||
| ) |
Get Session Identifier.
| [in] | pid | - Target Process ID |
| [out] | sid | - Session ID |
| t_status proc_id_getSessionMembers | ( | t_pid | sid, |
| t_size | initialMembers, | ||
| t_size * | currentMembers, | ||
| t_pid(*) | idList[] | ||
| ) |
Get the List of IDs of Process Session members.
| [in] | sid | - The target Process Session ID for which to retrieve the member IDs |
| [in] | initialMembers | - Number of found members of group / Size of the array |
| [out] | currentMembers | - Number of members discovered during the execution of the operations / Current array size |
| [out] | idList | - List with process IDs of session members |
| t_status proc_id_getUser | ( | t_pid | pid, |
| t_uid * | uid | ||
| ) |
Get the User ID of the given process.
| [in] | pid | - Target Process ID |
| [out] | uid | - User ID |
| t_status proc_id_setSession | ( | void | ) |
Create a new Session. A new session is created with the current PID as being the Session ID.
Convert a process ID to a C-String format.
| [in] | pid | - The process ID to convert to string |
| [in] | size | - Size of the output string |
| [out] | string | - Process ID in C-String format |
| t_status proc_info_get | ( | t_pid | pid, |
| t_proc_info * | info | ||
| ) |
Obtain raw process information This is the function call that allows clients to make a single call and obtain all raw process data.
| [in] | pid | - Process ID |
| [out] | info | - Process information |

| t_status proc_info_getCPUConsumption | ( | t_proc_info * | info, |
| t_size * | size | ||
| ) |
Extract the process CPU consumption (summary of user and system) from the process information.
| [in] | info | - Process information |
| [out] | size | - Percentage of consumed process CPU |
| t_status proc_info_getRealMemory | ( | t_proc_info * | info, |
| t_size * | size | ||
| ) |
Extract the size of the process real memory, i.e. ram usage, from the process information.
| [in] | info | - Process information |
| [out] | size | - Real memory size in bytes |
| t_status proc_info_getStartTime | ( | t_proc_info * | info, |
| t_time * | start | ||
| ) |
Extract the process start time from the process information.
| [in] | info | - Process information |
| [out] | start | - Process start time |
| t_status proc_info_getThreads | ( | t_proc_info * | info, |
| t_size * | number | ||
| ) |
Extract the number of process kernel threads / LWPs from the process information.
| [in] | info | - Process information |
| [out] | number | - Number of process threads |
| t_status proc_info_getVirtualMemory | ( | t_proc_info * | info, |
| t_size * | size | ||
| ) |
Extract the size of the process virtual memory from the process information.
| [in] | info | - Process information |
| [out] | size | - Virtual memory size in bytes |
| t_status proc_instance_clone | ( | int * | isChild | ) |
Clone the current process.
| [out] | isChild | - Child or father |
| t_status proc_instance_create | ( | t_proc * | proc | ) |
Create a new process instance.
| [in,out] | proc | - process type |
| t_status proc_instance_destroy | ( | t_pid | pid, |
| int | forced | ||
| ) |
Terminate a running process.
| [in] | pid | - The process to terminate |
| [in] | forced | - Normal or forced termination |
| t_status proc_instance_getChildStatus | ( | t_pid * | pid, |
| t_proc_status * | status | ||
| ) |
Obtain status of a child process.
| [in] | pid | - Process ID |
| [out] | status | - Status of child process |
Obtain the number of children processes.
| [in] | pid | - Get descendants of this process |
| [out] | number | - Number of children processes |
Obtain the number of process group members.
| [in] | pgid | - The process group id |
| [out] | number | - Number of process group members |
Obtain the number of process session members.
| [in] | sid | - The session id |
| [out] | number | - Number of process group members |
| t_status proc_instance_getState | ( | t_pid | pid, |
| int * | state | ||
| ) |
Obtain the state of a given process.
| [in] | pid | - Process ID to check |
| [out] | state | - The corresponding process state |
| t_status proc_instance_getStatus | ( | t_pid | pid, |
| t_proc_status * | status | ||
| ) |
Obtain a status of a process.
| [in] | pid | - Process ID |
| [out] | status | - Status of child process |
| t_status proc_instance_isRunning | ( | t_pid | pid | ) |
Is a process instance running.
| [in] | pid | - Process ID to check |
| t_status proc_instance_suspendExecution | ( | void | ) |
Suspend the execution of the current thread until an event occurs such as a signal in UNIX.
| OSAPI_NORETURN void proc_instance_terminate | ( | int | code | ) |
Terminate the current process. It always succeeds.
| [in] | code | - Exit status code |
Get a list of name and version information for each process loaded/shared library.
| [in] | maxlibs | - Maximum size of the return arrays, i.e. name and version |
| [out] | info | - Array with name and version of loaded libraries |
Get the number of shared libraries loaded in the process.
| [out] | maxlibs | - Number of currently loaded libraries |
Get the Release information of the named library.
| [in] | name | - Name of library to search |
| [in] | max | - Max. size of the output string |
| [out] | release | - The release version for the named library |
| t_status proc_library_load | ( | char * | path, |
| char * | options[], | ||
| t_library * | lib | ||
| ) |
Load a library into the current process.
| [in] | path | - Path to the library |
| [in] | options | - C-String array with list of system specific options |
| [out] | lib | - library type |
| t_status proc_library_supported | ( | void | ) |
Is the load/unload of libraries supported in the platform?
| t_status proc_library_unload | ( | t_library | lib | ) |
Unload a library from the current process.
| [in] | lib | - library type |
Allocate memory in the HEAP for a list of items The "list" is implemented as an array of bytes.
| [in] | nItems | - Number of items for the memory allocation |
| [in] | itemSize | - Size, in bytes, of each item |
| [out] | list | - List descriptor |
Copy two list memories List cannot overlap in any way (this generates an error)
| [in] | source | - Address of the source list |
| [out] | target | - Address of the target/destination list |
| t_status proc_list_copyFrom | ( | const t_list * | source, |
| t_size | sourceItem, | ||
| t_size | targetSize, | ||
| void * | target | ||
| ) |
Copy from a list item to a naked/raw memory location.
| [in] | source | - Address of the source buffer |
| [in] | sourceItem | - Item number to copy |
| [in] | targetSize | - Size of destination memory buffer |
| [out] | target | - Raw destination memory address |
| t_status proc_list_copyTo | ( | const void * | source, |
| t_size | sourceSize, | ||
| t_size | targetItem, | ||
| t_list * | target | ||
| ) |
Copy from a naked/raw memory into a list item.
| [in] | source | - Raw source memory address |
| [in] | sourceSize | - Size of the source memory content |
| [in] | targetItem | - Item number to copy into |
| [out] | target | - List descriptor |
Deallocate list.
| [in] | list | - List descriptor |
Get the list capacity in terms of allocated items.
| [in] | list | - List descriptor |
| [out] | size | - List capacity |
Get the memory address of a given data item (of a list)
| [in] | list | - List descriptor |
| [in] | item | - Item number for which the address is needed |
| [out] | data | - Address of the managed naked/raw HEAP memory |
Get the required list capacity in terms of allocated items The required capacity is needed in case a list is not big enough to hold all elements.
| [in] | list | - List descriptor |
| [out] | size | - List required capacity |
Get the current list usage in terms of number of items.
| [in] | list | - List descriptor |
| [out] | size | - List usage size |
Check if the list can store N items.
| [in] | list | - List descriptor |
| [in] | size | - Required capacity from list |
Resize a list of items.
| [in] | nItems | - New number of items |
| [out] | list | - List descriptor |
Set the current list required capacity The required capacity is needed in case a list is not big enough to hold all elements.
| [in] | size | - New list required capacity |
| [in,out] | list | - List descriptor |
Set the current list usage.
| [in] | size | - New list usage size |
| [in,out] | list | - List descriptor |
Allocate memory in the process heap.
| [in] | size | - Required memory size in bytes |
| [in] | type | - How likely is the memory to be reallocated? Hint to the memory manager |
| [out] | mem | - Memory descriptor |
Copy between two memories using memory descriptors.
| [in] | source | - Memory to be copied |
| [out] | target | - Destination of the copy |
Copy from a memory descriptor into a raw memory.
| [in] | source | - Memory to be copied |
| [in] | targetSize | - Size of the allocated memory destination |
| [out] | target | - Destination of the copy |
Copy from a raw source memory into a memory descriptor.
| [in] | source | - Raw memory to be copied |
| [in] | sourceSize | - Size of the allocated source memory |
| [out] | target | - Destination of the copy |
Deallocate a previously allocated heap memory block.
| [in] | location | - Address of the new memory block |
Retrieve the total allocated memory size, in bytes.
| [in] | mem | - Memory descriptor |
| [out] | size | - Currently allocated memory size in bytes for the provided descriptor |
Get the raw memory address for the given memory descriptor.
| [in] | mem | - Memory descriptor |
| [out] | data | - Raw memory address (data contents) |
Resize the previously allocated memory in the process heap.
| [in] | newSize | - New memory size in bytes |
| [in,out] | mem | - Memory descriptor |
| t_status proc_module_supported | ( | void | ) |
Is PROC module supported in the platform.
Allocate memory in the process heap.
| [in] | size | - Required memory size in bytes |
| [in] | type | - How likely is the memory to be reallocated? Hint to the memory manager |
| [out] | mem | - Memory pointer |
| t_status proc_rawMemory_deallocate | ( | void * | mem | ) |
Deallocate a previously allocated heap memory block.
| [in] | mem | - Address of the memory to deallocate |
Resize the previously allocated memory in the process heap.
| [in] | newSize | - New memory size in bytes |
| [in,out] | mem | - Memory pointer |
Get the process CPU consumption (summary of user and system)
| [in] | pid | - Process ID |
| [out] | size | - Percentage of consumed process CPU |

Get the size of the process real memory, i.e. ram usage.
| [in] | pid | - Process ID |
| [out] | size | - Real memory size in bytes |

Get the number of process kernel threads / LWPs.
| [in] | pid | - Process ID |
| [out] | number | - Number of process threads |

Get the size of the process virtual memory.
| [in] | pid | - Process ID |
| [out] | size | - Virtual memory size in bytes |

| t_status proc_signal_clearAll | ( | void | ) |
Unblock of all signals. If there are any blocked signal, these will be unblocked.
Get the name of a signal The function maps a signal number to a signal name.
| [in] | sigNumber | - The POSIX signal constant (e.g. SIG_TERM) |
| [out] | sigName | - The POSIX signal name (e.g. "SIG_TERM") |
Get the name of a signal The function maps a signal number to a signal name.
| [in] | sigName | - The POSIX signal name (e.g. "SIG_TERM") |
| [out] | sigNumber | - The signal number |
| t_status proc_signal_resetHandler | ( | t_signal | sigNumber | ) |
Reset a signal to the default behavior.
| [in] | sigNumber | - The POSIX signal constant (e.g. SIG_TERM) |
Reset a signal to the default behavior.
| [in] | sigName | - The POSIX signal name (e.g. "SIG_TERM") |
| t_status proc_signal_send | ( | t_pid | pid, |
| t_signal | sigNumber | ||
| ) |
Send a signal to a process The signal identifier will be the standard POSIX constant SIG_xxx.
| [in] | pid | - Target Process ID |
| [out] | sigNumber | - Signal identifier |
Send a signal to a process The signal identifier will be the standard POSIX name "SIG_xxx".
| [in] | pid | - Target Process ID |
| [out] | sigName | - Signal name |
| t_status proc_signal_setHandler | ( | t_signal | sigNumber, |
| t_sig_func | sigFunc | ||
| ) |
Set a signal handler function for a given signal number.
| [in] | sigNumber | - The POSIX signal constant (e.g. SIG_TERM) |
| [out] | sigFunc | - The function name/address |
Set a signal handler function for a given signal name.
| [in] | sigName | - The POSIX signal name (e.g. "SIG_TERM") |
| [out] | sigFunc | - The function name/address |
| t_status proc_signal_supported | ( | int * | supportLevel | ) |
Are signals supported by the OSAPI library?
| [out] | supportLevel | - The level of support may vary, for instance, standard POSIX signals may be supported but not real time signals. |
Get the start time of a process.
| [in] | pid | - Process ID |
| [out] | start | - Process start time |


Get the current process Unique ID A Process Unique ID is a unique incarnation of a process instance, i.e. no two processes will have the same UPID in the same node.
| [out] | upid | - The process Unique ID |
