Commit graph

10207 commits

Author SHA1 Message Date
David Xu 1b4610fe74 1. Fix a race in aio_return.
2. Save and restore syscall errno correctly.
3. Style fix.
2006-03-01 23:41:47 +00:00
David Xu a620d0986f Style fix. 2006-03-01 23:40:00 +00:00
David Xu 5f2252c2b7 Fix a mutex lock/unlock mismatch. 2006-03-01 23:38:53 +00:00
Hajimu UMEMOTO 3a0b3b6739 Handle the errors returned by res_querydomain() in same manner.
Reported by:	yar
Tested by:	yar, Rostislav Krasny <rosti.bsd__at__gmail.com>
MFC after:	1 week
2006-03-01 15:53:49 +00:00
David Xu de86f23567 Forgot to revert to use weak symbols when I was debugging, fix it! 2006-03-01 08:50:36 +00:00
David Xu 3171d99d52 Add missing parameter mq_attr * for mq_open. 2006-03-01 08:06:09 +00:00
David Xu 4acaec8fc3 Bring in my initial version of POSIX realtime extension library.
Current the library implements mqueue, timer and aio with SIGEV_THREAD
notification supported.

Earlier version reviewed by: deischen
2006-03-01 06:37:34 +00:00
David Xu b8211fabf1 Disconnect mqueue from buildworld, as I will implement it in seperated
library.
2006-03-01 06:25:46 +00:00
Daniel Eischen 0411773be7 Const'ify arguments to a couple of functions to fix breakage
with -O2.
2006-02-28 16:02:26 +00:00
Xin LI 30b86e872b Don't do a time travel to 12006... 2006-02-28 07:36:25 +00:00
David Xu 7b8797d300 Reimplement mutex_init to get rid of compile warning. 2006-02-28 06:06:19 +00:00
Daniel Eischen 235baf269e Staticize a couple of functions.
Remove a few unused locks.

Remove locks from application namespace.
2006-02-27 22:10:59 +00:00
Daniel Eischen fc9ae54dca Correct a comment.
Staticize two tables thare are not visible in <resolv.h>
and which are also local in Solaris' libresolv.

Remove two functions that are not referenced in libc nor
anywhere else I can find, not visible in <resolv.h> and
which are also local in Solaris libresolv.
2006-02-27 22:08:16 +00:00
Wojciech A. Koszek 9d0e4617f3 Fix typo in manual page reference.
Approved by:	cognet (mentor)
MFC after:	3 days
2006-02-26 23:01:11 +00:00
Hajimu UMEMOTO 12d96fe63f Sync inet_net_pton() and inet_net_ntop() with latest BIND9's includes
an IPv6 support.

PR:		kern/93740
Submitted by:	Rudolf Cejka <cejkar__at__fit.vutbr.cz>
Obtained from:	BIND9
MFC after:	1 week
2006-02-26 05:44:21 +00:00
Joseph Koshy 177a2f2245 Add an alias 'unhalted-cycles' denoting cycles where the CPU is
not in a halt or sleep state.
2006-02-25 05:34:00 +00:00
Daniel Eischen c0addafac3 Fix a race condition introduced when redzones were added. Use an
atomic operation to return and adjust the stack.

Submitted by:	luoqi
2006-02-24 22:03:10 +00:00
Hajimu UMEMOTO 5ecccefb4a - Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.

PR:		bin/62139
Reported by:	Rostislav Krasny <rosti.bsd__at__gmail.com>
Tested by:	Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from:	BIND9 (with some modification)
MFC after:	1 week
2006-02-24 16:53:42 +00:00
Daniel Eischen aa8eff60a3 Eliminate a race condition in timed waits (cv, mutex, and sleeps).
MFC Candidate.

PR:	93592
2006-02-23 21:34:08 +00:00
Yaroslav Tykhiy 36ab780431 Tell the truth about a) how to get the first fileid, and
b) what return values from kldstat(2) can be expected.

Bump .Dd.

MFC after:	3 days
2006-02-22 15:11:12 +00:00
David Xu b620798174 Disable POSIX SIGEV_THREAD notification support, soon we will have a common
library which can be reused both for libthr and libpthread.
2006-02-22 02:52:22 +00:00
David Xu bab012a948 Read cycle count before sending signal, this fixes a userland thread
suspension bug.

MFC after: 3 days
2006-02-20 09:02:40 +00:00
Dag-Erling Smørgrav 501092bbc8 Add utility functions for checking if a given kernel module is loaded,
and loading it.
2006-02-18 11:25:28 +00:00
Brad Davis 209462832d - Massage wording to make it easier to understand and fix some grammar.
Submitted by:	sbahra at gwu dot edu
Reviewed by:	ru@
Approved by:	ceri@
MFC after:	3 days
2006-02-16 09:56:31 +00:00
Daniel Eischen 9fcaf8a4ab Don't forget to initialize a tailq before using it.
MFC candidate
Noticed by:	luoqi
2006-02-16 01:33:36 +00:00
David Xu 6f716c2f82 Rework last change of pthread_once, create a function _thr_once_init to
reinitialize its internal locks.
2006-02-15 23:05:03 +00:00
David Xu c5d2fb8df7 After fork(), reinitialize internal locks for pthread_once(). 2006-02-15 13:41:02 +00:00
George V. Neville-Neil 108b9d8319 Clean up some descriptions and remove ambiguities in the language.
Add explanations to the examples.

MFC after:	1 week
2006-02-14 13:02:00 +00:00
Tim Kientzle 32dd5577f9 Minor fixes to the code that generates an internal ustar filename
for Pax extended attribute entries.
2006-02-14 04:05:03 +00:00
Tim Kientzle f26dacb29e Extract device number information from SVR4 CPIO archives.
Without this, you cannot properly restore device node entries
from such archives.

Thanks to: Steve 'dillo Okay for reporting this oversight.
2006-02-14 04:00:14 +00:00
Alexander Kabaev 129d4752a0 Remove extra slash from pty slave device name returned by ptsname. 2006-02-13 00:04:04 +00:00
Robert Watson 10b037c1d9 Update copyright for 2006.
MFC after:	3 days
2006-02-11 19:21:39 +00:00
Robert Watson 1d90b80f28 The uma_zone data structure defines the size of its uz_cpu[] array as 1,
but then sizes the containing data structure at run-time to make room
for per-cpu cache data.  Modify libmemstat to separately allocate a
buffer to hold per-cpu cache data, sized based on the run-time mp_maxid
variable when using libkvm to access UMA data.  This avoids reading
invalid cache data from beyond the end of the uma_zone data structure
on the stack, which can result in invalid statistics and/or reads from
invalid kernel addresses.

Foot target practice by:	ps
MFC after:			3 days
2006-02-11 19:19:29 +00:00
Robert Watson 59e012a852 When reporting an error reading from UMA per-cpu cache pointers using KVM,
return a KVM error rather than an out of memory error, so that the caller
reports the KVM error state.  This replaces a misleading error message
with a more accurate although equally confusing one.

MFC after:	3 days
2006-02-11 18:55:03 +00:00
Robert Watson 3f374960e6 Read all_cpus variable out of kmem, and validate CPUs against the all_cpus
cpu mask before looking at the cache entries for the CPU.  For systems
with sparse CPU id arrays, this skips otherwise uninitialized cache
structures.

MFC after:	3 days
2006-02-11 18:44:37 +00:00
Robert Watson ee4be9485c Correct a typo in the extraction of zone information from UMA using kmem:
bytes = allocated - freed, not bytes = allocated = freed.

MFC after:	3 days
2006-02-11 16:54:00 +00:00
David Xu 4f7b0f0ee7 Use ps_linfo to retrieve LWP info, current it is used to retrieve
signal mask and pending signals.
2006-02-07 02:55:34 +00:00
David Xu 6ff81bf532 Use ps_linfo to retrieve LWP info. 2006-02-07 02:51:25 +00:00
David Xu 4db106a906 Replace ptrace syscall with ps_lgetgregs to check a LWP's existence. 2006-02-07 02:12:33 +00:00
David Xu 83154c48d6 Always clear thread info buffer to zero. 2006-02-06 11:54:19 +00:00
David Xu 8956297a57 Now, thread name is stored in kernel, userland no longer has to keep it. 2006-02-05 03:04:54 +00:00
David Xu 3f7dda33b7 use syscall thr_set_name to implement pthread_set_name_np. 2006-02-05 02:26:17 +00:00
Poul-Henning Kamp 8dcefe6112 Remove spurious "union arg" from printf.h
Make sure to always print something in the alternate time format.
2006-02-04 14:35:01 +00:00
Doug Rabson 73aba427fe The function isspace does not take a string argument. I have no idea how
this compiled before; it only worked by accident.
2006-02-04 09:40:21 +00:00
Jason Evans d8a1377b1b Fix calculation of the number of arenas to use on multi-processor systems. 2006-02-04 01:11:30 +00:00
Robert Watson 65eb7df05a Add libbsm to the library build.
Obtained from:	TrustedBSD Project
2006-02-02 10:05:39 +00:00
Joel Dahl fbf9b468d5 Expand contractions. 2006-02-01 14:33:14 +00:00
Poul-Henning Kamp f0107b2c5d Add missing 's' suffix on alternate rendition of time. 2006-01-31 08:09:37 +00:00
Hartmut Brandt f2a49a97ac Instead of printing several pieces with .Sy just enclose the 'Note' block
into a .Bf/.Ef pair.

Submitted by:	ru
2006-01-30 08:26:59 +00:00
Gleb Smirnoff 61fb9bd80c - In pipe() return the error returned by pipe_create(), rather then
hardcoded ENFILES, which is incorrect. pipe_create() can fail due
  to ENOMEM.
- Update manual page, describing ENOMEM return code.

Reviewed by:	arch
2006-01-30 08:25:04 +00:00