Files | |
file | mars_task_barrier_types.h |
MARS Task Barrier Types. | |
file | mars_task_barrier.h |
[host] MARS Task Barrier API | |
file | mars_task_barrier.h |
[MPU] MARS Task Barrier API | |
Data Structures | |
struct | mars_task_barrier |
MARS task barrier structure. More... | |
Defines | |
#define | MARS_TASK_BARRIER_SIZE 128 |
Size of task barrier structure. | |
#define | MARS_TASK_BARRIER_ALIGN 128 |
Alignment of task barrier structure. | |
#define | MARS_TASK_BARRIER_ALIGN_MASK 0x7f |
Alignment mask of task barrier structure. | |
#define | MARS_TASK_BARRIER_WAIT_MAX 53 |
Maximum tasks allowed for single barrier. | |
Functions | |
int | mars_task_barrier_initialize (struct mars_context *mars, struct mars_task_barrier *barrier, uint32_t total) |
[host] Initializes a task barrier. | |
int | mars_task_barrier_initialize (uint64_t barrier_ea, uint32_t total) |
[MPU] Initializes a task barrier. | |
int | mars_task_barrier_notify (uint64_t barrier_ea) |
[MPU] Notifies a task barrier. | |
int | mars_task_barrier_wait (uint64_t barrier_ea) |
[MPU] Waits on a task barrier. (Blocking) | |
int | mars_task_barrier_try_wait (uint64_t barrier_ea) |
[MPU] Waits on a task barrier. (Non-Blocking) | |
Variables | |
mars_task_barrier | MARS_TASK_BARRIER_ALIGN |
MARS task barrier structure. |
int mars_task_barrier_initialize | ( | struct mars_context * | mars, | |
struct mars_task_barrier * | barrier, | |||
uint32_t | total | |||
) |
[host] Initializes a task barrier.
[in] | mars | - pointer to initialized MARS context |
[out] | barrier | - pointer to barrier instance to initialize |
[in] | total | - number of notifies before barrier released |
int mars_task_barrier_initialize | ( | uint64_t | barrier_ea, | |
uint32_t | total | |||
) |
[MPU] Initializes a task barrier.
[out] | barrier_ea | - ea of barrier instance to initialize |
[in] | total | - number of notifies before barrier released |
int mars_task_barrier_notify | ( | uint64_t | barrier_ea | ) |
[MPU] Notifies a task barrier.
[in] | barrier_ea | - ea of initialized barrier instance |
int mars_task_barrier_wait | ( | uint64_t | barrier_ea | ) |
[MPU] Waits on a task barrier. (Blocking)
[in] | barrier_ea | - ea of initialized barrier instance |
int mars_task_barrier_try_wait | ( | uint64_t | barrier_ea | ) |
[MPU] Waits on a task barrier. (Non-Blocking)
[in] | barrier_ea | - ea of initialized barrier instance |
MARS task barrier structure.
An instance of this structure must be created when using any of the MARS task barrier API.
If allocating a memory area for this structure, make sure to allocate a memory area that is aligned to MARS_TASK_BARRIER_ALIGN bytes and of size MARS_TASK_BARRIER_SIZE bytes.