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

atomic int structure 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 val
 Integer value to be atomically manipulated. More...
 
int padding2 [8]
 Pad to avoid false sharing, cache aliasing. More...
 

Detailed Description

atomic int structure with padding to prevent false sharing

Definition at line 178 of file threads.h.

Field Documentation

◆ lock

rt_mutex_t atomic_int_struct::lock

◆ padding1

int atomic_int_struct::padding1[8]

Pad to avoid false sharing, cache aliasing.

Definition at line 179 of file threads.h.

◆ padding2

int atomic_int_struct::padding2[8]

Pad to avoid false sharing, cache aliasing.

Definition at line 190 of file threads.h.

◆ val

int atomic_int_struct::val

Integer value to be atomically manipulated.

Definition at line 188 of file threads.h.

Referenced by rt_atomic_int_add_and_fetch(), rt_atomic_int_fetch_and_add(), rt_atomic_int_get(), rt_atomic_int_init(), and rt_atomic_int_set().


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