259065 |
07-Dec-2013 |
gjb |
- Copy stable/10 (r259064) to releng/10.0 as part of the 10.0-RELEASE cycle. - Update __FreeBSD_version [1] - Set branch name to -RC1
[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so start releng/10.0 at '100' so the branch is started with a value ending in zero.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
254463 |
17-Aug-2013 |
jilles |
libc: Access _logname_valid more efficiently.
The variable _logname_valid is not exported via the version script; therefore, change C and i386/amd64 assembler code to remove indirection (which allowed interposition). This makes the code slightly smaller and faster.
Also, remove #define PIC_GOT from i386/amd64 in !PIC mode. Without PIC, there is no place containing the address of each variable, so there is no possible definition for PIC_GOT.
|
246117 |
30-Jan-2013 |
kib |
Rework the __vdso_* symbols attributes to only make the symbols weak, but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions.
Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
|
240178 |
06-Sep-2012 |
jilles |
libc/amd64: Do not export .cerror.
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.
Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump to it directly now, as in non-PIC mode.
There are also some minor size optimizations to instructions but they yield virtually no benefit in the size of libc.so.7 due to padding.
Reviewed by: kib
|
237434 |
22-Jun-2012 |
kib |
Use struct vdso_timehands data to implement fast gettimeofday(2) and clock_gettime(2) functions if supported. The speedup seen in microbenchmarks is in range 4x-7x depending on the hardware.
Only amd64 and i386 architectures are supported. Libc uses rdtsc and kernel data to calculate current time, if enabled by kernel.
Hopefully, this code is going to migrate into vdso in some future.
Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
|
217106 |
07-Jan-2011 |
kib |
Add section .note.GNU-stack for assembly files used by 386 and amd64.
|
184789 |
09-Nov-2008 |
ed |
Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.
Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4.
Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname().
I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality.
Reviewed by: rdivacky, kib
|
184547 |
02-Nov-2008 |
peter |
We've been lax about matching END() macros in asm code for some time. This is used to set the ELF size attribute for functions. It isn't normally critical but some things can make use of it (gdb for stack traces). Valgrind needs it so I'm adding it in. The problem is present on all branches and on both i386 and amd64.
|
171218 |
04-Jul-2007 |
peter |
Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo syscalls, unless WITHOUT_SYSCALL_COMPAT is defined. The default case will have the .c wrappers still. If you define WITHOUT_SYSCALL_COMPAT, the .c wrappers will go away and libc will make direct syscalls.
After 7-stable starts, the direct syscall method will be default.
Approved by: re (kensmith)
|
165903 |
09-Jan-2007 |
imp |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
145356 |
21-Apr-2005 |
kan |
Do not try to store 64 bits into 32 bit errno variable. With the changed libc data layout, this was corrupting _PathLocale variable leading to programs dumping core in non-default locales.
|
136994 |
27-Oct-2004 |
peter |
Fix brk(3). The stack was unbalanced when we jumped to cerror. Oops! This causes nasty things like SEGV or a cpu spin when we return.
Submitted by: "James R. Van Artsalen" <james@jrv.org>
|
126107 |
22-Feb-2004 |
peter |
Change the syscall stub branch orders so that the static branch prediction will assume that syscalls will succeed rather than fail.
|
124296 |
09-Jan-2004 |
nectar |
Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'm at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation.
Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts.
Reviewed by: bde
|
121407 |
23-Oct-2003 |
peter |
Add implementations of amd64_[gs]et_[fg]sbase().
|
119727 |
04-Sep-2003 |
peter |
Sigh. I can't win anything. Use addq rather than addl with %rsp.
|
119726 |
04-Sep-2003 |
peter |
Apply same basic fix for getcontext(2) as for i386. Store the return 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.
|
119725 |
04-Sep-2003 |
peter |
Fix some minor whitespace botches
|
118771 |
11-Aug-2003 |
bms |
Add the mlockall() and munlockall() system calls. - 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
|
115279 |
24-May-2003 |
peter |
Repair PIC mode. It seems I was a bit too excited about the implications of native PC relative addressing.
|
114314 |
30-Apr-2003 |
peter |
Delete i386_* syscall wrappers and manpages. Rename Ovfork.S to vfork.S.
|
114313 |
30-Apr-2003 |
peter |
Update for AMD64 after repocopy from i386/sys/*. This means: - 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.
|
114312 |
30-Apr-2003 |
peter |
I have no idea why the reboot(2) syscall wrapper ends with iret, but update it to be iretq for completeness.
|
114311 |
30-Apr-2003 |
peter |
Update for AMD64. Depend on %rdi (first syscall argument) being preserved across a "syscall"-style syscall
|
114310 |
30-Apr-2003 |
peter |
Update for AMD64 (repocopied from i386/sys/Ovfork.S - why is it O?) 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!)
|
107052 |
18-Nov-2002 |
ru |
libc_r wasn't so tied to libc for 22 months.
|
101536 |
08-Aug-2002 |
kan |
Use '_end' symbol instead of 'end' to initialize minbrk and curbrk 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
|
97191 |
23-May-2002 |
jake |
Generate the normal asm stubs for all sysv system calls. Use these instead of C wrappers for the *sys indirect system calls. The indirect system calls are horribly broken on sparc64.
Submitted by: tmm
|
92999 |
23-Mar-2002 |
obrien |
Restore CSRG ID's lost in January 1995.
|
87006 |
27-Nov-2001 |
jhb |
Use 'mov' instead of 'lea' for setting the syscall number in %eax as that is clearer about what we are actually doing.
Requested by: bde
|
86325 |
13-Nov-2001 |
jhb |
Cleanups after previous change: - 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
|
86314 |
13-Nov-2001 |
jhb |
The kernel already fixes up %eax for parents that return from fork, so don't bother manually fixing up %eax for the parent process by testing the value in %edx and zeroing and already zeroed %eax.
|
85437 |
24-Oct-2001 |
peter |
De-orbit DEFS.h - the other arches do not use it, and it got replaced with <machine/asm.h>.
Reviewed by: bde
|
85160 |
19-Oct-2001 |
ru |
Just use RSYSCALL.
|
81586 |
13-Aug-2001 |
ru |
Removed duplicate VCS ID tags, as per style(9).
|
74870 |
27-Mar-2001 |
ru |
MAN[1-9] -> MAN.
|
71770 |
29-Jan-2001 |
deischen |
Clean up syscall generation in libc by removing HIDDEN_SYSCALLS 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
|
71663 |
26-Jan-2001 |
deischen |
Comment only change; s/_thread_sys_/__sys_/
|
71579 |
24-Jan-2001 |
deischen |
Remove _THREAD_SAFE and make libc thread-safe by default by 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
|
69515 |
02-Dec-2000 |
jake |
Remove last vestiges of thr_sleep and thr_wakeup from libc.
|
69332 |
28-Nov-2000 |
jhb |
Prefix the register argument of indirect 'jmp's with a * to make gas 2.10.x happy.
|
66174 |
21-Sep-2000 |
bsd |
Add a couple of debug register helper functions to assist in setting and clearing watchpoints.
Reviewed by: jwd@FreeBSD.org, -hackers@
|
52232 |
14-Oct-1999 |
marcel |
Remove osig* from NOASM. It bogus now.
|
52062 |
09-Oct-1999 |
marcel |
Remove syscall wrappers.
|
51794 |
29-Sep-1999 |
marcel |
sigset_t change (part 5 of 5) -----------------------------
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.
|
50476 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
45313 |
04-Apr-1999 |
dt |
Add wrappers for pread and pwrite syscalls.
|
39455 |
18-Sep-1998 |
luoqi |
Simplify implementation and eliminate a register preservation problem.
Reviewed by: Bruce Evans <bde@zeta.org.au>
|
39140 |
13-Sep-1998 |
luoqi |
Fix a cut 'n paste mistake.
|
39118 |
12-Sep-1998 |
dt |
In libc_r, rename vfork syscall to _thread_sys_vfork and make vfork an alias 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.
|
37946 |
29-Jul-1998 |
bde |
Fixed disordering in previous commit.
|
37903 |
28-Jul-1998 |
jlemon |
Add wrappers for i386_*_ioperm, i386_vm86 so userland code does not have to call sysarch() directly. Added man pages for above, as well as sysarch()
|
35762 |
05-May-1998 |
jb |
Use the thread-aware errno definition all the time.
|
35544 |
30-Apr-1998 |
jb |
Oops, backout the previous change having confused my underscores. __thread_create is a syscall that uses the default asm. It is _thread_create that contains specific asm code, but that lives in libpthread.
|
35541 |
30-Apr-1998 |
jb |
Make cerror thread aware by calling __error() to get a pointer to the thread-specific error variable. This change make libc use the same cerror code that libc_r has been using.
|
35540 |
30-Apr-1998 |
jb |
The syscall that creates a kernel thread is coming, but it doesn't use the 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.
|
34388 |
09-Mar-1998 |
jb |
Nearly missed this one.
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.
|
30483 |
16-Oct-1997 |
bde |
Removed bogus .PATH statement.
|
30482 |
16-Oct-1997 |
bde |
Removed the subdirectory paths from the definitions of MAN[1-9]. They were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago.
|
25401 |
03-May-1997 |
jb |
Changed all paths to be relative to src/lib instead of src/lib/libc 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.
|
22993 |
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
21673 |
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
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.
|
17706 |
20-Aug-1996 |
julian |
Submitted by: John Birrell <cimaxp1!jb@werple.net.au>
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.
|
16719 |
25-Jun-1996 |
bde |
Fixed comparisons so that preposterously large (>= 0x80000000) brk values 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.
|
15719 |
10-May-1996 |
peter |
Fix a bogon in the pic + threadsafe version of cerror, it was missing a PIC_EPILOGUE (leaving an extra long on the stack).
Submitted by: John Polstra <jdp@polstra.com>
|
15634 |
05-May-1996 |
peter |
Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__) 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.
|
13545 |
22-Jan-1996 |
julian |
Reviewed by: julian and (hsu?) Submitted by: John Birrel(L?)
changes for threadsafe operations
|
11183 |
04-Oct-1995 |
phk |
Calling sbrk(2) with zero argument doesn't need to generate a syscall.
Reviewed by: bde
|
5790 |
23-Jan-1995 |
dg |
First round of changes to clean up the RCSID mess in libc:
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.
|
2058 |
13-Aug-1994 |
dg |
Fixed problem with returning -1 on error when the return value is a long long. Done by plugging both eax and edx with -1. This will clobber edx unnecessarily when the return value is only 32bit...though probably always an okay thing to do, it could stand a better fix. This was the cause of gawk being broken (boy was THAT ever a subtle bug!!!).
|
1849 |
05-Aug-1994 |
wollman |
First crack at making libc work with the new make macros. It compiles on my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge.
|
1187 |
21-Feb-1994 |
rgrimes |
Add $Id$ to all, clean up multiple spaces
|
1052 |
31-Jan-1994 |
dg |
WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsu <hsu@soda.berkeley.edu>.
|