summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Move kse_wakeup_multi call to just before KSE_SCHED_UNLOCK.David Xu2003-09-032-8/+4
| | | | | | | Tested on: SMP Notes: svn path=/head/; revision=119700
* Rethink the way thr_libc.So is generated. Relying on GCC to extractAlexander Kabaev2003-09-024-20/+64
| | | | | | | | | only needed symbols from libc_pic is not working on sparc64. Requested by: jake Notes: svn path=/head/; revision=119693
* Fix/add errno return values to match the NFS client implementation andDiomidis Spinellis2003-09-022-5/+16
| | | | | | | | | | | better represent failures of special files accessed over NFS. Approved by: schweikh (mentor) Reviewed by: bde (as a description) MFC after: 6 weeks Notes: svn path=/head/; revision=119688
* Update the kern.osreldate documentation to document the present formatEivind Eklund2003-09-011-2/+17
| | | | | | | | | used, and refer to <osreldate.h> to get userland date. Submitted by: ru Notes: svn path=/head/; revision=119654
* Return (-1) not (ENOENT) for mac_prepare_type(), and set errno toRobert Watson2003-08-301-1/+2
| | | | | | | | | | ENOENT instead. Reported by: "Kenneth D. Merry" <ken@kdm.org> Submitted by: Bryan Liesner <bleez@comcast.net> Notes: svn path=/head/; revision=119588
* Unbreak the NOINSTALLLIB install.Ruslan Ermilov2003-08-302-0/+4
| | | | | | | | | PR: 50945 Submitted by: Rene de Vries <rene@tunix.nl> Reminded by: jmallett Notes: svn path=/head/; revision=119581
* Allow the concurrency level to be reduced.Daniel Eischen2003-08-306-70/+126
| | | | | | | Reviewed by: davidxu Notes: svn path=/head/; revision=119577
* Document that read(2) can also return EPERMDiomidis Spinellis2003-08-301-0/+3
| | | | | | | | | | | | | | | | | | | | See e.g. nfsclient/nfs_vnops.c static int nfs_read(struct vop_read_args *ap) { struct vnode *vp = ap->a_vp; if (vp->v_type != VREG) return (EPERM); return (nfs_bioread(vp, ap->a_uio, ap->a_ioflag, ap->a_cred)); } Approved by: schweikh (mentor) MFC after: 6 weeks Notes: svn path=/head/; revision=119570
* Add a reference to bn(3) for those looking for functional multiprecisionSean Chittenden2003-08-301-0/+1
| | | | | | | integer arithmetic. Notes: svn path=/head/; revision=119567
* Don't close a FILE * which we know is bogus.Dag-Erling Smørgrav2003-08-291-1/+0
| | | | Notes: svn path=/head/; revision=119557
* Introduce more knobs to slim down FreeBSD userlandPoul-Henning Kamp2003-08-291-1/+5
| | | | | | | | | | NO_TOOLCHAIN skips Compilers and Binutils NO_USB skips USB stuff NO_VINUM skips Vinum stuff NO_ACPI skips ACPI stuff Notes: svn path=/head/; revision=119553
* Ignore ccd(4)'s. This is not the best solution, but it at least removesDavid E. O'Brien2003-08-281-0/+2
| | | | | | | | | the "BARF 360" ccd(4) user's experience. Submitted by: rwatson Notes: svn path=/head/; revision=119532
* Make build of libatm depend on existing NOATM conditional.Poul-Henning Kamp2003-08-271-1/+5
| | | | Notes: svn path=/head/; revision=119508
* Clarify textEivind Eklund2003-08-261-1/+1
| | | | Notes: svn path=/head/; revision=119492
* Add HISTORY sections to the remaining MAC library man pages.Robert Watson2003-08-226-0/+36
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119321
* Update the mac_prepare(3) man page to reflect changes to theRobert Watson2003-08-221-8/+43
| | | | | | | | | | | | mac_prepare() APIs. Add a HISTORY section. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119320
* Make the elements argument to mac_prepare() be const.Robert Watson2003-08-221-1/+1
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119317
* As new objects begin to support new labels, start to generalizeRobert Watson2003-08-221-86/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the default label support in /etc/mac.conf. Rather than maintain each default label type in an explicit global variable in mac.c, keep a list of defaults loaded from the configuration file. Generalize the parsing so that we support both the older: default_file_labels foo default_ifnet_labels foo default_process_labels foo And also a new: default_labels file foo default_labels ifnet foo default_labels process foo We now accept arbitrary object classes in the first argument. If the same object is specified more than once, we discard the earlier definition in favor of the later one. Add a new API, mac_prepare_type(), which accepts a mac_t to prepare, as well as an object name in the second argument, which will pull a default label set for the object out of the configuration loaded by mac_init_internal(). This permits the libc to adapt to new objects known about by applications but not by libc at compile-time. Also liberalize the error handling a bit: if we're using implicit initialization (i.e., the application didn't explicitly initialize the MAC code), ignore syntax errors and only use valid lines. In the future, we may want to add explicit warnings and do this a bit more consistently. While here, add support for a MAC_CONFFILE environmental variable, which may be used to specify an alternative mac.conf configuration file if the application isn't running with modified privilege (issetugid()). Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=119314
* Repost masked signal to kernel for scope system thread, it hardly happensDavid Xu2003-08-212-12/+50
| | | | | | | | | in real world. Reviewed by: deischen Notes: svn path=/head/; revision=119249
* _thr_sig_check_pending is also called by scope system thread when it leavesDavid Xu2003-08-202-0/+6
| | | | | | | | | | | | critical region, we wrap some syscalls for thread cancellation point, and when syscalls returns, we call _thr_leave_cancellation_point, at the time if a signal comes in, it would be buffered, and when the thread leaves _thr_leave_cancellation_point, buffered signals will be processed, to avoid messing up normal syscall errno, we should save and restore errno around signal handling code. Notes: svn path=/head/; revision=119177
* Add back a loop for up to PTHREAD_DESTRUCTOR_ITERATIONS toDaniel Eischen2003-08-202-24/+40
| | | | | | | | | | destroy thread-specific data. Display a warning when thread specific data remains after PTHREAD_DESTRUCTOR_ITERATIONS. Reviewed by: davidxu Notes: svn path=/head/; revision=119154
* Add a kluge suggested by Marcel to paper over the difference betweenGarrett Wollman2003-08-192-0/+4
| | | | | | | | | | | | | | | gethostname()'s old and new signatures without requiring a library bump. Note that programs which called gethostname() with a negative argument were already broken, since the same type conversion was done by the old implementation. Add a note in the Makefile so that whoever next bumps the libc revision will delete the kluge at the same time (as it will no longer be necessary). This is only operative on 64-bit platforms. Submitted by: marcel Notes: svn path=/head/; revision=119151
* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEMGarrett Wollman2003-08-192-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the buffer is not long enough to hold the current host name. POSIX does not standardize error returns for gethostname(), so it doesn't matter which one we use, but ENAMETOOLONG is at least a little more intuitive, and mi suggests the existence of prior art. I've been running with this change for a while on my home machine with no effect. At the same time, I've updated the prototype for gethostname() to use the correct standard type (size_t) for the namelen argument. All of the in-tree callers fall into one of the following categories: 1) Call perror() or equivalent when gethostname() fails. 2) Ignore gethostname()'s return value entirely, potentially resulting in data corruption if the buffer is too small. 3) Fall back to a (possibly sensible) default value if gethostname() fails. Many of the callers I examined shows signs of confusion about the correct sizing of the host name buffer. gethostname(3) now has more information about this, as well as updated standards information. PR: 48114 Submitted by: mi (in part) Notes: svn path=/head/; revision=119140
* Some servers respond to RETR in active mode with 125 (connection alreadyDag-Erling Smørgrav2003-08-191-1/+1
| | | | | | | | | | | open) rather than 150 (opening connection). There's no reason why we shouldn't accept that. PR: misc/42172 MFC in: 3 days Notes: svn path=/head/; revision=119123
* Support printing 64 bits pointer and long integer.David Xu2003-08-192-20/+54
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=119117
* Save and restore errno around sigprocmask.David Xu2003-08-192-2/+10
| | | | Notes: svn path=/head/; revision=119099
* style.Makefile(5)David E. O'Brien2003-08-1815-21/+17
| | | | Notes: svn path=/head/; revision=119071
* Direct call exit if thread was never created. This makes it safe to callDavid Xu2003-08-182-0/+4
| | | | | | | | | pthread_exit in main() without creating any thread. Tessted by: deischen Notes: svn path=/head/; revision=119064
* Treat initial thread as scope system thread when KSE mode is not activatedDavid Xu2003-08-1824-162/+94
| | | | | | | | | | | | yet, so we can protect some locking code from being interrupted by signal handling. When KSE mode is turned on, reset the thread flag to scope process except we are running in 1:1 mode which we needn't turn it off. Also remove some unused member variables in structure kse. Tested by: deischen Notes: svn path=/head/; revision=119063
* It is not an error to have no devices.Poul-Henning Kamp2003-08-171-1/+1
| | | | Notes: svn path=/head/; revision=119029
* Stage 3 of dynamic root support. Make all the libraries needed to runGordon Tetlow2003-08-1720-10/+30
| | | | | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified. Notes: svn path=/head/; revision=119017
* Imply NOLIBC_R for PowerPC.David E. O'Brien2003-08-161-1/+1
| | | | Notes: svn path=/head/; revision=119002
* Fix wrong identifier on .end directive. The SYSCALL macro does nameMarcel Moolenaar2003-08-164-4/+4
| | | | | | | mangling and creates an .ent directive with the mangled name. Notes: svn path=/head/; revision=118997
* If threaded mode is not turned on yet, direct call __sys_sched_yield.David Xu2003-08-162-4/+6
| | | | Notes: svn path=/head/; revision=118989
* Replace some syscalls with libc version, this makes abort work better withDavid Xu2003-08-161-10/+7
| | | | | | | | | libkse. Tested under libc_r, libkse, libthr. Reviewed by: deischen Notes: svn path=/head/; revision=118988
* Keep initial kse and kse group just like we keep initial thread,David Xu2003-08-162-18/+22
| | | | | | | | | Don't free them, so some code can still reference them. Reviewed by: deischen Notes: svn path=/head/; revision=118985
* Access user provided pointer out of lock, and also check the case whenDavid Xu2003-08-162-16/+20
| | | | | | | a key is less than 0. Notes: svn path=/head/; revision=118984
* Don't run verify directly as that would require the perl script toMarcel Moolenaar2003-08-132-6/+8
| | | | | | | | | have execute permissions. Run "perl verify" instead. Replace all occurences of the hardcoding of ./verify with $(VERIFY) to allow it to be overridden as well. Notes: svn path=/head/; revision=118854
* Always set tcb for bound thread, and switch tcb for M:N thread at correctDavid Xu2003-08-132-14/+36
| | | | | | | time. Notes: svn path=/head/; revision=118850
* Don't forget to set kcb_self.David Xu2003-08-122-0/+2
| | | | Notes: svn path=/head/; revision=118844
* Correctly set current tcb. This fixes some IA64/KSE problems.David Xu2003-08-122-34/+22
| | | | | | | Reviewed by: deischen, julian Notes: svn path=/head/; revision=118817
* Make the documentation of PT_STEP match its implementation: theIan Dowse2003-08-111-2/+3
| | | | | | | | | | `data' parameter is not ignored; if non-zero, it specifies a signal number to be delivered to the traced process. MFC after: 1 day Notes: svn path=/head/; revision=118780
* Add the mlockall()/munlockall() system call manual page from NetBSD.Bruce M Simpson2003-08-111-0/+140
| | | | | | | | | | | PR: kern/42426, standards/54223 Obtained from: NetBSD Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=118773
* Add the mlockall() and munlockall() system calls.Bruce M Simpson2003-08-117-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Add some quick pathes to exit process when signal action is default andDavid Xu2003-08-102-0/+42
| | | | | | | | | signal can causes process to exit. Reviewed by: deischen Notes: svn path=/head/; revision=118748
* Initialize rtld lock just before turning on thread mode andDavid Xu2003-08-106-70/+74
| | | | | | | uninitialize rtld lock after thread mode shutdown. Notes: svn path=/head/; revision=118747
* If thread mode is not activated yet, just call __sys_fork() directly,David Xu2003-08-102-2/+44
| | | | | | | | | | | otherwise masks all signals until fork() returns, in child process, we reset library state before restoring signal masks until we reach a safe to point. Reviewed by: deischen Notes: svn path=/head/; revision=118746
* Tweak rtld lock to allow recursive on reader lock and detect recursiveDavid Xu2003-08-102-20/+134
| | | | | | | | | on writer lock. This is first cut at rwlock for rtld. Submitted by: desichen Notes: svn path=/head/; revision=118745
* If thread mode is not activated yet, don't do extra work.David Xu2003-08-102-0/+8
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=118744
* For type 0 rng lower initial drop to 50, it is enough to hide linearityAndrey A. Chernov2003-08-101-1/+5
| | | | | | | Reorganize historic #ifdef section Notes: svn path=/head/; revision=118731