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 <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 61 of file ThreadAPI.cpp.

62{
63 //The current llvm-gcc puts in the \01.
64 {"pthread_create", ThreadAPI::TD_FORK},
65 {"apr_thread_create", ThreadAPI::TD_FORK},
66 {"pthread_join", ThreadAPI::TD_JOIN},
67 {"\01_pthread_join", ThreadAPI::TD_JOIN},
68 {"pthread_cancel", ThreadAPI::TD_JOIN},
69 {"pthread_mutex_lock", ThreadAPI::TD_ACQUIRE},
70 {"pthread_rwlock_rdlock", ThreadAPI::TD_ACQUIRE},
71 {"sem_wait", ThreadAPI::TD_ACQUIRE},
72 {"_spin_lock", ThreadAPI::TD_ACQUIRE},
73 {"SRE_SplSpecLockEx", ThreadAPI::TD_ACQUIRE},
74 {"pthread_mutex_trylock", ThreadAPI::TD_TRY_ACQUIRE},
75 {"pthread_mutex_unlock", ThreadAPI::TD_RELEASE},
76 {"pthread_rwlock_unlock", ThreadAPI::TD_RELEASE},
77 {"sem_post", ThreadAPI::TD_RELEASE},
78 {"_spin_unlock", ThreadAPI::TD_RELEASE},
79 {"SRE_SplSpecUnlockEx", ThreadAPI::TD_RELEASE},
80// {"pthread_cancel", ThreadAPI::TD_CANCEL},
81 {"pthread_exit", ThreadAPI::TD_EXIT},
82 {"pthread_detach", ThreadAPI::TD_DETACH},
83 {"pthread_cond_wait", ThreadAPI::TD_COND_WAIT},
84 {"pthread_cond_signal", ThreadAPI::TD_COND_SIGNAL},
85 {"pthread_cond_broadcast", ThreadAPI::TD_COND_BROADCAST},
86 {"pthread_cond_init", ThreadAPI::TD_CONDVAR_INI},
87 {"pthread_cond_destroy", ThreadAPI::TD_CONDVAR_DESTROY},
88 {"pthread_mutex_init", ThreadAPI::TD_MUTEX_INI},
89 {"pthread_mutex_destroy", ThreadAPI::TD_MUTEX_DESTROY},
90 {"pthread_barrier_init", ThreadAPI::TD_BAR_INIT},
91 {"pthread_barrier_wait", ThreadAPI::TD_BAR_WAIT},
92
93 // Hare APIs
94 {"hare_parallel_for", ThreadAPI::HARE_PAR_FOR},
95
96 //This must be the last entry.
98};
@ TD_COND_SIGNAL
wait a condition
Definition ThreadAPI.h:64
@ TD_DETACH
wait for a thread to join
Definition ThreadAPI.h:57
@ TD_CONDVAR_INI
initial a mutex variable
Definition ThreadAPI.h:68
@ HARE_PAR_FOR
Barrier wait.
Definition ThreadAPI.h:72
@ TD_BAR_INIT
initial a mutex variable
Definition ThreadAPI.h:70
@ TD_ACQUIRE
detach a thread directly instead wait for it to join
Definition ThreadAPI.h:58
@ TD_MUTEX_DESTROY
initial a mutex variable
Definition ThreadAPI.h:67
@ TD_FORK
dummy type
Definition ThreadAPI.h:55
@ TD_CONDVAR_DESTROY
initial a mutex variable
Definition ThreadAPI.h:69
@ TD_JOIN
create a new thread
Definition ThreadAPI.h:56
@ TD_BAR_WAIT
Barrier init.
Definition ThreadAPI.h:71
@ TD_COND_BROADCAST
signal a condition
Definition ThreadAPI.h:65
@ TD_COND_WAIT
cancel a thread by another
Definition ThreadAPI.h:63
@ TD_TRY_ACQUIRE
acquire a lock
Definition ThreadAPI.h:59
@ TD_MUTEX_INI
broadcast a condition
Definition ThreadAPI.h:66
@ TD_RELEASE
try to acquire a lock
Definition ThreadAPI.h:60
@ TD_EXIT
release a lock
Definition ThreadAPI.h:61