Static Value-Flow Analysis
Loading...
Searching...
No Matches
Macros | Variables
ThreadAPI.cpp File Reference
#include "Util/ThreadAPI.h"
#include "Util/SVFUtil.h"
#include "Graphs/CallGraph.h"
#include "SVFIR/SVFIR.h"
#include "MemoryModel/PointerAnalysis.h"
#include <iostream>
#include <stdio.h>
#include <iomanip>

Go to the source code of this file.

Macros

#define THREADAPI_CPP_
 

Variables

static const ei_pair ei_pairs []
 

Macro Definition Documentation

◆ THREADAPI_CPP_

#define THREADAPI_CPP_

Definition at line 31 of file ThreadAPI.cpp.

Variable Documentation

◆ ei_pairs

const ei_pair ei_pairs[]
static

Definition at line 105 of file ThreadAPI.cpp.

106{
107 //The current llvm-gcc puts in the \01.
108 {"pthread_create", ThreadAPI::TD_FORK},
109 {"apr_thread_create", ThreadAPI::TD_FORK},
110 {"pthread_join", ThreadAPI::TD_JOIN},
111 {"\01_pthread_join", ThreadAPI::TD_JOIN},
112 {"pthread_cancel", ThreadAPI::TD_JOIN},
113 {"pthread_mutex_lock", ThreadAPI::TD_ACQUIRE},
114 {"pthread_rwlock_rdlock", ThreadAPI::TD_ACQUIRE},
115 {"sem_wait", ThreadAPI::TD_ACQUIRE},
116 {"_spin_lock", ThreadAPI::TD_ACQUIRE},
117 {"SRE_SplSpecLockEx", ThreadAPI::TD_ACQUIRE},
118 {"pthread_mutex_trylock", ThreadAPI::TD_TRY_ACQUIRE},
119 {"pthread_mutex_unlock", ThreadAPI::TD_RELEASE},
120 {"pthread_rwlock_unlock", ThreadAPI::TD_RELEASE},
121 {"sem_post", ThreadAPI::TD_RELEASE},
122 {"_spin_unlock", ThreadAPI::TD_RELEASE},
123 {"SRE_SplSpecUnlockEx", ThreadAPI::TD_RELEASE},
124// {"pthread_cancel", ThreadAPI::TD_CANCEL},
125 {"pthread_exit", ThreadAPI::TD_EXIT},
126 {"pthread_detach", ThreadAPI::TD_DETACH},
127 {"pthread_cond_wait", ThreadAPI::TD_COND_WAIT},
128 {"pthread_cond_signal", ThreadAPI::TD_COND_SIGNAL},
129 {"pthread_cond_broadcast", ThreadAPI::TD_COND_BROADCAST},
130 {"pthread_cond_init", ThreadAPI::TD_CONDVAR_INI},
131 {"pthread_cond_destroy", ThreadAPI::TD_CONDVAR_DESTROY},
132 {"pthread_mutex_init", ThreadAPI::TD_MUTEX_INI},
133 {"pthread_mutex_destroy", ThreadAPI::TD_MUTEX_DESTROY},
134 {"pthread_barrier_init", ThreadAPI::TD_BAR_INIT},
135 {"pthread_barrier_wait", ThreadAPI::TD_BAR_WAIT},
136
137 // Hare APIs
138 {"hare_parallel_for", ThreadAPI::HARE_PAR_FOR},
139
140 //This must be the last entry.
142};
@ TD_COND_SIGNAL
wait a condition
Definition ThreadAPI.h:65
@ TD_DETACH
wait for a thread to join
Definition ThreadAPI.h:58
@ TD_CONDVAR_INI
initial a mutex variable
Definition ThreadAPI.h:69
@ HARE_PAR_FOR
Barrier wait.
Definition ThreadAPI.h:73
@ TD_BAR_INIT
initial a mutex variable
Definition ThreadAPI.h:71
@ TD_ACQUIRE
detach a thread directly instead wait for it to join
Definition ThreadAPI.h:59
@ TD_MUTEX_DESTROY
initial a mutex variable
Definition ThreadAPI.h:68
@ TD_FORK
dummy type
Definition ThreadAPI.h:56
@ TD_CONDVAR_DESTROY
initial a mutex variable
Definition ThreadAPI.h:70
@ TD_JOIN
create a new thread
Definition ThreadAPI.h:57
@ TD_BAR_WAIT
Barrier init.
Definition ThreadAPI.h:72
@ TD_COND_BROADCAST
signal a condition
Definition ThreadAPI.h:66
@ TD_COND_WAIT
cancel a thread by another
Definition ThreadAPI.h:64
@ TD_TRY_ACQUIRE
acquire a lock
Definition ThreadAPI.h:60
@ TD_MUTEX_INI
broadcast a condition
Definition ThreadAPI.h:67
@ TD_RELEASE
try to acquire a lock
Definition ThreadAPI.h:61
@ TD_EXIT
release a lock
Definition ThreadAPI.h:62