Commit Graph

11254 Commits

Author SHA1 Message Date
Joseph Koshy
677d4530c2 Move the following functions into their own manual pages:
- pmc_attach(), pmc_detach().
- pmc_capabilities(), pmc_cpuinfo(), pmc_ncpu(), pmc_npmc(), pmc_pmcinfo(),
  pmc_width().
- pmc_get_driver_stats().
- pmc_get_msr().
- pmc_read(), pmc_rw(), pmc_write().
- pmc_set().
- pmc_start(), pmc_stop().
2007-11-25 06:38:55 +00:00
Joseph Koshy
f28834c1a2 - Describe function pmc_init() in its own manual page.
- Describe functions pmc_configure_logfile(), pmc_flush_logfile() and
  pmc_writelog() in their own manual page.
2007-11-25 03:18:42 +00:00
Mike Makonnen
e38d709cd6 Hmmm, must get reading glasses or else change the font on my terminal. That
comma looks like a period.

Noticed by: brueffer
2007-11-24 11:58:54 +00:00
Joseph Koshy
fcdeaa0525 Describe convenience functions `pmc_name_of_{capability,class,cputype,
disposition,event,mode,state}' in their own manual page.
2007-11-24 11:05:36 +00:00
Joseph Koshy
115cadfd60 Describe pmc_event_names_of_class() in its own manual page. 2007-11-23 12:30:55 +00:00
Joseph Koshy
1ddf079eed Describe pmc_enable() and pmc_disable() in their own manual page. 2007-11-23 12:21:34 +00:00
Joseph Koshy
8fe4cbb6b7 Describe pmc_allocate() and pmc_release() in their own manual page. 2007-11-23 11:46:08 +00:00
Joseph Koshy
1eb6c69045 Sections of type SHT_GNU_versym use ELF type ELF_T_HALF. Update manual
page and code to match.

Submitted by:	jb
MFC After: 	1 day
2007-11-23 11:29:36 +00:00
John Birrell
37e19e1d85 Use an intermediate pointer to avoid a strict aliasing warning. 2007-11-23 05:52:13 +00:00
David Xu
da4410f25f Simplify code, fix a thread cancellation bug in sem_wait and sem_timedwait. 2007-11-23 05:42:52 +00:00
David Xu
4877aaebc1 Reuse nwaiter member field to record number of waiters, in sem_post(),
this should reduce the chance having to do a syscall when there is no
waiter in the semaphore.
2007-11-21 06:01:02 +00:00
David Xu
73ba600faa Remove warning level and aliasing restrictions. 2007-11-21 05:29:57 +00:00
David Xu
9e1ddd5fa0 Convert ceiling type to unsigned integer before comparing, fix compiler
warnings.
2007-11-21 05:25:27 +00:00
David Xu
922d56f9de Add some function prototypes. 2007-11-21 05:23:54 +00:00
David Xu
6fdfcacb4a Remove umtx_t definition, use type long directly, add wrapper function
_thr_umtx_wait_uint() for umtx operation UMTX_OP_WAIT_UINT, use the
function in semaphore operations, this fixed compiler warnings.
2007-11-21 05:21:58 +00:00
John Birrell
3e636fa0e5 Use an intermediate pointer to avoid a strict aliasing warning.
Note that ULong in this code is actually defined as an unsigned integer across
all arches so that the gdtoa() function always processes 32 bit data
despite the unfortunate naming of "ULong".
2007-11-21 01:10:42 +00:00
Mike Makonnen
84f2123154 Enclose entire header in #ifndef _LIBDISK_H_ 2007-11-20 22:48:32 +00:00
Ken Smith
c0bb7d9461 While checking over the libraries for 7.0-REL Kris found the following
libraries had not had their versions bumped relative to 6.3-REL but
had indeed been changed.  We need to bump their version so they can be
properly added to the compat6x port:

	libasn1.so.8 libgssapi.so.8 libhdb.so.8 libkadm5clnt.so.8
	libkadm5srv.so.8 libkafs5.so.8 libkrb5.so.8 libobjc.so.2

MFC After:	1 day
2007-11-20 04:20:32 +00:00
John Birrell
0aad0f2282 These are the things that the tinderbox has problems with because it
doesn't use the default CFLAGS which contain -fno-strict-aliasing.

Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.
2007-11-20 02:07:30 +00:00
John Birrell
102c7c9299 Use intermediate pointers to avoid strict alias type check failures
using gcc 4.2. This is required for tinderbox which doesn't have
-fno-strict-aliasing in it's custom CFLAGS.
2007-11-20 01:51:20 +00:00
Olivier Houchard
e93073b33d Change the casts from (pthread_mutex_t *) to (void *) to keep gcc quiet.
Anybody with a cleaner solution feel free to change it.
2007-11-19 21:57:28 +00:00
John Baldwin
790c2471b9 Bump up the number of ttys supported by pty(4) to 512 by making use of
[pt]ty[lmnoLMNO][0-9a-v].

MFC after:	3 days
Reviewed by:	rwatson
2007-11-19 20:49:42 +00:00
David Xu
4940ef4ad0 MFlibthr:
In _pthread_key_create() ensure that libkse is initialized.
2007-11-19 02:09:07 +00:00
Mike Makonnen
f378c687da Capitalization 2007-11-18 18:44:35 +00:00
John Birrell
26fc37307b Constify the first argument to expand_number() so that it can
be called with a const without the compiler grisling.
2007-11-18 02:20:02 +00:00
Olivier Houchard
f0aa484471 Build libthread_db for arm as well.
MFC after: 1 week
2007-11-17 21:29:02 +00:00
Olivier Houchard
ebbcec3ad2 Add arm support in libthread_db. 2007-11-17 21:27:53 +00:00
Maksim Yevmenkin
1f3e4b39fd Fix bug in handling SDP continuation state.
Reported by:	Eric Millbrandt emillbrandt at coldhaus dot com
MFC after:	3 days
2007-11-16 15:13:12 +00:00
Ruslan Ermilov
faad9cae56 Fix bad rule and bad dependency for nsparser.h that can
cause the build to fail because y.tab.c can have a more
recent modification time than y.tab.h, and the bad rule
relied on the opposite.

(The last write to y.tab.c by yacc(1) happens after the
last write to y.tab.h, according to truss(1).)

Reported by:	kensmith
2007-11-15 22:39:15 +00:00
Rong-En Fan
a964324e72 - Include runetype.h for _RuneLocale_ 2007-11-07 14:45:48 +00:00
Marius Strobl
9a2706abcc In _pthread_key_create() ensure that libthr is initialized. This
fixes a NULL-dereference of curthread when libstdc+ initializes
the exception handling globals on archs we can't use GNU TLS due
to lack of support in binutils 2.15 (i.e. arm and sparc64), yet,
thus making threaded C++ programs compiled with GCC 4.2.1 work
again on these archs.

Reviewed by:	davidxu
MFC after:	3 days
2007-11-06 21:50:43 +00:00
David Xu
56b45d9067 Avoid doing adaptive spinning for priority protected mutex, current
implementation always does lock in kernel.
2007-10-31 01:50:48 +00:00
David Xu
55f18e070f Don't do adaptive spinning if it is running on UP kernel. 2007-10-31 01:44:50 +00:00
David Xu
e8ef3c283b Restore revision 1.55, the kris's adaptive mutex type. 2007-10-31 01:37:13 +00:00
Giorgos Keramidas
98eb34a74c Remove an extra (commented out) .Sh HISTORY section heading, to avoid
the risk of "shadowing" the following .El request, and delete an empty
line to fix mdoc warnings.

MFC after:	3 days
2007-10-30 16:05:40 +00:00
Giorgos Keramidas
6f1743c543 Remove an extra (commented out) .Sh HISTORY section heading, to avoid
the risk of "shadowing" the following .El request, strip eol spaces
and delete an empty line to fix mdoc warnings.

MFC after:	3 days
2007-10-30 15:58:39 +00:00
Giorgos Keramidas
81c0ade6b6 Change a .PP request to a valid .Pp mdoc request, and remove an extra
(but commented out) .Sh HISTORY section heading.

MFC after:	3 days
2007-10-30 15:56:12 +00:00
Giorgos Keramidas
22b9ec401b Remove duplicate (but commented out) .Sh HISTORY section heading.
It almost "shadows" the ending .El request of a list, which seems
to have caused mdoc buglets in some gss_*.3 manpages.

MFC after:	3 days
2007-10-30 15:52:55 +00:00
Giorgos Keramidas
2b39bec3a7 Remove duplicate (but commented out) .Sh HISTORY section heading
and add a missing .El request.

MFC after:	3 days
2007-10-30 15:45:19 +00:00
Giorgos Keramidas
daa8e8bf02 Remove extraneous empty lines, to fix mdoc warnings.
MFC after:	3 days
2007-10-30 15:36:40 +00:00
Giorgos Keramidas
ef824a431f mdoc fix: remove extraneous empty line.
MFC after:	3 days
2007-10-30 15:31:41 +00:00
Giorgos Keramidas
3f85a8b4c5 Bump manpage date, missed during the last change.
MFC after:	3 days
2007-10-30 15:28:43 +00:00
Giorgos Keramidas
6aaa40b521 The .Fx request doesn't recognize 2.2.0, so use ".Fx 2.2"
MFC after:	3 days
2007-10-30 15:27:45 +00:00
Giorgos Keramidas
aada4cf330 Remove extraneous .Ef request.
MFC after:	3 days
2007-10-30 15:26:20 +00:00
Kris Kennaway
83941f797f Adaptive mutexes should have the same deadlock detection properties that
default (errorcheck) mutexes do.

Noticed by:          davidxu
2007-10-30 09:24:23 +00:00
David Xu
7416cdabcd Add my recent work of adaptive spin mutex code. Use two environments variable
to tune pthread mutex performance:
1. LIBPTHREAD_SPINLOOPS
	If a pthread mutex is being locked by another thread, this environment
	variable sets total number of spin loops before the current thread
	sleeps in kernel, this saves a syscall overhead if the mutex will be
	unlocked very soon (well written application code).
2. LIBPTHREAD_YIELDLOOPS
	If a pthread mutex is being locked by other threads, this environment
	variable sets total number of sched_yield() loops before the currrent
	thread sleeps in kernel. if a pthread mutex is locked, the current thread
	gives up cpu, but will not sleep in kernel, this means, current thread
	does not set contention bit in mutex, but let lock owner to run again
	if the owner is on kernel's run queue, and when lock owner unlocks the
	mutex, it does not need to enter kernel and do lots of work to resume
	mutex waiters, in some cases, this saves lots of syscall overheads for
	mutex owner.

In my practice, sometimes LIBPTHREAD_YIELDLOOPS can massively improve performance
than LIBPTHREAD_SPINLOOPS, this depends on application. These two environments
are global to all pthread mutex, there is no interface to set them for each
pthread mutex, the default values are zero, this means spinning is turned off
by default.
2007-10-30 05:57:37 +00:00
Kris Kennaway
2017a7cdfe Add a new "non-portable" mutex type, PTHREAD_MUTEX_ADAPTIVE_NP. This
is also implemented in glibc and is used by a number of existing
applications (mysql, firefox, etc).

This mutex type is a default mutex with the additional property that
it spins briefly when attempting to acquire a contested lock, doing
trylock operations in userland before entering the kernel to block if
eventually unsuccessful.

The expectation is that applications requesting this mutex type know
that the mutex is likely to be only held for very brief periods, so it
is faster to spin in userland and probably succeed in acquiring the
mutex, than to enter the kernel and sleep, only to be woken up almost
immediately.  This can help significantly in certain cases when
pthread mutexes are heavily contended and held for brief durations
(such as mysql).

Spin up to 200 times before entering the kernel, which represents only
a few us on modern CPUs.  No performance degradation was observed with
this value and it is sufficient to avoid a large performance drop in
mysql performance in the heavily contended pthread mutex case.

The libkse implementation is a NOP.

Reviewed by:      jeff
MFC after:        3 days
2007-10-29 21:01:47 +00:00
Tim Kientzle
c383d82e4d When skipping input data, don't overflow a 32-bit size_t.
This can only happen on 32-bit systems when you're reading
an uncompressed archive and the skip request is an exact
multiple of 4G (e.g., skipping a tar entry with an 8G body).

The symptom is that the read_ahead() ends up returning zero
bytes, and the extraction stops with a premature end-of-file.

Using '1' here is more correct anyway, as it allows read_ahead()
to function opportunistically and minimize copying.

MFC after: 5 days
2007-10-27 22:45:40 +00:00
Julian Elischer
cfe127f5bc Aparrently MACXOCOMLEN exisrts only on my machine 2007-10-26 15:25:28 +00:00
Ruslan Ermilov
4064334ff6 Add a period for yar@. 2007-10-26 11:07:25 +00:00