Browse Source

adress an tsan issue with _starpu_keys_initialized update that may not be seen by workers being launched

Olivier Aumage 8 years ago
parent
commit
50439ce0a3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/core/workers.c

+ 1 - 0
src/core/workers.c

@@ -1358,6 +1358,7 @@ int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
 	STARPU_PTHREAD_KEY_CREATE(&_starpu_worker_key, NULL);
 	STARPU_PTHREAD_KEY_CREATE(&_starpu_worker_set_key, NULL);
 	_starpu_keys_initialized = 1;
+	STARPU_WMB();
 
 	_starpu_build_tree();