Commit Graph

7769 Commits

Author SHA1 Message Date
Marcel Moolenaar
9a3ea63e79 Define THR_GETCONTEXT and THR_SETCONTEXT in terms of the userland
context functions. We don't need to enter the kernel anymore. The
contexts are compatible (ie a context created by getcontext() can
be restored by _ia64_restore_context()).

While here, make the use of THR_ALIGNBYTES and THR_ALIGN a no-op.
They are going to be removed anyway.
2003-08-05 19:37:20 +00:00
Marcel Moolenaar
50be3a75cc o In _ia64_save_context() clear the return registers except for r8.
We write 1 for r8 in the context so that _ia64_restore_context()
   will return with a non-zero value. _ia64_save_context() always
   return 0.
o  In _ia64_restore_context(), don't restore the thread pointer. It
   is not normally part of the context. Also, restore the return
   registers. We get called for contexts created by getcontext(),
   which means we have to restore all the syscall return values.
2003-08-05 19:33:01 +00:00
John-Mark Gurney
95aab9cc49 add support for using kqueue to watch bpf sockets.
Submitted by:	Brian Buchanan of nCircle, Inc.
Tested on:	i386 and sparc64
2003-08-05 07:12:49 +00:00
Andrey A. Chernov
90862ca23d LANG->LC_ALL
Pointed by:     ru
2003-08-04 21:31:53 +00:00
Julian Elischer
5774db75bd Allow foot shooting as Linux emulation needs it.
Also change "Auto mode" to use a "special" value
instead of 0, and define and document it.
I had thought libpthread had already been switched to use auto mode but
it appears that patch hasn't been committed yet.

Discussed with:	 Davidxu
2003-08-04 19:11:56 +00:00
Andrey A. Chernov
11871d537b Fix problem differently, use
LANG=C tr 'a-z' 'A-Z'
for hypotetical case that script may generate non-ascii characters
2003-08-04 15:24:06 +00:00
Andrey A. Chernov
e9e76fa4dd Fix double-wrong tr usage: tr '[a-z]' '[A-Z]'
First of all, it should be written as: tr 'a-z' 'A-Z'
ranges not encolosed in [] according to POSIX, so [] just included
in the replacement.
Second, it should be written: tr '[:lower:]' '[:upper:]'
since a-z and A-Z may have different length in some locales.
2003-08-04 14:10:33 +00:00
Andrey A. Chernov
a9d25ab17f Restore including of "collate.h", for its own prototype (mis)match detection 2003-08-03 19:28:23 +00:00
Andrey A. Chernov
8841d0081c Remove commented out and never used code 2003-08-03 05:20:31 +00:00
Andrey A. Chernov
17f67afe28 Remove __collate_range_cmp() stabilization, it conflicts with ranges 2003-08-03 04:40:40 +00:00
David Xu
3664d35cd5 -15 is incorrect to be used to align stack to 16 bytes, use ~15 instead. 2003-08-02 22:39:10 +00:00
Marcel Moolenaar
8955f59879 Override the default stubs for getcontext(2) and swapcontext(2) so
that we can flush the register stack prior to entering the kernel.
This avoids having dirty registers and saves us from having to
manually write them to the backing store from within the kernel.
In that respect, flushing the RSE is both functionally required as
well as performance optimal.

On average we had 18 dirty registers when getcontext(2) was called
from libthr. Since libthr does not switch back to a context created
by getcontext(2), not having dealt with the dirty registers was
harmless.
2003-08-02 00:49:36 +00:00
Marcel Moolenaar
6e9a9b9f52 The END() must expand to the .endp directive with the same name as
on the corresponding .proc directive, or the .endp must not have a
name at all.
While here, remove an artificial dependency in Ovfork.S by performing
manual register renaming.
2003-08-01 22:17:12 +00:00
David Xu
e6145501e9 Use FSBase to map kse, GCC generates code which uses %fs to access TLS data.
Reminded by: marcel
2003-07-31 22:06:36 +00:00
Poul-Henning Kamp
8d2fd95bc8 Remove unnecssary <vm/swap_pager.h> includes.
These were probably not cleaned up back in whatever murky past these
files were split into separate files.
2003-07-31 21:44:31 +00:00
Poul-Henning Kamp
b8c609915e Remove various unused variables, prototypes and local variables. 2003-07-31 21:42:12 +00:00
Poul-Henning Kamp
5d6fec5b63 Disable and lobotomize the kvm image reading swapinfo code, the kernel
layout is about to change.

The sysctl based method still returns correct information.
2003-07-31 21:38:32 +00:00
Poul-Henning Kamp
5243b6799b Retire the SWIF_DUMP_TREE code, this is in the way for a rework of
the swap_pager layout.
2003-07-31 21:30:28 +00:00
Daniel Eischen
9c76f2b9d6 This file hasn't been used for some time; nuke it. 2003-07-31 21:29:04 +00:00
Daniel Eischen
51200f9b7c Take the same approach for i386 as that for ia64 and amd64. Use
the userland version of [gs]etcontext to switch between a thread
and the UTS scheduler (and back again).  This also fixes a bug
in i386 _thr_setcontext() which wasn't properly restoring the
context.

Reviewed by:	davidxu
2003-07-31 21:09:11 +00:00
Poul-Henning Kamp
a8818ec991 Unifdef -UDEBUG_SWAPINFO The kernel data structures are about to change. 2003-07-31 20:53:04 +00:00
David Xu
ee2d44af05 Set GSBASE for kse. Finally make libkse work on AMD64. 2003-07-31 09:03:36 +00:00
David Xu
3807b4840c Fix some typos, correctly jump into UTS. 2003-07-31 08:50:01 +00:00
David Xu
64e64426d7 sysctlbyname needs size_t type, not int. 2003-07-31 08:26:58 +00:00
David Schultz
e02cc8e419 Cross-reference arc4random(3). 2003-07-31 06:18:34 +00:00
David Schultz
05e1bf3461 The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1. 2003-07-31 06:18:24 +00:00
David Xu
01724ec53d Update manual for i386_set_ldt to reflect newly added features.
Submitted by: julian
2003-07-31 02:13:48 +00:00
Daniel Eischen
24dc93d4c2 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 Moolenaar
2cd199ce21 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
Hartmut Brandt
fddacb1184 Correct a cut'n'paste error in a comment. 2003-07-29 13:51:53 +00:00
Hartmut Brandt
37bbd3cf39 Make a local static string const. 2003-07-29 13:51:27 +00:00
Hartmut Brandt
21b40f3c1b 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
Poul-Henning Kamp
df6989b848 Minor constification. 2003-07-29 11:16:14 +00:00
Andrey A. Chernov
a03081087c Add support for gb18030 encoding
PR:             51729
Submitted by:   Kang Liu <liukang@bjpu.edu.cn>
2003-07-29 07:52:44 +00:00
Simon L. B. Nielsen
c9ae54eebb * 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
David Xu
41282b992f Simplify sigwait code a bit by using a waitset and removing oldsigmask.
Reviewed by: deischen
2003-07-27 06:46:34 +00:00
David Xu
4160fed551 Set mc_len to sizeof(mcontext_t), otherwise it is an invalid context. 2003-07-26 12:58:28 +00:00
David Xu
36144f1e6e Fix typo. 2003-07-26 02:36:50 +00:00
Marcel Moolenaar
938b878e45 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 Wemm
48af1bfbef 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
Mark Peek
6fcd700395 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
Maxime Henrion
434252892a 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
Hartmut Brandt
84ce3db3e5 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
Robert Watson
82fefada64 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
Mark Murray
e0c2721505 Turn on the extended syntax, which TCP_wrappers has by default, as
distributed.
2003-07-24 19:58:56 +00:00
Mark Murray
d368bc9f59 Remove GCC-specific debugging option.
OK'ed by:	phk
2003-07-24 19:53:02 +00:00
Mark Murray
ebb9f0efa8 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
Mark Murray
482d5f1f6a 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 Moolenaar
c24297c0f2 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
Mark Murray
3665b7c29b 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