Commit Graph

12670 Commits

Author SHA1 Message Date
John Baldwin
5bcfe82e47 Add an internal _once() method. This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use
in both single-threaded and multi-threaded processes.  Multi-threaded
processes use the pthread_once() implementation from the threading library
while single-threaded processes use a simplified "stub" version internal
to libc.  The libc stub-version of pthread_once() now also uses the
simplified "stub" version as well instead of being a nop.

Reviewed by:	deischen, Matthew Fleming @ Isilon
Suggested by:	alc
MFC after:	1 week
2009-11-20 19:19:51 +00:00
Andrew Thompson
4594d907db Sync to P4
- fix a transfer cancelling bug/segfault [1]
 - correct a return code in the transfer cancel function.
 - add new API function, libusb20_tr_bulk_intr_sync().

Submitted by:	HPS
Reported by:	Robert Jenssen [1]
2009-11-20 08:57:25 +00:00
David Xu
72757b75bb Make following functions be cancellation points:
mq_receive
mq_send
mq_timereceive
mq_timedsend
2009-11-18 06:10:50 +00:00
David Xu
63f1103de9 link libpthread because the librt really needs it to fully function. 2009-11-18 05:09:03 +00:00
David Xu
50f5f99be1 Fix compiler warnings. 2009-11-18 01:35:36 +00:00
Gabor Kovesdan
50497e556b - Update Hungarian libc catalog 2009-11-17 18:57:44 +00:00
David E. O'Brien
8b49e38f8f Catch up with r130332 which changed the default timezone from GMT to UTC.
Otherwise the tzload() (when called by gmtload()) fails to locate the UTC
file and loads the posixrules.
2009-11-17 16:29:39 +00:00
Jung-uk Kim
853ab1b70d Sync with C.msg r199083. 2009-11-16 19:10:09 +00:00
Christian Brueffer
11ea9440c3 Fix grammar.
PR:		140459
Submitted by:	Jeremy Huddleston <Jeremyhu@apple.com>
MFC after:	1 week
2009-11-16 14:33:31 +00:00
Christian Brueffer
4f6d5fda02 Fix a memory leak in acl_from_text() in case the conversion succeeded.
Submitted by:	Jim Wilcoxson <prirun@gmail.com>
MFC after:	1 week
2009-11-16 09:28:22 +00:00
Attilio Rao
1262810177 Collapse devinfo_state_t with device_state_t in order to avoid a
structure replication and improve manteneability.

Reviewed by:	jhb, imp
Tested by:	Riccardo Torrini <riccardo at torrini dot org>
2009-11-15 16:44:43 +00:00
Colin Percival
8a7f1847b7 Change the utrace log entry for malloc_init from (0, 0, 0) to (-1, 0, 0)
in order to distinguish it from free(NULL), which is logged as (0, 0, 0).

Reviewed by:	jhb
2009-11-14 09:31:47 +00:00
Christian Brueffer
4c1195a4d1 Remove a note about vfork(4) going to be eliminated, it's here to stay.
Submitted by:	kib
MFC after:	1 week
2009-11-13 13:26:27 +00:00
Christian Brueffer
62bf66541e Improved the manpage description. The committed wording
was provided by jhb.

PR:		140528
Submitted by:	Chris Petrik <chris@officialunix.com>
Discussed with:	remko, jhb and the submitter
MFC after:	1 week
2009-11-13 13:13:35 +00:00
Dag-Erling Smørgrav
13e1b162b9 Note that nullok should not be used by processes that can't access the
password database.

PR:		bin/126650, misc/140514
MFC after:	1 week
2009-11-13 11:19:26 +00:00
Peter Pentchev
753509aeb6 Fix the grammar in the isprint(3) description.
PR:		140456
Submitted by:	Jeremy Huddleston <jeremyhu@apple.com>
2009-11-13 09:07:33 +00:00
Peter Pentchev
94317a7384 Fix the grammar in the isgraph(3) description, almost as per the PR.
PR:		140455
Submitted by:	Jeremy Huddleston <jeremyhu@apple.com>
MFC after:	2 weeks
2009-11-13 09:03:50 +00:00
Hajimu UMEMOTO
823e5e0ebf Add missing IEEE1394 support dropped during merge from NetBSD. 2009-11-12 11:54:12 +00:00
Rene Ladan
6c2af98cee Synchronize with C.msg revision 199083 and improve some existing messages.
Reviewed by:	remko
Approved by:	remko
2009-11-11 18:28:12 +00:00
Hajimu UMEMOTO
a087c7295d ANSIfy.
MFC after:	1 week
2009-11-11 15:21:06 +00:00
Peter Pentchev
82a1bd6a61 Fix the grammar as in the PR, and then some.
PR:		140454
Submitted by:	Jeremy Huddleston <jeremyhu@apple.com>
MFC after:	2 weeks
2009-11-11 11:31:02 +00:00
Hajimu UMEMOTO
1789887000 Add Japanese catalogue entries for newer errnos: EBADMSG, EMULTIHOP,
ENOLINK, EPROTO, ENOTCAPABLE.
2009-11-10 03:56:51 +00:00
Hajimu UMEMOTO
9020e36353 Add gai_strerror() catalog for ja_JP.UTF-8 and ja_JP.eucJP. 2009-11-09 17:26:16 +00:00
Hajimu UMEMOTO
0d384326cd Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.
2009-11-09 12:46:59 +00:00
Hajimu UMEMOTO
42f4692f52 Fix comment.
Pointed out by:	nyan
MFC after:	1 week
2009-11-09 12:38:13 +00:00
Hajimu UMEMOTO
be77e7423c Add ja_JP.eucJP catalog.
Reviewed by:	hrs, nork, takawata
MFC after:	1 week
2009-11-09 12:33:47 +00:00
Hajimu UMEMOTO
6bf41ac159 Add ja_JP.UTF-8 catalog.
Reviewed by:	hrs, nork, takawata
MFC after:	1 week
2009-11-09 12:28:59 +00:00
Andrew Thompson
ccef4ddf40 - fix refcounting error during data transfer
- fix a memory leak on the USB backend
- fix invalid pointer computations (in one case memory outside the allocated
  area was written in LibUSB v1.0)
- make sure memory is always initialised, also in failing cases
- add missing functions from v1.0.4

PR:		usb/140325
Reported by:	Robert Jenssen
Submitted by:	Hans Petter Selasky
MFC After:	3 days
2009-11-08 20:03:52 +00:00
Christian Brueffer
36ba9f409d Fix a copy+paste error by checking the correct variable against MM_NULLACT.
PR:		140386
Submitted by:	soulcatcher <soulcatcher13@gmail.com
MFC after:	1 week
2009-11-08 14:02:54 +00:00
Gabor Kovesdan
f93a16d57d - Strip trailing CRs
Requested by:	Alex Kozlov <spam@rm-rf.kiev.ua> (via private mail)
2009-11-08 11:55:03 +00:00
Gabor Kovesdan
88260ae614 - Update Ukranian catalog
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua> (via private mail)
2009-11-08 11:32:39 +00:00
John Baldwin
50c3239e85 Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel.

Submitted by:	Dorr H. Clark  dclark of engr.scu.edu
MFC after:	1 week
2009-11-06 13:10:12 +00:00
Ed Schouten
54a1c2b5aa Add MAP_ANONYMOUS.
Many operating systems also provide MAP_ANONYMOUS. It's not hard to
support this ourselves, we'd better add it to make it more likely for
applications to work out of the box.

Reviewed by:	alc (mman.h)
2009-11-06 07:17:31 +00:00
Marcel Moolenaar
c2ef543ba1 IP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL
instead.
2009-11-05 06:08:04 +00:00
Christian Brueffer
cf6c5eebe7 Use our canonical .Dd format.
Submitted by:	Ulrich Spoerlein
2009-11-02 12:35:38 +00:00
Colin Percival
4054af4fb0 Attempt to reduce accidental foot-shooting by pointing out that
accept(2)ed sockets do not necessarily inherit O_NONBLOCK from
listening sockets on non-FreeBSD platforms.

Feet shot:	cperciva
MFC after:	1 month
2009-11-02 07:21:13 +00:00
Christian Brueffer
a79d48f537 Initialize f_rabuf in the raw device case. A subsequent close()
later on would try to free it, leading to a crash.

PR:		93998
Submitted by:	neel
MFC after:	1 week
2009-10-28 14:13:45 +00:00
Konstantin Belousov
9a714660ef Move pselect(3) man page to section 2.
Noted by:	jhb
MFC after:	1 month
2009-10-28 11:14:32 +00:00
Konstantin Belousov
6de630f925 Commit libc files missed in r198508 2009-10-27 10:57:53 +00:00
Konstantin Belousov
066d836b02 Current pselect(3) is implemented in usermode and thus vulnerable to
well-known race condition, which elimination was the reason for the
function appearance in first place. If sigmask supplied as argument to
pselect() enables a signal, the signal might be delivered before thread
called select(2), causing lost wakeup. Reimplement pselect() in kernel,
making change of sigmask and sleep atomic.

Since signal shall be delivered to the usermode, but sigmask restored,
set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
should be cleared by ast() in case signal was not gelivered during
syscall execution.

Reviewed by:	davidxu
Tested by:	pho
MFC after:	1 month
2009-10-27 10:55:34 +00:00
Maksim Yevmenkin
808de0ae26 Fix typo in bluetooth.3
Do not use reserved C++ keyword "new"

MFC after:	1 month
2009-10-26 17:27:30 +00:00
Marcel Moolenaar
3b43a26b50 Implement _umtx_op_err() for ia64. 2009-10-24 20:07:17 +00:00
Joseph Koshy
791f5d5ba2 Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function
counters.  For such CPUs, use an alternate mapping of convenience
names to events supported by PMC_CLASS_IAP programmable counters.

Testing and review by:	fabient
2009-10-24 04:11:40 +00:00
Jilles Tjoelker
364e9ccb9c wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR:		90580
MFC after:	1 month
2009-10-23 14:50:11 +00:00
Andrew Thompson
0c35eaad3f Prevent wraparound of the timeout variable.
Submitted by:	HPS
2009-10-22 21:01:41 +00:00
Fabien Thomas
c0d2581bcb PR: 139751
Approved by: des
Obtained from: Xavier Heiny <xavier.heiny@netasq.com>
MFC after: 3 weeks
2009-10-21 18:29:26 +00:00
Jilles Tjoelker
680db4952e Make getcwd(3) faster, simpler and more compliant using *at syscalls.
It is no longer necessary to construct long paths consisting of repeated
"../" which may be slow to process and may exceed PATH_MAX.
2009-10-13 20:58:22 +00:00
Robert Watson
8c8ee3d3b8 Add C message catalogue entries for newer errnos: EBADMSG, EMULTIHOP,
ENOLINK, EPROTO, ENOTCAPABLE.

Submitted by:	Alan R. S. Bueno <alan.bsd at gmail.com>
MFC after:	3 days (most)
2009-10-13 17:57:06 +00:00
Jilles Tjoelker
29670497af Make openat(2) a cancellation point.
This is required by POSIX and matches open(2).

Reviewed by:	kib, jhb
MFC after:	1 month
2009-10-11 20:19:45 +00:00
Konstantin Belousov
0a747fb23c In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.
2009-10-11 16:23:11 +00:00