From 99acb3fb113a739fe65a3593d86dabaf9d676b67 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 24 Jul 1998 09:45:04 +0000 Subject: Fri Jul 24 16:33:17 1998 Ross Johnson * fork.c (pthread_atfork): Add all the necessary push calls. Local implementation semantics: If we get an ENOMEM at any time then ALL handlers (including those from previous pthread_atfork() calls) will be popped off each of the three atfork stacks before we return. (fork): Add all the necessary pop calls. Add the thread cancellation and join calls to the child fork. Add #includes. * implement.h: (_pthread_handler_push): Fix return type and stack arg type in prototype. (_pthread_handler_pop): Fix stack arg type in prototype. (_pthread_handler_pop_all): Fix stack arg type in prototype. * cleanup.c (_pthread_handler_push): Change return type to int and return ENOMEM if malloc() fails. --- implement.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'implement.h') diff --git a/implement.h b/implement.h index b72e273..4a9a5ad 100644 --- a/implement.h +++ b/implement.h @@ -66,15 +66,15 @@ extern "C" { /* Generic handler push and pop routines. */ -void _pthread_handler_push(_pthread_handler_node_t ** stacktop, - int poporder, - void (*routine)(void *), - void *arg); +int _pthread_handler_push(int stack, + int poporder, + void (*routine)(void *), + void *arg); -void _pthread_handler_pop(_pthread_handler_node_t ** stacktop, +void _pthread_handler_pop(int stack, int execute); -void _pthread_handler_pop_all(_pthread_handler_node_t ** stacktop, +void _pthread_handler_pop_all(int stack, int execute); /* Primitives to manage threads table entries. */ -- cgit v1.2.3