Deleted Added
full compact
thr_kern.c (123312) thr_kern.c (123668)
1/*
2 * Copyright (C) 2003 Daniel M. Eischen <deischen@freebsd.org>
3 * Copyright (C) 2002 Jonathon Mini <mini@freebsd.org>
4 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 */
35#include <sys/cdefs.h>
1/*
2 * Copyright (C) 2003 Daniel M. Eischen <deischen@freebsd.org>
3 * Copyright (C) 2002 Jonathon Mini <mini@freebsd.org>
4 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 */
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/lib/libkse/thread/thr_kern.c 123312 2003-12-09 02:20:56Z davidxu $");
36__FBSDID("$FreeBSD: head/lib/libkse/thread/thr_kern.c 123668 2003-12-19 13:24:54Z davidxu $");
37
38#include <sys/types.h>
39#include <sys/kse.h>
40#include <sys/signalvar.h>
41#include <sys/queue.h>
42#include <machine/atomic.h>
43#include <machine/sigframe.h>
44

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

194 * single threaded.
195 *
196 * XXX
197 * POSIX says for threaded process, fork() function is used
198 * only to run new programs, and the effects of calling functions
199 * that require certain resources between the call to fork() and
200 * the call to an exec function are undefined.
201 *
37
38#include <sys/types.h>
39#include <sys/kse.h>
40#include <sys/signalvar.h>
41#include <sys/queue.h>
42#include <machine/atomic.h>
43#include <machine/sigframe.h>
44

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

194 * single threaded.
195 *
196 * XXX
197 * POSIX says for threaded process, fork() function is used
198 * only to run new programs, and the effects of calling functions
199 * that require certain resources between the call to fork() and
200 * the call to an exec function are undefined.
201 *
202 * Here it is not safe to reinitialize the library after fork().
203 * Because memory management may be corrupted, further calling
204 * malloc()/free() may cause undefined behavior.
202 * It is not safe to free memory after fork(), because these data
203 * structures may be in inconsistent state.
205 */
206void
207_kse_single_thread(struct pthread *curthread)
208{
209#ifdef NOTYET
210 struct kse *kse;
211 struct kse_group *kseg;
212 struct pthread *thread;

--- 2289 unchanged lines hidden ---
204 */
205void
206_kse_single_thread(struct pthread *curthread)
207{
208#ifdef NOTYET
209 struct kse *kse;
210 struct kse_group *kseg;
211 struct pthread *thread;

--- 2289 unchanged lines hidden ---