libparanut
A Hardware Abstraction Layer for ParaNut Architectures.
|
Functions for using the linked mode. More...
PN_CID | pn_begin_linked_gm (PN_CMSK *coremask_array, PN_NUMG array_size, char flags) |
int | pn_end_linked (void) |
Ends linked execution. More... | |
PN_CID | pn_run_linked_gm (PN_CMSK *coremask_array, PN_NUMG array_size, void *function, void *args) |
NOT IMPLEMENTED YET, run a function in linked mode using group mask. More... | |
PN_CID | pn_run_linked (PN_NUMC numcores, void(*func)(), void *args) |
Starts a given function in linked mode. More... | |
#define | PN_BEGIN_LINKED(NUMCORES) |
Call pn_begin_linked with the __buitlin_frame_address(0). More... | |
#define | PN_BEGIN_LINKED_M(COREMASK) |
Call pn_begin_linked_m with the __buitlin_frame_address(0). More... | |
#define | PN_END_LINKED() pn_end_linked() |
Call pn_end_linked. More... | |
#define | PN_BEGIN_LINKED(NUMCORES) |
Call pn_begin_linked with the __buitlin_frame_address(0). More... | |
#define | PN_BEGIN_LINKED_M(COREMASK) |
Call pn_begin_linked_m with the __buitlin_frame_address(0). More... | |
#define | PN_END_LINKED() pn_end_linked() |
Call pn_end_linked. More... | |
Functions for using the linked mode.
Also see Modes.
#define PN_BEGIN_LINKED | ( | NUMCORES | ) |
Call pn_begin_linked with the __buitlin_frame_address(0).
Calls pn_begin_linked with the gcc built-in function __buitlin_frame_address(0) to copy only the current stack frame.
#define PN_BEGIN_LINKED | ( | NUMCORES | ) |
Call pn_begin_linked with the __buitlin_frame_address(0).
Calls pn_begin_linked with the gcc built-in function __buitlin_frame_address(0) to copy only the current stack frame.
#define PN_BEGIN_LINKED_M | ( | COREMASK | ) |
Call pn_begin_linked_m with the __buitlin_frame_address(0).
Calls pn_begin_linked_m with the gcc built-in function __buitlin_frame_address(0) to copy only the current stack frame.
#define PN_BEGIN_LINKED_M | ( | COREMASK | ) |
Call pn_begin_linked_m with the __buitlin_frame_address(0).
Calls pn_begin_linked_m with the gcc built-in function __buitlin_frame_address(0) to copy only the current stack frame.
#define PN_END_LINKED | ( | ) | pn_end_linked() |
Call pn_end_linked.
Calls pn_end_linked. Is only defined to have aesthetically matching pair with the PN_BEGIN_LINKED and PN_BEGIN_LINKED_M macros.
#define PN_END_LINKED | ( | ) | pn_end_linked() |
Call pn_end_linked.
Calls pn_end_linked. Is only defined to have aesthetically matching pair with the PN_BEGIN_LINKED and PN_BEGIN_LINKED_M macros.
int pn_end_linked | ( | void | ) |
Ends linked execution.
Halts all CoPUs that are currently linked together, effectively ending the linked execution. Will fail if there are no cores linked together.
See documentation of Modes for more information.
Can be executed on CoPU, but will do nothing then.
Starts a given function in linked mode.
Sets numcores-1 CoPUs to Mode 1 (linked Mode) and runs the given function. After completing the function will return 0 in case of success. This function will return an error (PN_ERR_MATCH) if the CoPUs are not all halted. The referenced function should have two attributes: void *args, PN_CID cid. Argument 1 is defined by the user, while argument 2 "cid" contains the ID of the executing Core.
Cannot be executed on CoPU. Cannot be mixed with threaded mode or other linked mode functions, until pn_end_linked() is called.
[in] | numcores | is the number of cores that shall be linked together. A value of 0 or 1 will return an error (PN_ERR_PARAM) to aid debugging. |
[in] | func | functionpointer to the function to be executed in linked mode. The function may expect a single argument in the form of a void pointer. Will return PN_ERR_PARAM if NULL. |
[in] | args | contains the void pointer to be handed to the function. May also be NULL. |
Sets numcores-1 CoPUs to Mode 1 (linked Mode) and runs the given function. After completing the function will return 0 in case of success. This function will return an error (PN_ERR_MATCH) if the CoPUs are not all halted. The referenced function should have two attributes: void *args, PN_CID cid. Argument 1 is defined by the user, while argument 2 "cid" contains the ID of the executing Core.
Cannot be executed on CoPU. Cannot be mixed with threaded mode or other linked mode functions, until pn_end_linked() is called.
[in] | numcores | is the number of cores that shall be linked together. A value of 0 or 1 will return an error (PN_ERR_PARAM) to aid debugging. |
[in] | func | functionpointer to the function to be executed in linked mode. The function may expect a single argument in the form of a void pointer. Will return PN_ERR_PARAM if NULL. |
[in] | args | contains the void pointer to be handed to the function. May also be NULL. |
PN_CID pn_run_linked_gm | ( | PN_CMSK * | coremask_array, |
PN_NUMG | array_size, | ||
void * | function, | ||
void * | args | ||
) |
NOT IMPLEMENTED YET, run a function in linked mode using group mask.