summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add const to __setrunelocale prototypeAndrey A. Chernov2003-07-061-4/+4
| | | | Notes: svn path=/head/; revision=117274
* Reorganize wrapper around setrunelocale() to mark it as deprecatedAndrey A. Chernov2003-07-063-25/+41
| | | | | | | in FreeBSD 6 Notes: svn path=/head/; revision=117270
* Add more useful cross-references to the SEE ALSO section.Tim J. Robbins2003-07-051-2/+7
| | | | Notes: svn path=/head/; revision=117253
* Catch up with recent FP-related changes to scanf.3 and vfwscanf.c.Tim J. Robbins2003-07-051-31/+16
| | | | Notes: svn path=/head/; revision=117252
* Fix two incorrect uses of sizeof: we need to divide the size of the bufferTim J. Robbins2003-07-051-11/+6
| | | | | | | | | by sizeof(wchar_t) to get the number of wide characters it contains. Remove the !hardway micro-optimisation from the CT_INT case to avoid having to fix it for wide characters. Notes: svn path=/head/; revision=117250
* Merge recent floating point conversion changes from vfscanf.c.Tim J. Robbins2003-07-051-93/+175
| | | | Notes: svn path=/head/; revision=117249
* Correctly lock/unlock signal lock. I must be in bad state, need to sleep.David Xu2003-07-042-2/+4
| | | | Notes: svn path=/head/; revision=117217
* Always check and restore sigaction previously set, also access user parameterDavid Xu2003-07-042-8/+14
| | | | | | | outside of lock. Notes: svn path=/head/; revision=117216
* With the latest mdoc(7), we can now fix the synopsis like this.Ruslan Ermilov2003-07-031-3/+9
| | | | | | | Desired by: bde Notes: svn path=/head/; revision=117204
* If select() is only used for sleep, convert it to nanosleep,David Xu2003-07-032-8/+18
| | | | | | | it only need purely wait in user space. Notes: svn path=/head/; revision=117197
* _pthread_mutex_trylock() is another internal libc function that must blockMike Makonnen2003-07-031-0/+8
| | | | | | | signals. Notes: svn path=/head/; revision=117196
* Check if thread is in critical region, only testing check_pendingDavid Xu2003-07-032-2/+4
| | | | | | | is not enough. Notes: svn path=/head/; revision=117193
* Style.Ruslan Ermilov2003-07-022-4/+4
| | | | Notes: svn path=/head/; revision=117179
* Take thr_support.c out of SRCS so that it does not end up in libraries.Ruslan Ermilov2003-07-024-6/+16
| | | | | | | | | Record the missing dependency of thr_libc.So on the libc_pic.a library. OK'ed by: kan Notes: svn path=/head/; revision=117178
* Set unlock_mutex to 1 after locked mutex.David Xu2003-07-022-4/+8
| | | | | | | | Use THR_CONDQ_CLEAR not THR_COND_SET in cond_queue_deq, current cond_queue_deq is not used. Notes: svn path=/head/; revision=117165
* Make libc/${MACHINE_ARCH} include directory not required by Alpha.Ruslan Ermilov2003-07-022-2/+2
| | | | | | | | Submitted by: bde Tested by: beast Notes: svn path=/head/; revision=117163
* Fix typo.David Xu2003-07-022-2/+2
| | | | Notes: svn path=/head/; revision=117162
* When size is 1 should just null terminate the string. The dummy variableJordan K. Hubbard2003-07-021-3/+5
| | | | | | | | | | | | is made an array of two, to explicitly avoid stack corruption due to null-terminating (which is doesn't actually happen due to stack alignment padding). Submitted by: Ed Moy <emoy@apple.com> Obtained from: Apple Computer, Inc. Notes: svn path=/head/; revision=117147
* Begin making libthr async signal safe.Mike Makonnen2003-07-021-2/+22
| | | | | | | | | | | Create a private, single underscore, version of pthread_mutex_unlock for libc. pthread_mutex_lock already has one. These versions are different from the ones that applications will link against because they block all signals from the time a call to lock the mutex is made until it is successfully unlocked. Notes: svn path=/head/; revision=117145
* libc/${MACHINE_ARCH} include directory is required by Alpha,Alexander Kabaev2003-07-021-1/+1
| | | | | | | add it to CFLAGS. Notes: svn path=/head/; revision=117144
* Add a new mount flag MNT_BYFSID that can be used to unmount a fileIan Dowse2003-07-011-1/+17
| | | | | | | | | | | | | | | | | | | | | system by specifying the file system ID instead of a path. Use this by default in umount(8). This avoids the need to perform any vnode operations to look up the mount point, so it makes it possible to unmount a file system whose root vnode cannot be looked up (e.g. due to a dead NFS server, or a file system that has become detached from the hierarchy because an underlying file system was unmounted). It also provides an unambiguous way to specify which file system is to be unmunted. Since the ability to unmount using a path name is retained only for compatibility, that case now just uses a simple string comparison of the supplied path against f_mntonname of each mounted file system. Discussed on: freebsd-arch mdoc help from: ru Notes: svn path=/head/; revision=117132
* Do not attempt to reque a thread on a mutex queue. It may be thatMike Makonnen2003-07-011-1/+1
| | | | | | | | | | | | a thread receives a spurious wakeup from sigtimedwait(), so make sure that the call to the queueing code is called only once before entering the loop (not in the loop). This should fix some fatal errors people are seeing with messages stating the thread is already on the mutex queue. These errors may still be triggered from signal handlers; however, since that part of the code is not locked down yet. Notes: svn path=/head/; revision=117127
* Unbreak "make checkdpadd".Ruslan Ermilov2003-07-012-2/+2
| | | | Notes: svn path=/head/; revision=117125
* o strmode(3) returns void not 0.Maxim Konovalov2003-07-011-5/+0
| | | | | | | | | PR: docs/53488 Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> MFC after: 1 week Notes: svn path=/head/; revision=117123
* Axe AINC.Ruslan Ermilov2003-07-016-7/+2
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=117120
* Fixed some style bugs.Bruce Evans2003-07-011-6/+7
| | | | Notes: svn path=/head/; revision=117111
* Don't segfault if setproctitle(3) is called with NULL initially.Alfred Perlstein2003-07-011-0/+1
| | | | | | | | | | | The old buffer was not being initialized and a later str*() op on it would cause a crash if it wasn't initialized by a previous call to setproctitle(3) with an actual string. Noticed by: Ashley Penney <ashp@unloved.org> Notes: svn path=/head/; revision=117102
* Separate the description of the flags for mount(2) and unmount(2)Ian Dowse2003-06-301-14/+16
| | | | | | | | | | | to clarify which system call accepts which arguments. Previously the manual page gave the impression that calling unmount() with flags of (MNT_FORCE | MNT_UPDATE | MNT_RDONLY) would downgrade a read-write mount to read-only, which is clearly untrue; to do that, these flags should be passed to mount() instead. Notes: svn path=/head/; revision=117089
* bsd.lib.mk,v 1.143 no longer uses ld(1) directly to stripRuslan Ermilov2003-06-301-1/+0
| | | | | | | | | | symbols from intermediate object files, so these hacks to get AMD64 compile are no longer needed. Tested on: sledge.FreeBSD.org Notes: svn path=/head/; revision=117081
* MFi386: revision 1.19.Ruslan Ermilov2003-06-301-3/+1
| | | | Notes: svn path=/head/; revision=117074
* Catchup with _thread_suspend() changes.Mike Makonnen2003-06-303-3/+9
| | | | Notes: svn path=/head/; revision=117073
* Because there are only _SIG_MAXSIG elements in thread siginfo array,David Xu2003-06-306-32/+32
| | | | | | | use [signal number - 1] as subscript to access the array. Notes: svn path=/head/; revision=117066
* Remove surplus unlocking code I accidentally checked in. This won't beDavid Xu2003-06-302-8/+0
| | | | | | | triggered until LDT entry is exhausted. Notes: svn path=/head/; revision=117063
* Sweep through pthread locking and use the new locking primitives forMike Makonnen2003-06-297-20/+21
| | | | | | | libthr. Notes: svn path=/head/; revision=117049
* Locking primitives and operations in libthr should use struct umtx,Mike Makonnen2003-06-292-4/+22
| | | | | | | | | | | | | | not spinlock_t. Spinlock_t and the associated functions and macros may require blocking signals in order for async-safe libc functions to behave appropriately in libthr. This is undesriable for libthr internal locking. So, this is the first step in completely separating libthr from libc's locking primitives. Three new macros should be used for internal libthr locking from now on: THR_LOCK, THR_TRYLOCK, THR_UNLOCK. Notes: svn path=/head/; revision=117048
* In a critical section, separate the aquisition of the thread lockMike Makonnen2003-06-292-17/+27
| | | | | | | | | | | | | | | and the disabling of signals. What we are really interested in is keeping track of recursive disabling of signals. We should not be recursively acquiring thread locks. Any such situations should be reorganized to not require a recursive lock. Separating the two out also allows us to block signals independent of acquiring thread locks. This will be needed in libthr in the near future when we put the pieces together to protect libc functions that use pthread mutexes and low level locks. Notes: svn path=/head/; revision=117046
* Add a libc function execvP that takes the search path as an arguement.Gordon Tetlow2003-06-292-15/+40
| | | | | | | | | | | Change execvp to be a wrapper around execvP. This is necessary for some of the /rescue pieces. It may also be more generally applicable as well. Submitted by: Tim Kientzle <kientzle@acm.org> Approved by: Silence on arch@ Notes: svn path=/head/; revision=117030
* Make _thread_suspend work with both the old broken sigtimedwaitJohn Polstra2003-06-293-11/+31
| | | | | | | | | implementation and the new improved one. We now precompute the signal set passed to sigtimedwait, using an inverted set when necessary for compatibility with older kernels. Notes: svn path=/head/; revision=117026
* Teach fmtcheck(3) about the flags a, A, F, G, t, and z.David Schultz2003-06-291-8/+28
| | | | Notes: svn path=/head/; revision=117014
* The move to _retire() a thread in the GC instead of in the thread'sMike Makonnen2003-06-293-21/+5
| | | | | | | | | | exit function has invalidated the need for _spin[un]lock_pthread(). The _spin[un]lock() functions can now dereference curthread without the danger that the ldtentry containing the pointer to the thread has been cleared out from under them. Notes: svn path=/head/; revision=117012
* mdoc(7) fix: Use the normal AT&T macro (.At) rather than itsRuslan Ermilov2003-06-281-1/+1
| | | | | | | internal string in the macro context. Notes: svn path=/head/; revision=117007
* o Use a daemon thread to monitor signal events in kernel, if pendingDavid Xu2003-06-2827-1172/+1622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | signals were changed in kernel, it will retrieve the pending set and try to find a thread to dispatch the signal. The dispatching process can be rolled back if the signal is no longer in kernel. o Create two functions _thr_signal_init() and _thr_signal_deinit(), all signal action settings are retrieved from kernel when threading mode is turned on, after a fork(), child process will reset them to user settings by calling _thr_signal_deinit(). when threading mode is not turned on, all signal operations are direct past to kernel. o When a thread generated a synchoronous signals and its context returned from completed list, UTS will retrieve the signal from its mailbox and try to deliver the signal to thread. o Context signal mask is now only used when delivering signals, thread's current signal mask is always the one in pthread structure. o Remove have_signals field in pthread structure, replace it with psf_valid in pthread_signal_frame. when psf_valid is true, in context switch time, thread will backout itself from some mutex/condition internal queues, then begin to process signals. when a thread is not at blocked state and running, check_pending indicates there are signals for the thread, after preempted and then resumed time, UTS will try to deliver signals to the thread. o At signal delivering time, not only pending signals in thread will be scanned, process's pending signals will be scanned too. o Change sigwait code a bit, remove field sigwait in pthread_wait_data, replace it with oldsigmask in pthread structure, when a thread calls sigwait(), its current signal mask is backuped to oldsigmask, and waitset is copied to its signal mask and when the thread gets a signal in the waitset range, its current signal mask is restored from oldsigmask, these are done in atomic fashion. o Two additional POSIX APIs are implemented, sigwaitinfo() and sigtimedwait(). o Signal code locking is better than previous, there is fewer race conditions. o Temporary disable most of code in _kse_single_thread as it is not safe after fork(). Notes: svn path=/head/; revision=116977
* Use mmap retuned value.David Xu2003-06-282-4/+6
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=116976
* Temporary disable rwlock based code, replace it with low level KSE lockingDavid Xu2003-06-282-0/+184
| | | | | | | | | | code until rtld-elf and libkse can cooperate better, those code can be restored. Reviewed by: deischen Notes: svn path=/head/; revision=116975
* Write new thread pointer back only when success.David Xu2003-06-282-6/+8
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=116974
* After thread was interrupted by signal, it should relock mutex.David Xu2003-06-282-4/+2
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=116973
* if thread is exiting, just returns. kse_thr_interrupt interfaceDavid Xu2003-06-282-4/+12
| | | | | | | | | | was changed, it needs signal parameter, pass -1 to it, it indicates to interrupt syscall. Reviewed by: deischen Notes: svn path=/head/; revision=116972
* Update to reflect changes in vfscanf.c,v 1.32. Remove bogusDavid Schultz2003-06-281-35/+14
| | | | | | | | | | documentation for %a, and document it correctly instead. s/one of aefg/one of a, e, f, or g/ Reviewed by: standards@ Notes: svn path=/head/; revision=116968
* Revamp scanf's floating-point-parsing algorithm to supportDavid Schultz2003-06-281-94/+172
| | | | | | | | | | | [+|-]Inf, [+|-]NaN, nan(...), and hexidecimal FP constants. While here, add %a and %A, which are aliases for %e, and add support for long doubles. Reviewed by: standards@ Notes: svn path=/head/; revision=116967
* Create compatibility links for libc_r on ia64 to prevent build-timeMarcel Moolenaar2003-06-271-0/+12
| | | | | | | | | | | | breakages. Note that runtime compatibility is not guaranteed. Future changes to setjmp/longjmp in libc will break threaded applications linked against libc_r.so.5 on ia64. We pull our "tier 2" card once more... Reviewed by: ru Notes: svn path=/head/; revision=116920