Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless wrapper around pthread_atfork().
[simgrid.git] / src / xbt / xbt_os_thread.c
index 1a19ba5..dc72329 100644 (file)
 
 #include <pthread.h>
 
-#if defined(__FreeBSD__)
-#include "pthread_np.h"
-#define cpu_set_t cpuset_t
-#endif
-
 #include <limits.h>
 #include <semaphore.h>
 #include <errno.h>
@@ -49,19 +44,6 @@ typedef struct xbt_os_thread_ {
   pvoid_f_pvoid_t start_routine;
 } s_xbt_os_thread_t;
 
-/** Calls pthread_atfork() if present, and raise an exception otherwise.
- *
- * The only known user of this wrapper is mmalloc_preinit(), but it is absolutely mandatory there:
- * when used with tesh, mmalloc *must* be mutex protected and resistant to forks.
- * This functionality is the only way to get it working (by ensuring that the mutex is consistently released on forks)
- */
-
-/* this function is critical to tesh+mmalloc, don't mess with it */
-int xbt_os_thread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void))
-{
-  return pthread_atfork(prepare, parent, child);
-}
-
 /****** mutex related functions ******/
 typedef struct xbt_os_mutex_ {
   pthread_mutex_t m;