Tachyon (current)  Current Main Branch
Data Fields
barrier_struct Struct Reference

barrier sync object with padding to prevent false sharing More...

#include <threads.h>

Data Fields

int padding1 [8]
 Pad to avoid false sharing, cache aliasing. More...
 
rt_mutex_t lock
 Mutex lock for the structure. More...
 
int n_clients
 Number of threads to wait for at barrier. More...
 
int n_waiting
 Number of currently waiting threads. More...
 
int phase
 Flag to separate waiters from fast workers. More...
 
int sum
 Sum of arguments passed to barrier_wait. More...
 
int result
 Answer to be returned by barrier_wait. More...
 
rt_cond_t wait_cv
 Clients wait on condition variable to proceed. More...
 
int padding2 [8]
 Pad to avoid false sharing, cache aliasing. More...
 

Detailed Description

barrier sync object with padding to prevent false sharing

Definition at line 195 of file threads.h.

Field Documentation

◆ lock

rt_mutex_t barrier_struct::lock

Mutex lock for the structure.

Definition at line 197 of file threads.h.

Referenced by rt_thread_barrier(), rt_thread_barrier_destroy(), rt_thread_barrier_init(), and rt_thread_barrier_init_proc_shared().

◆ n_clients

int barrier_struct::n_clients

Number of threads to wait for at barrier.

Definition at line 198 of file threads.h.

Referenced by rt_thread_barrier(), rt_thread_barrier_init(), and rt_thread_barrier_init_proc_shared().

◆ n_waiting

int barrier_struct::n_waiting

Number of currently waiting threads.

Definition at line 199 of file threads.h.

Referenced by rt_thread_barrier(), rt_thread_barrier_init(), and rt_thread_barrier_init_proc_shared().

◆ padding1

int barrier_struct::padding1[8]

Pad to avoid false sharing, cache aliasing.

Definition at line 196 of file threads.h.

◆ padding2

int barrier_struct::padding2[8]

Pad to avoid false sharing, cache aliasing.

Definition at line 204 of file threads.h.

◆ phase

int barrier_struct::phase

Flag to separate waiters from fast workers.

Definition at line 200 of file threads.h.

Referenced by rt_thread_barrier(), rt_thread_barrier_init(), and rt_thread_barrier_init_proc_shared().

◆ result

int barrier_struct::result

Answer to be returned by barrier_wait.

Definition at line 202 of file threads.h.

Referenced by rt_thread_barrier().

◆ sum

int barrier_struct::sum

Sum of arguments passed to barrier_wait.

Definition at line 201 of file threads.h.

Referenced by rt_thread_barrier(), rt_thread_barrier_init(), and rt_thread_barrier_init_proc_shared().

◆ wait_cv

rt_cond_t barrier_struct::wait_cv

Clients wait on condition variable to proceed.

Definition at line 203 of file threads.h.

Referenced by rt_thread_barrier(), rt_thread_barrier_destroy(), rt_thread_barrier_init(), and rt_thread_barrier_init_proc_shared().


The documentation for this struct was generated from the following file: