mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 04:20:18 +01:00
mapi: use c11 call_once() instead of pthread_once()
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
18db13f586
commit
262cd683e2
1 changed files with 3 additions and 2 deletions
|
|
@ -29,6 +29,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "c11/threads.h"
|
||||
#include "glapi/glapi_priv.h"
|
||||
#include "u_execmem.h"
|
||||
|
||||
|
|
@ -336,7 +337,7 @@ void
|
|||
init_glapi_relocs_once( void )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD) || defined(GLX_USE_TLS)
|
||||
static pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||
pthread_once( & once_control, init_glapi_relocs );
|
||||
static once_flag flag = ONCE_FLAG_INIT;
|
||||
call_once(&flag, init_glapi_relocs);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue