mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Suppress data race reports for the data race triggered by Darwin's pthread_once() implementation such that the pth_once test also passes on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10616
This commit is contained in:
parent
5b7cbb23e0
commit
8235a379dd
@ -453,6 +453,24 @@ PTH_FUNC(int, pthreadZucancelZa, pthread_t pt_thread)
|
||||
return ret;
|
||||
}
|
||||
|
||||
// pthread_once
|
||||
PTH_FUNC(int, pthreadZuonceZa, // pthread_once*
|
||||
pthread_once_t *once_control, void (*init_routine)(void))
|
||||
{
|
||||
int ret;
|
||||
OrigFn fn;
|
||||
VALGRIND_GET_ORIG_FN(fn);
|
||||
/*
|
||||
* Ignore any data races triggered by the implementation of pthread_once().
|
||||
* Necessary for Darwin. This is not necessary for Linux but doesn't have
|
||||
* any known adverse effects.
|
||||
*/
|
||||
DRD_IGNORE_VAR(once_control);
|
||||
CALL_FN_W_WW(ret, fn, once_control, init_routine);
|
||||
DRD_STOP_IGNORING_VAR(once_control);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// pthread_mutex_init
|
||||
PTH_FUNC(int, pthreadZumutexZuinit,
|
||||
pthread_mutex_t *mutex,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user