}
static void __kmp_atfork_parent(void) {
- __kmp_release_bootstrap_lock(&__kmp_initz_lock);
__kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
+ __kmp_release_bootstrap_lock(&__kmp_initz_lock);
}
/* Reset the library so execution in the child starts "all over again" with
allocated by parent, just abandon it to be safe. */
static void __kmp_atfork_child(void) {
__kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
+ __kmp_release_bootstrap_lock(&__kmp_initz_lock);
/* TODO make sure this is done right for nested/sibling */
// ATT: Memory leaks are here? TODO: Check it and fix.
/* KMP_ASSERT( 0 ); */
}
#endif // KMP_AFFINITY_SUPPORTED
- __kmp_init_runtime = FALSE;
#if KMP_USE_MONITOR
__kmp_init_monitor = 0;
#endif
__kmp_itt_reset(); // reset ITT's global state
#endif /* USE_ITT_BUILD */
+ __kmp_serial_initialize();
+
/* This is necessary to make sure no stale data is left around */
/* AC: customers complain that we use unsafe routines in the atfork
handler. Mathworks: dlsym() is unsafe. We call dlsym and dlopen