summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* The caller is expected to set up PIC register corectly beforekan2003-09-052-0/+4
| | | | | jumping to .cerror. This means .cerror has to be present in the same module with its consumers, or bad things will happen.
* Clarify that the second argument to accept() may be a null pointer ifroam2003-09-051-1/+7
| | | | | | | | | no peer address information is desired. PR: 56044 Submitted by: Felix Opatz <felix@zotteljedi.de> and Bernd Luevelsmeyer <bdluevel@heitec.net> MFC after: 1 month
* Remove an unused and incorrect prototype for _none_init().tjr2003-09-051-1/+0
|
* Move a sentence about the terminating \0 from the RETURN VALUES sectionsimon2003-09-042-14/+14
| | | | | | | | (where it didn't really belong), to the DESCRIPTION section. English advice: ceri Requested by: das MFC after: 4 weeks
* Add code to support barrier synchronous object and implementdavidxu2003-09-0413-12/+709
| | | | | | pthread_mutex_timedlock(). Reviewed by: deischen
* Remove repeated macro THR_IN_CONDQ.davidxu2003-09-042-2/+0
|
* Allow hooks registered by atexit() to run with current thread pointer set,davidxu2003-09-042-2/+8
| | | | without this change, my atexit test dumps core.
* Sigh. I can't win anything. Use addq rather than addl with %rsp.peter2003-09-041-1/+1
|
* Apply same basic fix for getcontext(2) as for i386. Store the returnpeter2003-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.
* Fix some minor whitespace botchespeter2003-09-041-1/+1
|
* Make getcontext(2) work on i386. It needs a small wrapper in libcpeter2003-09-042-2/+52
| | | | | | | | | | | | | | | | | | | | | | | otherwise the return from the syscall stub for getcontext will pop off the return value for the caller to the getcontext stub and it will appear as though the setcontext() syscall returned instead of the getcontext(). The same bug exists on amd64, a fix is coming there too. The bug can be demonstrated with this test code fragment: main() { ucontext_t top; if (getcontext(&top) == 0) { write(2, "PING!\n", 6); /* Cause a return value of 1 from getcontext this time */ top.uc_mcontext.mc_eax = 1; setcontext(&top); err(1, "setcontext() returned"); } write(2, "PONG!\n", 6); _exit(0); }
* Don't assume sizeof(long) = sizeof(int) on x86; use intdeischen2003-09-0325-42/+109
| | | | | | | | | | | | instead of long types for low-level locks. Add prototypes for some internal libc functions that are wrapped by the library as cancellation points. Add memory barriers to alpha atomic swap functions (submitted by davidxu). Requested by: bde
* Move kse_wakeup_multi call to just before KSE_SCHED_UNLOCK.davidxu2003-09-032-8/+4
| | | | Tested on: SMP
* Rethink the way thr_libc.So is generated. Relying on GCC to extractkan2003-09-024-20/+64
| | | | | | only needed symbols from libc_pic is not working on sparc64. Requested by: jake
* Fix/add errno return values to match the NFS client implementation anddds2003-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
* Update the kern.osreldate documentation to document the present formateivind2003-09-011-2/+17
| | | | | | used, and refer to <osreldate.h> to get userland date. Submitted by: ru
* Return (-1) not (ENOENT) for mac_prepare_type(), and set errno torwatson2003-08-301-1/+2
| | | | | | | ENOENT instead. Reported by: "Kenneth D. Merry" <ken@kdm.org> Submitted by: Bryan Liesner <bleez@comcast.net>
* Unbreak the NOINSTALLLIB install.ru2003-08-302-0/+4
| | | | | | PR: 50945 Submitted by: Rene de Vries <rene@tunix.nl> Reminded by: jmallett
* Allow the concurrency level to be reduced.deischen2003-08-306-70/+126
| | | | Reviewed by: davidxu
* Document that read(2) can also return EPERMdds2003-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
* Add a reference to bn(3) for those looking for functional multiprecisionseanc2003-08-301-0/+1
| | | | integer arithmetic.
* Don't close a FILE * which we know is bogus.des2003-08-291-1/+0
|
* Introduce more knobs to slim down FreeBSD userlandphk2003-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
* Ignore ccd(4)'s. This is not the best solution, but it at least removesobrien2003-08-281-0/+2
| | | | | | the "BARF 360" ccd(4) user's experience. Submitted by: rwatson
* Make build of libatm depend on existing NOATM conditional.phk2003-08-271-1/+5
|
* Clarify texteivind2003-08-261-1/+1
|
* Add HISTORY sections to the remaining MAC library man pages.rwatson2003-08-226-0/+36
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Update the mac_prepare(3) man page to reflect changes to therwatson2003-08-221-8/+43
| | | | | | | | | mac_prepare() APIs. Add a HISTORY section. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Make the elements argument to mac_prepare() be const.rwatson2003-08-221-1/+1
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* As new objects begin to support new labels, start to generalizerwatson2003-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
* Repost masked signal to kernel for scope system thread, it hardly happensdavidxu2003-08-212-12/+50
| | | | | | in real world. Reviewed by: deischen
* _thr_sig_check_pending is also called by scope system thread when it leavesdavidxu2003-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.
* Add back a loop for up to PTHREAD_DESTRUCTOR_ITERATIONS todeischen2003-08-202-24/+40
| | | | | | | destroy thread-specific data. Display a warning when thread specific data remains after PTHREAD_DESTRUCTOR_ITERATIONS. Reviewed by: davidxu
* Add a kluge suggested by Marcel to paper over the difference betweenwollman2003-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
* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEMwollman2003-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)
* Some servers respond to RETR in active mode with 125 (connection alreadydes2003-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
* Support printing 64 bits pointer and long integer.davidxu2003-08-192-20/+54
| | | | Reviewed by: deischen
* Save and restore errno around sigprocmask.davidxu2003-08-192-2/+10
|
* style.Makefile(5)obrien2003-08-1815-21/+17
|
* Direct call exit if thread was never created. This makes it safe to calldavidxu2003-08-182-0/+4
| | | | | | pthread_exit in main() without creating any thread. Tessted by: deischen
* Treat initial thread as scope system thread when KSE mode is not activateddavidxu2003-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
* It is not an error to have no devices.phk2003-08-171-1/+1
|
* Stage 3 of dynamic root support. Make all the libraries needed to rungordon2003-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.
* Imply NOLIBC_R for PowerPC.obrien2003-08-161-1/+1
|
* Fix wrong identifier on .end directive. The SYSCALL macro does namemarcel2003-08-164-4/+4
| | | | mangling and creates an .ent directive with the mangled name.
* If threaded mode is not turned on yet, direct call __sys_sched_yield.davidxu2003-08-162-4/+6
|
* Replace some syscalls with libc version, this makes abort work better withdavidxu2003-08-161-10/+7
| | | | | | libkse. Tested under libc_r, libkse, libthr. Reviewed by: deischen
* Keep initial kse and kse group just like we keep initial thread,davidxu2003-08-162-18/+22
| | | | | | Don't free them, so some code can still reference them. Reviewed by: deischen
* Access user provided pointer out of lock, and also check the case whendavidxu2003-08-162-16/+20
| | | | a key is less than 0.
* Don't run verify directly as that would require the perl script tomarcel2003-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.
OpenPOWER on IntegriCloud