aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/i386/SYS.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit 42b388439bd3)
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Replace the WEAK_ALIAS() alias with the WEAK_REFERENCE() alias. Use it andAndreas Tobler2013-11-211-14/+11
| | | | | | | | | get rid of the __CONCAT and CNAME macros. Reviewed by: bde, kib Notes: svn path=/head/; revision=258451
* libc/i386: Do not export .cerror.Jilles Tjoelker2012-09-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden. Not exporting .cerror causes it to be jumped to directly instead of via the PLT. This change also takes advantage of .cerror's new status by not saving and loading %ebx before jumping to it. (Therefore, .cerror now saves and loads %ebx itself.) Where there was a conditional jump to a jump to .cerror, the conditional jump has been changed to jump to .cerror directly (many modern CPUs don't do static prediction and in any case it is not much of a benefit anyway). This change makes libc.so.7 a few kilobytes smaller. Reviewed by: kib Notes: svn path=/head/; revision=240152
* Add missing END() macros, as per rev 184547 for amd64. The lack of thesePeter Wemm2008-11-021-2/+3
| | | | | | | is mostly harmless, but it does upset some of valgrind's functionality. Notes: svn path=/head/; revision=184548
* Adjust the syscall stub macros to be consistent in their meaning. InPeter Wemm2007-07-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | particular: SYSCALL() makes a syscall, with errno handling, and continues execution directly after the macro in the non-error case. RSYSCALL() is just like SYSCALL(), but returns after success. Both SYSCALL(name) and RSYSCALL(name) export "__sys_name" as a strong symbol, with "_name" and "name" as weak aliases. PSEUDO() is just like RSYSCALL(), but skipping the "name" weak alias. It still does "__sys_name" and "_name". Change i386 to add errno handling to PSEUDO. The same for amd64 and sparc64, with appear to have copied the behavior. ia64 was correct (as was alpha). Just remove some apparently unused variants of the macros. (untested!) I believe powerpc is correct. Fix arm to not export "name" from the PSEUDO case. Remove apparently extra unused variants. (untested!) The errno problem manifested on i386/amd64/sparc64 by having "PSEUDO" classified syscalls return without setting errno. eg: "addr = mmap()" could return with "addr" = 22 instead of setting errno to 22 and returning -1. Approved by: re (kensmith) Notes: svn path=/head/; revision=171217
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Initiate deorbit burn for the i386-only a.out related support. Moves arePeter Wemm2002-09-171-5/+1
| | | | | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha Notes: svn path=/head/; revision=103436
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-2/+1
| | | | | | | I believe have made all of libc .h's as consistent as possible. Notes: svn path=/head/; revision=92991
* Use 'mov' instead of 'lea' for setting the syscall number in %eax as thatJohn Baldwin2001-11-271-2/+2
| | | | | | | | | is clearer about what we are actually doing. Requested by: bde Notes: svn path=/head/; revision=87006
* De-orbit DEFS.h - the other arches do not use it, and it got replacedPeter Wemm2001-10-241-1/+1
| | | | | | | | | with <machine/asm.h>. Reviewed by: bde Notes: svn path=/head/; revision=85437
* Clean up syscall generation in libc by removing HIDDEN_SYSCALLSDaniel Eischen2001-01-291-31/+6
| | | | | | | | | | | | | | | | | 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
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Take care to avoid having "strong" and "weak" symbols of the same name inJason Evans2000-03-161-4/+0
| | | | | | | libc_r. Notes: svn path=/head/; revision=58126
* Undo the ill-conceived breakage of the previous commit and really fix:Jason Evans2000-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. Notes: svn path=/head/; revision=56809
* For syscalls that are renamed to _thread_sys_foo, create a weak aliasJason Evans2000-01-281-7/+7
| | | | | | | called _foo, not _thread_sys_foo. Notes: svn path=/head/; revision=56773
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-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 Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-2/+7
| | | | | | | | | 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(). Notes: svn path=/head/; revision=55837
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Build the syscalls (in libc, not libc_r) with weak symbols so thatJohn Birrell1998-05-051-3/+9
| | | | | | | libpthread can override them as required. Notes: svn path=/head/; revision=35761
* Fixed long lines.Bruce Evans1997-04-191-8/+9
| | | | | | | | | Removed unused macros CALL() and ASMSTR. Reviewed by: jdp Notes: svn path=/head/; revision=25029
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Moved definitions of PIC macros from SYS.h to DEFS.h so that SYS.hBruce Evans1997-02-141-20/+0
| | | | | | | | | | | doesn't need to be included in files that have nothing to do with syscalls. Added missing `.text' to START_ENTRY so that ENTRY() works when invoked in the data section. Notes: svn path=/head/; revision=22715
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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
* Correct a "spelling" error in a comment.John Dyson1996-10-311-2/+2
| | | | Notes: svn path=/head/; revision=19294
* Submitted by: john birell (jb@cimlogic.com.au)Julian Elischer1996-08-221-3/+3
| | | | | | | | fixups for makefiles and for Thread-safe sycalls Notes: svn path=/head/; revision=17769
* Submitted by: John Birrell <cimaxp1!jb@werple.net.au>Julian Elischer1996-08-201-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__)Peter Wemm1996-05-051-17/+16
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=15634
* Reviewed by: julian and (hsu?)Julian Elischer1996-01-221-1/+16
| | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations Notes: svn path=/head/; revision=13545
* First crack at making libc work with the new make macros. It compiles onGarrett Wollman1994-08-051-9/+25
| | | | | | | | my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge. Notes: svn path=/head/; revision=1849
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+57
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573