summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix a strict aliasing issue. Also remove an unnecessary pam_get_item()des2003-12-111-8/+6
| | | | | | | call (pam_get_authtok() will return the previous token if try_first_pass or use_first_pass is specified). Incidentally fix an ugly bug where the buffer holding the prompt was freed immediately before use, instead of after.
* More strict aliasing fixes.des2003-12-111-26/+29
| | | | Submitted by: Andreas Hauser <andy-freebsd@splashground.de>
* Fix strict aliasing breakage in PAM modules (except pam_krb5, which needsdes2003-12-119-42/+44
| | | | more work than the others). This should make most modules build with -O2.
* Fixed English error in previous commit. Fixed some older English errors.bde2003-12-111-6/+5
| | | | Removed a redundant clause.
* Remove uses of GIANT_LOCK and replace with appropriate threadmtm2003-12-111-7/+12
| | | | and thread list locks.
* Add reference to standards/55112 for next time SHLIB_MAJOR is bumped.mikeh2003-12-101-0/+1
| | | | Suggested by: wollman
* Implement seeking to earlier offsets in gzipfs. This allows my loadergreen2003-12-101-15/+30
| | | | | to e.g. correctly load all .ko.gz's I've tried, as opposed to messing up trying to read section headers on some of them.
* Add sticky(8) cross reference.dds2003-12-101-1/+2
| | | | | | PR: docs/60068 Submitted by: Ken Stailey MFC after: 2 weeks
* PowerPC-conditional changes:grehan2003-12-101-1/+7
| | | | | | - include ashldi3.c/ashrdi3.c from libc for UFS 64-bit arith - pull in syncicache.c from libc, and define _STANDALONE for loader usage
* - Put manh/manl bitfields into correct-sized integral type.grehan2003-12-101-5/+4
| | | | - remove XXX normalization bit comment, code is correct.
* Add a short description of the kse_switchin(2) syscall to the ksemarcel2003-12-102-2/+14
| | | | | manpage and add a kse_switchin link. While here, list kse_thr_interrupt before kse_wakeup in the MLINKS variable and the synopsis.
* accept() returns a file descriptor when it succeeds which is verydeischen2003-12-094-4/+4
| | | | | | | | | likely to be non-zero. When leaving the cancellation point, check the return value against -1 to see if cancellation should be checked. While I'm here, make the same change to connect() just to be consisitent. Pointed out by: davidxu
* Remove an unused struct definition.deischen2003-12-092-24/+0
|
* Add cancellation points for accept() and connect().deischen2003-12-099-0/+208
|
* Take a stab at fixing some of the macro-nightmare.mtm2003-12-091-46/+23
| | | | | | PTHREAD_NEW_STATE should work as expected now: a thread marked PS_RUNNING will get sent a SIGTHR. Still more cleanups necessary.
* Fix the wrapper function around signals so that a signal handlingmtm2003-12-095-58/+57
| | | | | thread on one of the mutex or condition variable queues is removed from those queues before the real signal handler is called.
* Ugghh, cvs add the functions necessary to lock the global signal actionmtm2003-12-091-0/+91
| | | | table.
* o Add a wrapper around sigaction(2), so we can insert our own wrappermtm2003-12-093-0/+62
| | | | | around signals. o Lock the process global signal action table.
* Enable cancellation points around some syscalls.mtm2003-12-091-28/+28
|
* Use mutex instead of low level thread lock to implement spinlock, thisdavidxu2003-12-092-60/+36
| | | | avoids signal to be blocked when otherwise it can be handled.
* Rename _thr_enter_cancellation_point to _thr_cancel_enter, renamedavidxu2003-12-0960-272/+296
| | | | | | | | | | | | | | | | | | | | | _thr_leave_cancellation_point to _thr_cancel_leave, add a parameter to _thr_cancel_leave to indicate whether cancellation point should be checked, this gives us an option to not check cancallation point if a syscall successfully returns to avoid any leaks, current I have creat(), open() and fcntl(F_DUPFD) to not check cancellation point after they sucessfully returned. Replace some members in structure kse with bit flags to same some memory. Conditionally compile THR_ASSERT to nothing if _PTHREAD_INVARIANTS is not defined. Inline some small functions in thr_cancel.c. Use __predict_false in thr_kern.c for some executed only once code. Reviewd by: deischen
* More reliably check timeout for pthread_mutex_timedlock.davidxu2003-12-092-2/+2
|
* Set __mbrtowc and __wcrtomb correctly when changing to the C/POSIX locale.tjr2003-12-081-0/+14
| | | | | | | Save __mbrtowc and __wcrtomb and restore them when changing back to the cached locale. Reported by: perky
* Go back to using rev 1.18 where thread locks are used instead of KSEdeischen2003-12-082-34/+32
| | | | | | | locks for [libc] spinlock implementation. This was previously backed out because it exposed a bug in ia64 implementation. OK'd by: marcel
* Make msdosfs long filenames matching case insensitive again.fjoe2003-12-083-0/+42
| | | | | PR: 59765 Submitted by: Ryuichiro Imura <imura@ryu16.org>
* Simplify the contexts created by the kernel and remove the relatedmarcel2003-12-072-0/+12
| | | | | | | | | flags. We now create asynchronous contexts or syscall contexts only. Syscall contexts differ from the minimal ABI dictated contexts by having the scratch registers saved and restored because that's where we keep the syscall arguments and syscall return values. Since this change affects KSE, have it use kse_switchin(2) for the "new" syscall context.
* Add support for timeout: and attempts: resolver options.murray2003-12-071-0/+20
| | | | | Submitted by: Paul Vixie <paul@vix.com> / ISC MFC After: 1 week
* Split multibyte(3) into separate manual pages for each function.tjr2003-12-077-145/+543
| | | | | | Instead of just deleting it, turn the original page into a general overview of the multibyte character conversion functions, somewhat similar to stdio(3).
* Split the documentation for localeconv() off into a separate manual page.tjr2003-12-073-176/+232
|
* Fix prototype for getchar_unlocked().tjr2003-12-071-1/+1
|
* Update with the 4.9 pam modules, and add pam_opieaccess.so to the mix.obrien2003-12-076-289/+330
| | | | Approved by: re(scottl)
* Update with the 4.9 pam modules, and add pam_opieaccess.so to the mix.obrien2003-12-071-0/+1
| | | | Approved by: re(scottl)
* Update with the 4.9 libraries, and add libdevstat.so.2 libmp.so.3obrien2003-12-0723-20311/+20039
| | | | | | libskey.so.2 libusbhid.so.0 libutil.so.3 libvgl.so.2 to the mix. Approved by: re(scottl)
* Apply a second fix for stack alignment with libkse. This time, enter thepeter2003-12-052-4/+4
| | | | | | | | | | | UTS with the stack correctly aligned. Also, while here, use an indirect jump rather than the pushq/ret hack. This fixes threaded apps that use floating point for me, although it hasn't solved all the problems. It is an improvement though. Preservation of the 128 byte red zone hasn't been resolved yet. Approved by: re (scottl)
* "Fix" makecontext() so that the C code begins execution with itspeter2003-12-051-2/+6
| | | | | | | | | | | | | ABI-required stack alignment. C code expects that the push of the return address disturbed the 16 byte alignment and it will take corrective measures to fix it before making another call. Of course, if its wrong to start with, then all hell breaks loose. Essentially we "fix" this by making the stack alignment odd to start with. This was one of the things that broke on libkse with apps that use floating point/varargs/etc. Approved by: re (scottl)
* For the amd64 we need to do some extra stack alignment fixups. Otherwisepeter2003-12-033-6/+27
| | | | | | | | | we can end up with some threads with a non-16-byte-aligned stack. This causes some interesting side effects, including general protection faults leading to a SIGBUS when doing floating point or varargs. This should be just a verbose NOP for the other platforms. Approved by: re (scottl)
* Use dynamic instead of static LDT allocation.mtm2003-12-021-5/+4
| | | | Approved by: re (scottl)
* Fixed a bug in sendfile(2) where the sent data would be corrupted duedg2003-12-011-2/+6
| | | | | | | | | | to sendfile(2) being erroneously automatically restarted after a signal is delivered. Fixed by converting ERESTART to EINTR prior to exiting. Updated manual page to indicate the potential EINTR error, its cause and consequences. Approved by: re@freebsd.org
* Eliminate two pushl by using call instruction directly, this reallydavidxu2003-11-292-4/+2
| | | | | | helps branch predict a lot for INTEL P4. Approved by: re (scottl)
* 1.Macro optimizing KSE_LOCK_ACQUIRE and THR_LOCK_ACQUIRE to use static falldavidxu2003-11-294-198/+62
| | | | | | | | | | | | | | through branch predict as suggested in INTEL IA32 optimization guide. 2.Allocate siginfo arrary separately to avoid pthread to be allocated at 2K boundary, which hits L1 address alias problem and causes context switch to be slow down. 3.Simplify context switch code by removing redundant code, code size is reduced, so it is expected to run faster. Reviewed by: deischen Approved by: re (scottl)
* Remove surplus mmap() call for stack guard page in init_private, it is donedavidxu2003-11-292-50/+0
| | | | | | | | in init_main_thread. Also don't initialize lock and lockuser again for initial thread, it is already done by _thr_alloc(). Reviewed by: deischen Approved by: re (scottl)
* Update with the 4.9 libraries, and add libdevstat.so.2 libmp.so.3obrien2003-11-2915-16561/+17940
| | | | | | libskey.so.2 libusbhid.so.0 libutil.so.3 libvgl.so.2 to the mix. Approved by: scottl
* Do not adjust to the pagesize at runtime. Besides for the one-timemarcel2003-11-281-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization overhead, there's a problem in that we never call imalloc() and thus malloc_init() for zero-sized allocations. As a result, malloc(0) returns NULL when it's the first or only malloc in the program. Any non-zero allocation will initialize the malloc code with the side-effect that subsequent zero-sized allocations return a non-NULL pointer. This is because the pointer we return for zero- sized allocations is calculated from malloc_pageshift, which needs to be initialized at runtime on ia64. The result of the inconsistent behaviour described above is that configure scripts failed the test for a GNU compatible malloc. This resulted in a lot of broken ports. Other, even simpler, solutions were possible as well: 1. initialize malloc_pageshift with some non-zero value (say 13 for 8KB pages) and keep the runtime adjustment. 2. Stop using malloc_pageshift to calculate ZEROSIZEPTR. Removal of the runtime adjustment was chosen because then ia64 is the same as any other platform. It is not to say that using a page size obtained at runtime is bad per se. It's that there's currently a high level of gratuity for its existence and the moment it causes problems is the moment you need to get rid of it. Hence, it's not unthinkable that this commit is (partially) reverted some time in the future when we do have a good reason for it and a good way to achieve it. Approved by: re@ (rwatson) Reported by: kris (portmgr@) -- may the ports be with you
* Replace out of date struct statfs definition with a reference to statfs(2).tjr2003-11-211-64/+3
| | | | Approved by: re
* Fix problem where initgroups would silently truncate groups withdds2003-11-191-2/+7
| | | | | | | more than NGROUP elements without providing the opportunity to setgroups to fail and correctly return error and set errno. MFC after: 2 weeks
* Documented missing EINVAL errno valuedds2003-11-191-0/+6
| | | | | | | | kern_prot.c: if (ngrp > NGROUPS) return (EINVAL); MFC after: 2 weeks
* Install the user trap handlers that libc provides from a constructor, sojake2003-11-181-0/+2
| | | | | | | | that they will be installed before application constructors are invoked. Its possible to link applications such that this fails, application code is invoked before they are installed, but, well, Don't Do That. Approved by: re (jhb)
* Staticize label_default_head to prevent it from leaking out of mac.c.rwatson2003-11-171-1/+1
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Declare crc32 static. There's a copy in libz that conflicts for themarcel2003-11-171-1/+1
| | | | | | crunched binary. Found by: make release
* Baby steps. Set WARNS=1 for libc.nectar2003-11-171-0/+1
|
OpenPOWER on IntegriCloud