d201fe46e3
adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
69 lines
1.8 KiB
ArmAsm
69 lines
1.8 KiB
ArmAsm
/* $NetBSD: sigsetjmp.S,v 1.2 1996/10/17 03:08:07 cgd Exp $ */
|
|
/* $FreeBSD$ */
|
|
|
|
/*
|
|
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
|
* All rights reserved.
|
|
*
|
|
* Author: Chris G. Demetriou
|
|
*
|
|
* Permission to use, copy, modify and distribute this software and
|
|
* its documentation is hereby granted, provided that both the copyright
|
|
* notice and this permission notice appear in all copies of the
|
|
* software, derivative works or modified versions, and any portions
|
|
* thereof, and that both notices appear in supporting documentation.
|
|
*
|
|
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
|
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
|
|
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
|
*
|
|
* Carnegie Mellon requests users of this software to return to
|
|
*
|
|
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
|
* School of Computer Science
|
|
* Carnegie Mellon University
|
|
* Pittsburgh PA 15213-3890
|
|
*
|
|
* any improvements or extensions that they make and grant Carnegie the
|
|
* rights to redistribute these changes.
|
|
*
|
|
* $FreeBSD$
|
|
*/
|
|
|
|
#include <machine/asm.h>
|
|
|
|
/*
|
|
* C library -- sigsetjmp, siglongjmp
|
|
*
|
|
* siglongjmp(a,v)
|
|
* will generate a "return(v)" from
|
|
* the last call to
|
|
* sigsetjmp(a, mask)
|
|
* by restoring registers from the stack.
|
|
* If `mask' is non-zero, the previous signal
|
|
* state will be restored.
|
|
*/
|
|
|
|
ENTRY(sigsetjmp, 2)
|
|
#if 0
|
|
LDGP(pv)
|
|
stq a1, (81 * 8)(a0) /* save the mask */
|
|
bne a1, Lsavesig /* if !zero, save signals */
|
|
jmp zero, _setjmp /* else don't. */
|
|
Lsavesig:
|
|
jmp zero, setjmp
|
|
#endif
|
|
END(sigsetjmp)
|
|
|
|
XENTRY(siglongjmp)
|
|
ENTRY(__siglongjmp, 2)
|
|
#if 0
|
|
LDGP(pv)
|
|
ldq t0, (81 * 8)(a0) /* get the mask */
|
|
bne t0, Lrestoresig /* if !zero, restore signals */
|
|
jmp zero, _longjmp
|
|
Lrestoresig:
|
|
jmp zero, longjmp
|
|
#endif
|
|
END(__siglongjmp)
|