]> git.saurik.com Git - apple/libpthread.git/commitdiff
libpthread-218.60.3.tar.gz macos-10125 macos-10126 v218.60.3
authorApple <opensource@apple.com>
Wed, 7 Jun 2017 22:28:21 +0000 (22:28 +0000)
committerApple <opensource@apple.com>
Wed, 7 Jun 2017 22:28:21 +0000 (22:28 +0000)
src/pthread_atfork.c

index ec174df1d5907051f79ee38f5aa01cb5ae23f3d6..8c04ef6f192b5997cfff1cdffb7f4e41b8724b94 100644 (file)
@@ -112,7 +112,7 @@ _pthread_atfork_prepare_handlers(void)
 // Take pthread-internal locks.
 // Called last in libSystem_atfork_prepare().
 void
-_pthread_fork_prepare(void)
+_pthread_atfork_prepare(void)
 {
        pthread_globals_t globals = _pthread_globals();
 
@@ -125,7 +125,7 @@ _pthread_fork_prepare(void)
 // Release pthread-internal locks
 // Called first in libSystem_atfork_parent().
 void
-_pthread_fork_parent(void)
+_pthread_atfork_parent(void)
 {
        pthread_globals_t globals = _pthread_globals();
 
@@ -155,7 +155,7 @@ _pthread_atfork_parent_handlers(void)
 // Make the current thread the main thread.
 // Called first in libSystem_atfork_child() (after _dyld_fork_child)
 void
-_pthread_fork_child(void)
+_pthread_atfork_child(void)
 {
        pthread_globals_t globals = _pthread_globals();
        _PTHREAD_LOCK_INIT(globals->psaved_self_global_lock);
@@ -180,7 +180,27 @@ _pthread_atfork_child_handlers(void)
        _PTHREAD_LOCK_INIT(globals->pthread_atfork_lock);
 }
 
-// Preserve legacy symbol in case somebody depends on it
+// Preserve legacy symbols for older iOS simulators
+void
+_pthread_fork_prepare(void)
+{
+       _pthread_atfork_prepare_handlers();
+       _pthread_atfork_prepare();
+}
+
+void
+_pthread_fork_parent(void)
+{
+       _pthread_atfork_parent();
+       _pthread_atfork_parent_handlers();
+}
+
+void
+_pthread_fork_child(void)
+{
+       _pthread_atfork_child();
+}
+
 void
 _pthread_fork_child_postinit(void)
 {