Arax
-8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
Loading...
Searching...
No Matches
mutex/async.h
Go to the documentation of this file.
1
#ifndef ASYNC_HEADER
2
#define ASYNC_HEADER
3
#include "
core/arax_object.h
"
4
#include "pthread.h"
5
#include <semaphore.h>
6
7
struct
async_meta_s
8
{
9
// This padp is necessary as empty struct have sizeof == 1 in C++, but 0 in C
10
#ifndef __cplusplus
11
char
padd
;
12
#endif
13
};
14
15
typedef
struct
16
{
17
pthread_mutex_t mutex;
18
pthread_mutexattr_t attr;
19
}
20
async_completion_s
;
21
22
typedef
struct
23
{
24
sem_t
sem
;
25
}
async_semaphore_s
;
26
27
typedef
struct
28
{
29
async_completion_s
mutex;
30
pthread_cond_t
condition
;
31
pthread_condattr_t
c_attr
;
32
}
async_condition_s
;
33
34
#include "
async_api.h
"
35
#endif
// ifndef ASYNC_HEADER
arax_object.h
async_api.h
async_meta_s
Definition
ivshmem/async.h:11
async_meta_s::padd
char padd
Definition
mutex/async.h:11
async_completion_s
Definition
ivshmem/async.h:21
async_semaphore_s
Definition
ivshmem/async.h:31
async_semaphore_s::sem
sem_t sem
Definition
mutex/async.h:24
async_condition_s
Definition
ivshmem/async.h:40
async_condition_s::condition
pthread_cond_t condition
Definition
mutex/async.h:30
async_condition_s::c_attr
pthread_condattr_t c_attr
Definition
mutex/async.h:31
src
async
mutex
async.h
Generated by
1.13.2