aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/amd64/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* Sigh. I can't win anything. Use addq rather than addl with %rsp.Peter Wemm2003-09-041-1/+1
| | | | Notes: svn path=/head/; revision=119727
* Apply same basic fix for getcontext(2) as for i386. Store the returnPeter Wemm2003-09-042-2/+56
| | | | | | | | | value for getcontext() in a preserved register rather than on the stack. The second time around, the stack value would likely have changed so we can't depend on it for the return value. Notes: svn path=/head/; revision=119726
* Fix some minor whitespace botchesPeter Wemm2003-09-041-1/+1
| | | | Notes: svn path=/head/; revision=119725
* Add the mlockall() and munlockall() system calls.Bruce M Simpson2003-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - All those diffs to syscalls.master for each architecture *are* necessary. This needed clarification; the stub code generation for mlockall() was disabled, which would prevent applications from linking to this API (suggested by mux) - Giant has been quoshed. It is no longer held by the code, as the required locking has been pushed down within vm_map.c. - Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES to express their intention explicitly. - Inspected at the vmstat, top and vm pager sysctl stats level. Paging-in activity is occurring correctly, using a test harness. - The RES size for a process may appear to be greater than its SIZE. This is believed to be due to mappings of the same shared library page being wired twice. Further exploration is needed. - Believed to back out of allocations and locks correctly (tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC). PR: kern/43426, standards/54223 Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=118771
* Repair PIC mode. It seems I was a bit too excited about thePeter Wemm2003-05-246-14/+77
| | | | | | | implications of native PC relative addressing. Notes: svn path=/head/; revision=115279
* Delete i386_* syscall wrappers and manpages. Rename Ovfork.S to vfork.S.Peter Wemm2003-04-301-12/+2
| | | | Notes: svn path=/head/; revision=114314
* Update for AMD64 after repocopy from i386/sys/*. This means:Peter Wemm2003-04-306-105/+35
| | | | | | | | | | - strip out the nasty PIC_PROLOGUE/EPILOGUE stuff, since we dont have to lose a register in PIC mode anymore (we use %rip-relative addressing). - update for C register argument passing conventions. - convert 32 bit to 64 bit register sizes etc. Notes: svn path=/head/; revision=114313
* I have no idea why the reboot(2) syscall wrapper ends with iret, butPeter Wemm2003-04-301-1/+1
| | | | | | | update it to be iretq for completeness. Notes: svn path=/head/; revision=114312
* Update for AMD64. Depend on %rdi (first syscall argument) being preservedPeter Wemm2003-04-301-4/+3
| | | | | | | across a "syscall"-style syscall Notes: svn path=/head/; revision=114311
* Update for AMD64 (repocopied from i386/sys/Ovfork.S - why is it O?)Peter Wemm2003-04-301-5/+4
| | | | | | | | Depend on %rsi being preserved across the "syscall"-style syscall and strip out the PIC stuff (this cpu has full PC-relative addressing, at last!) Notes: svn path=/head/; revision=114310
* libc_r wasn't so tied to libc for 22 months.Ruslan Ermilov2002-11-181-2/+0
| | | | Notes: svn path=/head/; revision=107052
* Use '_end' symbol instead of 'end' to initialize minbrk and curbrkAlexander Kabaev2002-08-081-3/+3
| | | | | | | | | | | | | | | | variables. Both symbols are set to the same value by the linker, and _end symbol has less chances to clash with application defined global symbols. alpha, ia64 and sparc64 ports already use _end, i386 is now consistent with them. Reviewed by: bde Approved by: obrien Reported by: pirzyk Notes: svn path=/head/; revision=101536
* Generate the normal asm stubs for all sysv system calls. Use these insteadJake Burkholder2002-05-231-5/+3
| | | | | | | | | | of C wrappers for the *sys indirect system calls. The indirect system calls are horribly broken on sparc64. Submitted by: tmm Notes: svn path=/head/; revision=97191
* Restore CSRG ID's lost in January 1995.David E. O'Brien2002-03-2310-40/+50
| | | | Notes: svn path=/head/; revision=92999
* Use 'mov' instead of 'lea' for setting the syscall number in %eax as thatJohn Baldwin2001-11-275-7/+7
| | | | | | | | | is clearer about what we are actually doing. Requested by: bde Notes: svn path=/head/; revision=87006
* Cleanups after previous change:John Baldwin2001-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 Notes: svn path=/head/; revision=86325
* The kernel already fixes up %eax for parents that return from fork, soJohn Baldwin2001-11-132-6/+2
| | | | | | | | don't bother manually fixing up %eax for the parent process by testing the value in %edx and zeroing and already zeroed %eax. Notes: svn path=/head/; revision=86314
* De-orbit DEFS.h - the other arches do not use it, and it got replacedPeter Wemm2001-10-241-1/+0
| | | | | | | | | with <machine/asm.h>. Reviewed by: bde Notes: svn path=/head/; revision=85437
* Just use RSYSCALL.Ruslan Ermilov2001-10-191-2/+1
| | | | Notes: svn path=/head/; revision=85160
* Removed duplicate VCS ID tags, as per style(9).Ruslan Ermilov2001-08-1310-20/+0
| | | | Notes: svn path=/head/; revision=81586
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-2/+2
| | | | Notes: svn path=/head/; revision=74870
* Clean up syscall generation in libc by removing HIDDEN_SYSCALLSDaniel Eischen2001-01-293-7/+3
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=71770
* Comment only change; s/_thread_sys_/__sys_/Daniel Eischen2001-01-261-2/+2
| | | | Notes: svn path=/head/; revision=71663
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-242-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=71579
* Remove last vestiges of thr_sleep and thr_wakeup from libc.Jake Burkholder2000-12-021-1/+1
| | | | Notes: svn path=/head/; revision=69515
* Prefix the register argument of indirect 'jmp's with a * to make gas 2.10.xJohn Baldwin2000-11-281-1/+1
| | | | | | | happy. Notes: svn path=/head/; revision=69332
* Add a couple of debug register helper functions to assist in settingBrian S. Dean2000-09-211-2/+4
| | | | | | | | | and clearing watchpoints. Reviewed by: jwd@FreeBSD.org, -hackers@ Notes: svn path=/head/; revision=66174
* Remove osig* from NOASM. It bogus now.Marcel Moolenaar1999-10-141-2/+1
| | | | Notes: svn path=/head/; revision=52232
* Remove syscall wrappers.Marcel Moolenaar1999-10-091-3/+2
| | | | Notes: svn path=/head/; revision=52062
* sigset_t change (part 5 of 5)Marcel Moolenaar1999-09-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- 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. Notes: svn path=/head/; revision=51794
* $Id$ -> $FreeBSD$Peter Wemm1999-08-2811-21/+21
| | | | Notes: svn path=/head/; revision=50476
* Add wrappers for pread and pwrite syscalls.Dmitrij Tejblum1999-04-041-3/+3
| | | | Notes: svn path=/head/; revision=45313
* Simplify implementation and eliminate a register preservation problem.Luoqi Chen1998-09-181-24/+10
| | | | | | | Reviewed by: Bruce Evans <bde@zeta.org.au> Notes: svn path=/head/; revision=39455
* Fix a cut 'n paste mistake.Luoqi Chen1998-09-131-4/+4
| | | | Notes: svn path=/head/; revision=39140
* In libc_r, rename vfork syscall to _thread_sys_vfork and make vfork an aliasDmitrij Tejblum1998-09-121-2/+6
| | | | | | | | | | to fork. It is difficult to do real vfork in libc_r, since almost every operation with file descriptsor changes _thread_fd_table and friends. popen(3) works much better with this change. Notes: svn path=/head/; revision=39118
* Fixed disordering in previous commit.Bruce Evans1998-07-291-4/+4
| | | | Notes: svn path=/head/; revision=37946
* Add wrappers for i386_*_ioperm, i386_vm86 so userland code doesJonathan Lemon1998-07-281-3/+5
| | | | | | | | not have to call sysarch() directly. Added man pages for above, as well as sysarch() Notes: svn path=/head/; revision=37903
* Use the thread-aware errno definition all the time.John Birrell1998-05-051-22/+3
| | | | Notes: svn path=/head/; revision=35762
* Oops, backout the previous change having confused my underscores.John Birrell1998-04-301-3/+2
| | | | | | | | | __thread_create is a syscall that uses the default asm. It is _thread_create that contains specific asm code, but that lives in libpthread. Notes: svn path=/head/; revision=35544
* Make cerror thread aware by calling __error() to get a pointer to theJohn Birrell1998-04-301-22/+5
| | | | | | | | thread-specific error variable. This change make libc use the same cerror code that libc_r has been using. Notes: svn path=/head/; revision=35541
* The syscall that creates a kernel thread is coming, but it doesn't use theJohn Birrell1998-04-301-4/+3
| | | | | | | | | default syscall asm, so add it to NOASM. The other syscalls that manipulate kernel threads use the default asm code, so they just get built automatically. Notes: svn path=/head/; revision=35540
* Nearly missed this one.John Birrell1998-03-091-1/+20
| | | | | | | | | | List non-default asm sources in MDASM so that they replace the defaults. For funny or incomplete syscalls, list them in NOASM to stop them from getting built as defaults. Notes: svn path=/head/; revision=34388
* Removed bogus .PATH statement.Bruce Evans1997-10-161-3/+1
| | | | Notes: svn path=/head/; revision=30483
* Removed the subdirectory paths from the definitions of MAN[1-9]. TheyBruce Evans1997-10-161-3/+2
| | | | | | | | were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago. Notes: svn path=/head/; revision=30482
* Changed all paths to be relative to src/lib instead of src/lib/libcJohn Birrell1997-05-031-2/+5
| | | | | | | | | | | | | so that all these makefiles can be used to build libc_r too. Added .if ${LIB} == "c" tests to restrict man page builds to libc to avoid needlessly building them with libc_r too. Split libc Makefile into Makefile and Makefile.inc to allow the libc_r Makefile to include Makefile.inc too. Notes: svn path=/head/; revision=25401
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-2211-21/+21
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-1411-21/+21
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Submitted by: John Birrell <cimaxp1!jb@werple.net.au>Julian Elischer1996-08-202-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here are the diffs for libc_r to get it one step closer to P1003.1c These make most of the thread/mutex/condvar structures opaque to the user. There are three functions which have been renamed with _np suffixes because they are extensions to P1003.1c (I did them for JAVA, which needs to suspend/resume threads and also start threads suspended). I've created a new header (pthread_np.h) for the non-POSIX stuff. The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented doesn't work. I think its best to delete it. I don't think libc_r needs tags anyway, 'cause most of the source is in libc which does have tags. also: Here's the first batch of man pages for the thread functions. The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was inherited from /usr/src/lib/libc/Makefile that should only be done with libc. also: I should have sent this diff with the pthread(3) man page. It allows people to type make -DWANT_LIBC_R world to get libc_r built with the rest of the world. I put this in the pthread(3) man page. The default is still not to build libc_r. also: The diff attached adds a pthread(3) man page to /usr/src/share/man/man3. The idea is that without libc_r installed, this man page will give people enough info to know that they have to build libc_r. Notes: svn path=/head/; revision=17706
* Fixed comparisons so that preposterously large (>= 0x80000000) brk valuesBruce Evans1996-06-251-5/+5
| | | | | | | | | | | | | aren't silently converted to minbrk. This stops malloc(INT_MAX) from dumping core. Small values are still silently converted. They should be an error. sbrk() doesn't do any range checking or conversions or overflow checking. Moved PIC_EPILOGUE invocation to a more natural place where it obviously doesn't interfere with the comparison. Notes: svn path=/head/; revision=16719
* Fix a bogon in the pic + threadsafe version of cerror, it was missingPeter Wemm1996-05-101-3/+5
| | | | | | | | | a PIC_EPILOGUE (leaving an extra long on the stack). Submitted by: John Polstra <jdp@polstra.com> Notes: svn path=/head/; revision=15719