Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libthr/thread/thr_fork.c
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
#include <pthread.h> | #include <pthread.h> | ||||
#include <spinlock.h> | #include <spinlock.h> | ||||
#include "un-namespace.h" | #include "un-namespace.h" | ||||
#include "libc_private.h" | #include "libc_private.h" | ||||
#include "rtld_lock.h" | #include "rtld_lock.h" | ||||
#include "thr_private.h" | #include "thr_private.h" | ||||
__weak_reference(_pthread_atfork, pthread_atfork); | __weak_reference(_thr_atfork, _pthread_atfork); | ||||
__weak_reference(_thr_atfork, pthread_atfork); | |||||
int | int | ||||
_pthread_atfork(void (*prepare)(void), void (*parent)(void), | _thr_atfork(void (*prepare)(void), void (*parent)(void), | ||||
void (*child)(void)) | void (*child)(void)) | ||||
{ | { | ||||
struct pthread *curthread; | struct pthread *curthread; | ||||
struct pthread_atfork *af; | struct pthread_atfork *af; | ||||
_thr_check_init(); | _thr_check_init(); | ||||
if ((af = malloc(sizeof(struct pthread_atfork))) == NULL) | if ((af = malloc(sizeof(struct pthread_atfork))) == NULL) | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |