Commit Graph

7787 Commits

Author SHA1 Message Date
deischen
7cd3ef4cad Don't forget to unlock the scheduler lock. Somehow this got removed
from one of my last commits.  This only affected priority ceiling
mutexes.

Pointy hat to:	deischen
2003-07-30 13:28:05 +00:00
marcel
592c9143c5 Only allow trapframe formats instead of sigframe formats like the
comment says and don't write the first 3 arguments to FRAME_TRAPARG_*
as they are specific to sigframes.
2003-07-30 06:36:20 +00:00
harti
075f0460cd Correct a cut'n'paste error in a comment. 2003-07-29 13:51:53 +00:00
harti
6bdc55e269 Make a local static string const. 2003-07-29 13:51:27 +00:00
harti
cad96c2b96 Use the appropriate [s]size_t type where a buffer size is meant.
Add const specifiers to constant function arguments.
2003-07-29 13:35:03 +00:00
phk
6fb62c0d8e Minor constification. 2003-07-29 11:16:14 +00:00
ache
9a32633f0e Add support for gb18030 encoding
PR:             51729
Submitted by:   Kang Liu <liukang@bjpu.edu.cn>
2003-07-29 07:52:44 +00:00
simon
9f0ae03ce0 * Merge index(3) and rindex(3) to index(3) since the two functions are
almost identical.
* Merge strchr(3) and strrchr(3) to strchr(3) since the two functions
  are almost identical.
* Make the wording of index(3) and strchr(3) more similar.
* mdoc(7) cleanup.

Submitted by:	SUZUKI Koichi <metal@gc5.so-net.ne.jp>, keramida, myself
PR:		docs/32054
Reviewed by:	ru
Approved by:	ceri (mentor)
2003-07-28 22:50:42 +00:00
davidxu
cd0df1766a Simplify sigwait code a bit by using a waitset and removing oldsigmask.
Reviewed by: deischen
2003-07-27 06:46:34 +00:00
davidxu
87a262adf5 Set mc_len to sizeof(mcontext_t), otherwise it is an invalid context. 2003-07-26 12:58:28 +00:00
davidxu
801e095344 Fix typo. 2003-07-26 02:36:50 +00:00
marcel
5b786e1bdc Revert previous commit. We don't use setjmp()/longjmp() for context
switching anymore, so there's no need to save and restore GP. This
change breaks threaded applications linked against libc_r. Pull the
tier 2 card again: relink. This will link against libthr instead.
2003-07-25 22:36:48 +00:00
peter
7fa8de132d Fix for 64 bit platforms. sysctl's length args are pointers to
size_t, not int.  This could be fatal where size_t is long.

Reviewed by:	bp
2003-07-25 19:17:46 +00:00
mp
ee3dae5c96 Add wrapper for kqueue() to keep track of the allocated fd and allow it to
be closed. This fixes a file descriptor leak when closing a kqueue() fd.

Reviewed by:	deischen
MFC after:	1 week
2003-07-25 17:02:33 +00:00
mux
0f64305453 An u_int8_t can never be bigger than 255, so remove a useless check.
Spotted by:	GCC
2003-07-25 12:23:25 +00:00
harti
4ac693aa72 Make library WARNS=6 clean. The problems have been: alignment on sparc64
and one of the usual sizeof(in_addr_t) == sizeof(u_long) bugs.
2003-07-25 08:22:08 +00:00
rwatson
638692b978 Print group name in getfacl output when calculating an effective
permission set based on a more restrictive mask.

Submitted by:	Glen Gibb <grg@ridley.unimelb.edu.au>
2003-07-24 23:33:25 +00:00
markm
938802c60c Turn on the extended syntax, which TCP_wrappers has by default, as
distributed.
2003-07-24 19:58:56 +00:00
markm
66e6d105e6 Remove GCC-specific debugging option.
OK'ed by:	phk
2003-07-24 19:53:02 +00:00
markm
f7f77aaea8 Don't check for the existance of src/crypto/ for building items that
may contain crypto. The days of ITAR paranoia are over, and the simple
macro tests that remain are sufficient.
2003-07-24 18:30:25 +00:00
markm
c62efd08ea Make sure that a "make release" (more accurately the bit that makes
the crunched binary) get a non-cryptographic telnet. This is overkill
in that it covers stuff that is not normally used in a crunched binary.
2003-07-24 17:19:15 +00:00
marcel
f622e8230f Implement _get_curthread and _set_curthread. We use GCCs builtin
function this, which expands to PAL calls (rduniq and wruniq).
This needs adjustment when TLS is implemented.
2003-07-24 07:51:49 +00:00
markm
74ab377728 Ensure that for the cryptographic instances of *telnet*, the "crypto"
distribution is used. This only affects release-building.
2003-07-24 07:19:55 +00:00
peter
5bf8dc6697 Connect libncp/libsmb to the build. They compile, but have a couple of
silly bugs that probably wont quite make a segfault.  eg: passing a pointer
to an int to sysctl instead of a pointer to a size_t.
2003-07-24 02:05:48 +00:00
dds
fa22d4df23 Document an additional error return value. The connect(2) call can also
return EACCES on non-Unix domain sockets as demonstrated by the
following program:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int
main(int argc, char *argv[])
{
	struct sockaddr_in rem_addr;
	int sock;

	if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
		perror("socket");
		exit(1);
	}

	bzero((char *)&rem_addr, sizeof(rem_addr));
	rem_addr.sin_family = AF_INET;
	rem_addr.sin_addr.s_addr = INADDR_NONE;
	rem_addr.sin_port = htons(10000);

	if (connect(sock, (struct sockaddr *)&rem_addr,
sizeof(rem_addr)) < 0) {
		perror("connect");
		exit(1);
	}
}

The call chain returning this value is probably:

kern/uipc_syscalls.c:connect
kern/uipc_socket.c:soconnect
netinet/tcp_usrreq.c:tcp_usr_connect
netinet/tcp_output.c:tcp_output
netinet/ip_output.c:ip_output

Reviewed by:	schweikh (mentor)
MFC after:	2 weeks
2003-07-23 22:00:08 +00:00
bde
e913f4a1ba Fixed some style bugs (misplacement and misformatting of some commented-out
code).
2003-07-23 09:24:44 +00:00
peter
e6e6002e37 Only provide one copy of the math functions. If we provide a MD function,
do not also provide a __generic_XXX version as well.  This is how we
used to runtime select the generic vs i387 versions on the i386 platform.

This saves a pile of #defines in the src/math_private.h file to undo the
__generic_XXX renames in some of the *.c files.
2003-07-23 04:53:47 +00:00
peter
c549cfd555 No longer need the internal __get_hw_float() function. 2003-07-23 04:25:04 +00:00
peter
e3535ebe8e Now that we do not need to do runtime detection for the broken default
fp emulator, stop doing the runtime selection of hardware or emulated
floating point operations on i386.  Note that I have not suppressed the
duplicate compiles yet.

While here, fix the alpha.  It has provided specific copysign/copysignf
functions since the beginning of time, but they have never been used.
2003-07-23 04:23:36 +00:00
deischen
e10f5fec26 Move idle kse wakeup to outside of regions where locks are held.
This eliminates ping-ponging of locks, where the idle KSE wakes
up only to find the lock it needs is being held.  This gives
little or no gain to M:N mode but greatly speeds up 1:1 mode.

Reviewed & Tested by:	davidxu
2003-07-23 02:11:07 +00:00
ru
5048add97a Make sure the crypto versions of libfetch and fetch(1) appear in
the "crypto" distribution.

Approved by:	des
2003-07-22 13:54:31 +00:00
peter
a58f3f6f4b Instantiate explicit callable versions of the machine/ieeefp.h inlines
for the use of non-GCC compilers and C++ code.
2003-07-22 06:46:17 +00:00
peter
e8952b93e7 Turn off the libc/quad functions since they are not needed for amd64
and just cause lots of warnings.
2003-07-22 06:34:57 +00:00
des
d9e4868988 Revert previous commit after fixing libpam. 2003-07-21 19:56:28 +00:00
markm
020ca0be81 Test correct macro for "without crypto" option(s). 2003-07-20 23:29:46 +00:00
deischen
5f48e9730a Add missing arguments to _amd64_restore_context() when called from
THR_SETCONTEXT().
2003-07-20 12:41:38 +00:00
mtm
32839d480a Now that we have the stubs for alpha and we can build it
on that platform, invert the test for the platforms on
which libthr is built. Amd64 and powerpc are the only
platforms excluded.

Compile tested on:	amd64, alpha
2003-07-20 01:34:40 +00:00
mtm
31f7642b21 This commit was generated by cvs2svn to compensate for changes in r117783,
which included commits to RCS files with non-trunk default branches.
2003-07-19 15:57:52 +00:00
mtm
73635d5ae5 The MD framework for libthr on alpha 2003-07-19 15:57:52 +00:00
davidxu
f62d0dfdd7 Override libc function raise(), in threading mode, raise() will
send signal to current thread.

Reviewed by: deischen
2003-07-19 05:25:49 +00:00
davidxu
dfa25929c1 Make raise and _raise as weak symbols, so they can be overriden by
thread library.

Reviewed by: deischen
2003-07-19 05:22:56 +00:00
deischen
c8c702d4fd Add some very beta amd64 bits. These will also need some tweaking. 2003-07-19 04:44:21 +00:00
deischen
518e05f023 Add amd64 versions of makecontext() and signalcontext() needed
for libkse (makecontext() is also needed for libthr).
These probably will need some tweaking.
2003-07-19 04:41:08 +00:00
wollman
e9f686e3e3 Rewrite to reflect slight change in semantics for C99, and note a bug
in the standard.  Defer to gettimeofday(2) for error indications.
2003-07-19 03:19:59 +00:00
wollman
6a5657452b C99 compliance: time() always sets its return value in both places
(if present), even on error.

Pointed out by: Wojtek Lerch, on the Austin Group mailing-list
2003-07-19 02:53:46 +00:00
wpaul
c71924bd4f Revert to using yp_order() to probe for master.paswd.by* maps and
don't probe the server at all for passwd.by* maps. This fixes
interoperability with the Services For UNIX NIS server (which is
really a front end to Captive^WActiveDirectory). This server
incorrectly returns success for all YPPROC_MASTER requests,
even for maps that don't exist, which makes it impossible to
(ab)use it to probe for the existence of the master.passwd.by*
maps.

This is a little kludgey, but basically restores the original
behavior of getpwent.c as it is in -stable, and works around both
the lack of YPPROC_ORDER on NIS+ servers as well as the broken
YPPROC_MASTER on Services For UNIX servers.
2003-07-18 23:51:15 +00:00
wollman
4b112861d1 Whitespace after keywords per style(9). 2003-07-18 16:04:32 +00:00
deischen
4f7904da4d Cleanup thread accounting. Don't reset a threads timeslice
when it blocks; it only gets reset when it yields.

Properly set a thread's default stack guardsize.

Reviewed by:	davidxu
2003-07-18 02:46:55 +00:00
deischen
a022b5b095 Add a preemption point when a mutex or condition variable is
handed-off/signaled to a higher priority thread.  Note that when
there are idle KSEs that could run the higher priority thread,
we still add the preemption point because it seems to take the
kernel a while to schedule an idle KSE.  The drawbacks are that
threads will be swapped more often between CPUs (KSEs) and
that there will be an extra userland context switch (the idle
KSE is still woken and will probably resume the preempted
thread).  We'll revisit this if and when idle CPU/KSE wakeup
times improve.

Inspired by:	Petri Helenius <pete@he.iki.fi>
Reviewed by:	davidxu
2003-07-18 02:46:30 +00:00
deischen
6efe63c483 Clean up KSE specific data (KSD) macros a bit.
Reviewed by:	davidxu
2003-07-18 02:45:56 +00:00