Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update mmalloc to compile with paranoid flags used in simgrid
[simgrid.git] / src / xbt / xbt_os_thread.c
index f827c4a..55be50b 100644 (file)
@@ -1,11 +1,9 @@
-/* $Id$ */
-
 /* xbt_os_thread -- portability layer over the pthread API                  */
 /* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD     */
 /* in SG, when using CONTEXT_UCONTEXT, xbt_os_thread_stub is used instead   */
 
-/* Copyright 2006,2007 Malek Cherier, Martin Quinson
- * All right reserved.                                                      */
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -118,6 +116,10 @@ void xbt_os_thread_mod_exit(void)
 #ifndef HAVE_SEM_WAIT
   xbt_os_mutex_destroy(next_sem_ID_lock);
 #endif
+
+  /* Restore the default exception setup */
+  __xbt_ex_ctx = &__xbt_ex_ctx_default;
+  __xbt_ex_terminate = &__xbt_ex_terminate_default;
 }
 
 static void *wrapper_start_routine(void *s)