summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386/gen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a weak symbol for signalcontext().mini2002-09-171-1/+3
|
* Add signalcontext(), which adds a signal frame to a ucontext_t.mini2002-09-171-0/+80
|
* Save and restore FPU state properly in ucontext_t's.mini2002-09-163-35/+28
| | | | | Reviewed by: deischen, julian Approved by: -arch
* Include <stdlib.h> to have abort() and exit() declared.robert2002-08-151-0/+1
|
* Standardize on our SCM ID style.obrien2002-03-235-31/+9
|
* Restore CSRG ID's lost in January 1995.obrien2002-03-239-25/+53
|
* Fix the style of the SCM ID's.obrien2002-03-224-13/+9
| | | | I believe have made all of libc .c's as consistent as possible.
* Move swapcontext.c to the ${MACHINE_ARCH}/gen/Makefile.inc area, otherwisepeter2002-03-211-1/+1
| | | | | it causes undefined references to getcontext() and setcontext() on platforms other than i386 and alpha.
* Fixed unsorting and splitting of SRCS in previous commit.bde2002-01-111-2/+2
|
* Add getcontext, setcontext, makecontext, and swapcontext. Thesedeischen2002-01-104-0/+381
| | | | | | | | | functions are defined in SUSv2 and the latest POSIX spec. Thanks to Bernd Walter <ticso@cicely8.cicely.de> for helping debug my alpha assembly. Approved by: -arch
* Use 'mov' instead of 'lea' for setting the syscall number in %eax as thatjhb2001-11-271-3/+3
| | | | | | is clearer about what we are actually doing. Requested by: bde
* De-orbit DEFS.h - the other arches do not use it, and it got replacedpeter2001-10-246-6/+4
| | | | | | with <machine/asm.h>. Reviewed by: bde
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-139-21/+6
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-243-36/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Prefix the register argument of indirect 'jmp's with a * to make gas 2.10.xjhb2000-11-281-1/+1
| | | | happy.
* Fix some rather interesting bugs that managed to not turn up in variouspeter2000-07-291-5/+5
| | | | | | | | | | | testing and real-life applications: 1) If you returned from the thread function, you got a segv instead of calling _exit() with your return code. 2) clean up some bogus stack management. There was also an underflow on function return. 3) when making syscalls, the kernel is expecting to have to leave space for the function's return address. We need to duplicate this. It was an accident that the rfork syscall actually worked here. :-/
* rfork(2) wrapper for simple rfork-style threads. I have lost count ofpeter2000-07-292-1/+113
| | | | | | | | | | | | | | | the number of times I have given this to people and got asked: why isn't it in libc? It is impossible to do this without assembler glue to reset the stack for the new child process. int rfork_thread(flags, stack_addr, start_fnc, start_arg) int flags; Flags to rfork system call. See rfork(2). void *stack_addr; Top of stack for thread. int (*start_fnc)(void *); Address of thread function to call in child. void *start_arg; Argument to pass to the thread function in child. This is deliberately not documented or prototyped in includes until the corresponding alpha version is written.
* Use assembler directives rather than ALTENTRY() so that longjmp() andjasone2000-05-042-10/+8
| | | | | siglongjmp() are weak symbols. This is necessary to allow static linking with the linuxthreads library port.
* Remove unnecessary alternate entry points for *setjmp(). Make the mainjasone2000-01-203-15/+18
| | | | | | | entry point the standard name when not compiling libc_r (for example, longjmp is the main entry point instead of __longjmp). Suggested by: bde
* Make minor entry point changes to support libc_r.jasone2000-01-193-6/+6
|
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-01-123-10/+18
| | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
* Unbreak profiling. bde says this is not the cleanest way to fix thejasone2000-01-042-4/+4
| | | | | | problem, but that it works. Submitted by: bde
* Creating weak symbols doesn't work correctly when building an aout libc.jasone1999-12-242-8/+4
| | | | | | | | | | | | Doing the "right thing" here is difficult, so create two ENTRY points for each function (for example, __setjmp and setjmp are equivalent). This isn't pretty, but it works for both aout and ELF. libc symbol naming needs an overhaul in order to properly support function wrapping, specifically in the case of a real libpthread, and these duplicate entry points should be fixed as part of that overhaul. Pointed out by: bde
* Make setjmp, longjmp, sigsetjmp, and siglongjmp weak aliases forjasone1999-12-142-4/+12
| | | | | | | | __setjmp, __longjmp, __sigsetjmp, and __siglongjmp, respectively. This supports cancellation in the linuxthreads port. In the long run, a much more comprehensive solution will necessitate more dramatic changes to libc symbol naming, and these aliases will probably need modification at that time.
* \begin{quote}marcel1999-10-101-1/+1
| | | | | | | | | | | setjmp() gets the jmp_buf pointer from the wrong place (the place where the return address is) in the shlib case, and uses it (only) to fetch the current signal mask to address (return_address + 28). This address is normally read-only (I hope), so the sigprocmask() call has no effect except to return an error code. \end{quote} Submitted by: bde
* sigset_t change (part 5 of 5)marcel1999-09-293-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- Most of the userland changes are in libc. For both the alpha and the i386 setjmp has been changed to accomodate for the new sigset_t. Internally, libc is mostly rewritten to use the new syscalls. The exception is in compat-43/sigcompat.c The POSIX thread library has also been rewritten to use the new sigset_t. Except, that it currently only handles NSIG signals instead of the maximum _SIG_MAXSIG. This should not be a problem because current applications don't use any signals higher than NSIG. There are version bumps for the following libraries: libdialog libreadline libc libc_r libedit libftpio libss These libraries either a) have one of the modified structures visible in the interface, or b) use sigset_t internally and may cause breakage if new binaries are used against libraries that don't have the sigset_t change. This not an immediate issue, but will be as soon as applications start using the new range to its fullest. NOTE: libncurses already had an version bump and has not been given one now. NOTE: doscmd is a real casualty and has been disconnected for the moment. Reconnection will eventually happen after doscmd has been fixed. I'm aware that being the last one to touch it, I'm automaticly promoted to being maintainer. According to good taste this means that I will receive a badge which either will be glued or mechanically stapled, drilled or otherwise violently forced onto me :-) NOTE: pcvt/vttest cannot be compiled with -traditional. The change cause sys/types to be included along the way which contains the const and volatile modifiers. I don't consider this a solution, but more a workaround.
* $Id$ -> $FreeBSD$peter1999-08-2811-20/+20
|
* Stop renaming these in libc_r because wrappered versions don't make sense.jb1998-04-293-30/+6
| | | | PR: i386/4826, bin/5953
* Moved `SRCS+= frexp.c' to the correct Makefile.inc.bde1997-10-141-3/+3
| | | | Sorted SRCS.
* kill the undeadpeter1997-07-139-540/+0
|
* This commit was generated by cvs2svn to compensate for changes in r27180,bde1997-07-039-0/+540
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import Lite2's src/lib, except for non-i386 machine-dependent directories,bde1997-07-039-0/+540
| | | | | | | | | | libc/db, libc/gen/crypt.* and libtelnet. All affected files except 3 unimportant ones have already left the vendor branch.
| * Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branchpeter1997-03-115-37/+27
| |
| * recording cvs-1.6 file deathpeter1995-12-309-540/+0
| |
| * This commit was manufactured by cvs2svn to create branch 'CSRG'.cvs2svn1995-06-275-0/+352
| |
* | Revert $FreeBSD$ to $Id$peter1997-02-2211-20/+20
| |
* | Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-1411-20/+20
| | | | | | | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* | General -Wall warning cleanup, part I.jkh1996-07-121-2/+4
| | | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* | Fix a bug caused by the collision of a local assembler label with anotherjdp1996-05-111-8/+8
| | | | | | | | | | use of the same label in a recently-introduced PIC_PROLOGUE. This should solve the recent core dumps from pdksh.
* | Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__)peter1996-05-053-18/+26
| | | | | | | | | | | | | | | | | | | | | | In a nutshell, this macroizes the local/global symbol scoping rules that are different in a.out and ELF. It also makes the i386 assembler stubs conform to i386 PIC calling conventions - the a.out ld.so didn't object, but the ELF one needs it as it implements PIC jumps via PLT's as well as calls. The a.out rtld only worked because it was accidently snooping the grandparent calling function's return address off the stack.. This also affects the libc_r code a little, because of cpp macro nesting.
* | Put in missing '_' in call to wrapper _thread_sys_sigsetmask() function.peter1996-02-171-3/+3
| |
* | Reviewed by: julian and (hsu?)julian1996-01-223-6/+46
| | | | | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations
* | This commit was generated by cvs2svn to compensate for changes in r13122,peter1995-12-309-540/+0
| | | | | | | | which included commits to RCS files with non-trunk default branches.
* | recording cvs-1.6 file deathpeter1995-12-304-192/+0
| |
* | remove GCC support functions from libc.phk1995-10-051-2/+1
| | | | | | | | Should never have been here in the first place.
* | First round of changes to clean up the RCSID mess in libc:dg1995-01-2315-41/+76
| | | | | | | | | | | | | | | | 1) Changed LIB_SCCS and SYSLIB_SCCS to LIB_RCS and SYSLIB_RCS. 2) Changed sccsid[] variables to rcsid[] 3) Moved all RCSID strings into .text 4) Converted all SCCSID's to RCS $Id$'s 5) Added missing $Id$'s after copyright.
* | fixunsdfsi.S:bde1994-12-271-37/+22
| | | | | | | | | | | | Embalm. Rewrite to do things much the same as gcc-2: use fistpq for speed and elegance, and mishandle overflow consistently. __fixunsdfsi() is no longer called by gcc.
* | sigsetjmp.S:bde1994-12-271-3/+2
| | | | | | | | Remove unnecessary .text statement.
* | Remove unnecessary .align statement.bde1994-12-272-2/+0
| |
* | Reenable sigsetjmp.S. Preserve the FP state. Rearrange offsetsbde1994-10-252-7/+25
| | | | | | | | to match setjmp.S.
OpenPOWER on IntegriCloud