Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename the plugins from the command line, and document it
[simgrid.git] / src / xbt / xbt_os_thread.c
index f0d9358..3b58603 100644 (file)
@@ -2,7 +2,7 @@
 /* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD     */
 /* in SG, when using HAVE_UCONTEXT_CONTEXTS, xbt_os_thread_stub is used instead   */
 
-/* Copyright (c) 2007-2017. The SimGrid Team.
+/* Copyright (c) 2007-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -252,6 +252,12 @@ void xbt_os_thread_key_create(xbt_os_thread_key_t* key)
   xbt_assert(errcode==0 , "pthread_key_create failed");
 }
 
+void xbt_os_thread_key_destroy(xbt_os_thread_key_t key)
+{
+  int errcode = pthread_key_delete(key);
+  xbt_assert(errcode == 0, "pthread_key_delete failed");
+}
+
 void xbt_os_thread_set_specific(xbt_os_thread_key_t key, void* value)
 {
   int errcode = pthread_setspecific(key, value);