Deleted Added
full compact
thr_fork.c (55194) thr_fork.c (55838)
1/*
2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/lib/libkse/thread/thr_fork.c 55194 1999-12-28 18:13:04Z deischen $
32 * $FreeBSD: head/lib/libkse/thread/thr_fork.c 55838 2000-01-12 09:28:58Z jasone $
33 */
34#include <errno.h>
35#include <string.h>
36#include <stdlib.h>
37#include <unistd.h>
38#include <fcntl.h>
39#ifdef _THREAD_SAFE
40#include <pthread.h>
41#include "pthread_private.h"
42
43pid_t
33 */
34#include <errno.h>
35#include <string.h>
36#include <stdlib.h>
37#include <unistd.h>
38#include <fcntl.h>
39#ifdef _THREAD_SAFE
40#include <pthread.h>
41#include "pthread_private.h"
42
43pid_t
44fork(void)
44_libc_fork(void)
45{
46 int i, flags;
47 pid_t ret;
48 pthread_t pthread;
49 pthread_t pthread_save;
50
51 /*
52 * Defer signals to protect the scheduling queues from access

--- 162 unchanged lines hidden (view full) ---

215 /*
216 * Undefer and handle pending signals, yielding if necessary:
217 */
218 _thread_kern_sig_undefer();
219
220 /* Return the process ID: */
221 return (ret);
222}
45{
46 int i, flags;
47 pid_t ret;
48 pthread_t pthread;
49 pthread_t pthread_save;
50
51 /*
52 * Defer signals to protect the scheduling queues from access

--- 162 unchanged lines hidden (view full) ---

215 /*
216 * Undefer and handle pending signals, yielding if necessary:
217 */
218 _thread_kern_sig_undefer();
219
220 /* Return the process ID: */
221 return (ret);
222}
223
224__weak_reference(_libc_fork, fork);
223#endif
225#endif