summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* cosmetic: spell 'cashe' as 'cache'billf2002-03-103-3/+3
|
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-184-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* 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-277-12/+12
| | | | | | is clearer about what we are actually doing. Requested by: bde
* Cleanups after previous change:jhb2001-11-131-9/+2
| | | | | | | | | | | - Renumber labels since the previous revision removed one. - Remove useless and wrong comment. - Repeating the function name is just redundant. - The previous revision made the comment about %edx useless. - The comment about %eax was wrong (but did explain why %eax used to be fixed up). Submitted by: bde
* The kernel already fixes up %eax for parents that return from fork, sojhb2001-11-134-104/+2
| | | | | don't bother manually fixing up %eax for the parent process by testing the value in %edx and zeroing and already zeroed %eax.
* De-orbit DEFS.h - the other arches do not use it, and it got replacedpeter2001-10-2433-73/+29
| | | | | | with <machine/asm.h>. Reviewed by: bde
* Just use RSYSCALL.ru2001-10-191-2/+1
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-014-9/+9
|
* Use ``.Rv -std'' wherever possible.ru2001-08-311-9/+1
| | | | Submitted by: yar
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-1351-110/+16
|
* Cross-reference io(4).iedowse2001-08-121-0/+2
|
* mdoc(7) police: join split punctuation to macro calls.ru2001-08-101-4/+4
|
* Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.yar2001-08-091-7/+1
| | | | Reviewed by: ru
* Remove whitespace at EOL.dd2001-07-154-7/+7
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* MAN[1-9] -> MAN.ru2001-03-271-2/+2
|
* Clean up syscall generation in libc by removing HIDDEN_SYSCALLSdeischen2001-01-296-40/+11
| | | | | | | | | | | | | | and treating (almost) all system calls the same way: __sys_foo - actual syscall foo, _foo - weak definitions to __sys_foo Change PSEUDO syscalls (currently only _exit and _getlogin) to be __sys_foo (T) and _foo (W). Add $FreeBSD$ to a few files to satisfy commitprep. Suggested by: bde
* Comment only change; s/_thread_sys_/__sys_/deischen2001-01-261-2/+2
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-246-60/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Prepare for mdoc(7)NG.ru2000-12-291-0/+1
|
* Remove last vestiges of thr_sleep and thr_wakeup from libc.jake2000-12-021-1/+1
|
* Prefix the register argument of indirect 'jmp's with a * to make gas 2.10.xjhb2000-11-282-2/+2
| | | | happy.
* mdoc(7) police: use certified section headers wherever possible.ru2000-11-171-1/+1
|
* Add a couple of debug register helper functions to assist in settingbsd2000-09-214-2/+245
| | | | | | and clearing watchpoints. Reviewed by: jwd@FreeBSD.org, -hackers@
* 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.
* You need options USER_LDT in your kernel to use these functions.alex2000-06-141-0/+4
| | | | | | PR: 18943 Submitted by: Ben Smithurst <ben@scientia.demon.co.uk> Reviewed by: asmodai
* Use `Er' variable to define first column width in ERRORS section.phantom2000-05-063-3/+3
|
* 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.
* Introduce ".Lb" macro to libc manpages.phantom2000-04-213-0/+6
| | | | More libraries manpages updates following.
* Take care to avoid having "strong" and "weak" symbols of the same name injasone2000-03-161-4/+0
| | | | libc_r.
* Undo the ill-conceived breakage of the previous commit and really fix:jasone2000-01-291-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | For libc_r renamed syscalls, correct symbol naming from _thread_sys_foo() <-- _foo() to _thread_sys_foo() <-- _foo() <-- foo(). This is necessary for system calls which libc_r doesn't define foo(). Some weak symbols such as poll() are defined twice. From what I understand, depending on one weak symbol or the other to be used is a bad idea. All such weak symbols defined in the libc_r-specific code should therefore be made strong (non-weak?). Simplify PSEUDO() to not define any weak symbols, since they aren't ever needed. alpha/SYS.h: Correct reversed usage of WEAK_ALIAS(), which has reversed arguments from __weak_reference(). Also, fix reversal of symbols, so that syscall foo() is a weak alias for _foo(). Add WEAK_ALIAS() call to PRSYSCALL(), which unlike the i386 version of PRSYSCALL(), is not defined in terms of PSYSCALL(). Make PSEUDO() equivalent to the i386 version.
* For syscalls that are renamed to _thread_sys_foo, create a weak aliasjasone2000-01-281-7/+7
| | | | called _foo, not _thread_sys_foo.
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-01-271-6/+7
| | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen
* 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
* Move ENTRY and ALTENTRY definitions to asm.h where they belong.jasone2000-01-201-23/+0
| | | | | | Unbreak profiling. Again. Submitted 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-125-12/+48
| | | | | | 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.
* Remove osig* from NOASM. It bogus now.marcel1999-10-141-2/+1
|
* \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
* Remove syscall wrappers.marcel1999-10-094-189/+2
|
* sigset_t change (part 5 of 5)marcel1999-09-294-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- 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.
* Use definitions provided in sysarch.h for args structures.luoqi1999-09-025-41/+12
| | | | Reviewed by: marcel
* $Id$ -> $FreeBSD$peter1999-08-2865-119/+119
|
OpenPOWER on IntegriCloud