Commit Graph

7445 Commits

Author SHA1 Message Date
davidxu
10a5205738 Handle thread canceled case, it is same as signal caused backout,
but will break out of loop.
2003-05-02 11:39:00 +00:00
markm
fad590ab7e Trasmute moer "krb5" distibutions into "crypto". 2003-05-01 21:21:15 +00:00
trhodes
8a6199b879 Use the .Dl macro.
Discussed with:	mdoc(7) officer ru
2003-05-01 20:27:59 +00:00
ru
0deec148ba Build non-crypto telnet(1) and telnetd(8) if NO_OPENSSL is defined.
Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2003-05-01 19:38:15 +00:00
trhodes
66868073ad State the fact that the range is twice the traditional RAND_MAX.
Add an EXAMPLES section.

PR:		48493
Submitted by:	Paul Herman <pherman@frenchfries.net> (original version)
2003-05-01 19:09:16 +00:00
nectar
0b64e1476b Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
2003-05-01 19:03:14 +00:00
obrien
f98a708c20 Convert the i386 alloca(3) to the x86-64 ISA.
Alignment hack from:	NetBSD
2003-05-01 16:04:38 +00:00
des
46c06a0c42 Use C99-style varadic macros instead of the non-standard gcc syntax. 2003-05-01 15:08:55 +00:00
des
3beb053fc3 Mark libpam as c99- and WARNS5-clean. 2003-05-01 14:55:06 +00:00
des
9e8300e563 Mark libfetch as c99-clean. Always build at WARNS level 2 rather than
juggling with levels 2 and 3, as this has lead to world breakage for
NOCRYPT users in the past.
2003-05-01 14:39:43 +00:00
peter
2d929d2534 AMD64 support (another IEEEFP platform) 2003-04-30 21:06:30 +00:00
peter
968cbdb047 AMD64 support; repocopied from i386 2003-04-30 21:05:33 +00:00
peter
75662965c8 Teach libdisk that AMD64 works just like i386 2003-04-30 21:03:16 +00:00
peter
7d3a50a8ec Add __amd64__ to the list of things that use IEEEFP 2003-04-30 19:32:25 +00:00
peter
3ecb61f317 Tell malloc.c that AMD64 uses the same pagesize as i386. 2003-04-30 19:30:34 +00:00
peter
7b45e731ba Add __amd64__ to the list of things that use HIDENAME() to hide minbrk 2003-04-30 19:29:02 +00:00
peter
665ad725f7 Update for AMD64. repocopied from i386-elf/crt1.c. Deal with regparm
argument passing rather than stack based args.  The kernel passes the
base of the argument/env vector in %rdi (arg1).
2003-04-30 19:27:07 +00:00
peter
8013c78d4f Turn off libstand for amd64 for the time being. It is built in i386
mode, and we do not need the complications for now.
2003-04-30 18:42:25 +00:00
peter
08afc1caa9 Delete i386_* syscall wrappers and manpages. Rename Ovfork.S to vfork.S. 2003-04-30 18:17:07 +00:00
peter
415054f8cb Update for AMD64 after repocopy from i386/sys/*. This means:
- strip out the nasty PIC_PROLOGUE/EPILOGUE stuff, since we dont have
to lose a register in PIC mode anymore (we use %rip-relative addressing).
- update for C register argument passing conventions.
- convert 32 bit to 64 bit register sizes etc.
2003-04-30 18:16:33 +00:00
peter
d25ffe9c8c I have no idea why the reboot(2) syscall wrapper ends with iret, but
update it to be iretq for completeness.
2003-04-30 18:14:44 +00:00
peter
2c555e9f24 Update for AMD64. Depend on %rdi (first syscall argument) being preserved
across a "syscall"-style syscall
2003-04-30 18:13:48 +00:00
peter
44164f8178 Update for AMD64 (repocopied from i386/sys/Ovfork.S - why is it O?)
Depend on %rsi being preserved across the "syscall"-style syscall and strip
out the PIC stuff (this cpu has full PC-relative addressing, at last!)
2003-04-30 18:13:13 +00:00
peter
0b2f0dc371 Update for AMD64 contexts. Note that this still has some x87-style FPU
instructions here, these may need to be updated for SSE.
(Repocopied from i386/gen)
2003-04-30 18:09:33 +00:00
peter
9e23a6c68f Reduce the SRCS to what compiles 2003-04-30 18:08:01 +00:00
peter
5219e46960 Update for AMD64 (repocopied from i386/net). We can depend on having
the bswap instruction (yay!).  Update for register parameter passing
instead of i386 style stack based param passing.
2003-04-30 18:07:23 +00:00
peter
6ca367c854 Update for AMD64-style syscalls. Repocopied from i386/SYS.h.
Note that the syscall instruction clobbers %rcx, which is inconvenient
because it is the fourth syscall argument, so we use %r10 (another scratch
register) for the 4th syscall arg instead (I picked %r10 to be the same as
NetBSD).  int 0x80 is still possible though, and it uses %rcx as usual.
Note that the syscall style syscall does *NOT* preserve all the registers,
unlike int 0x80.  We do not preserve the scratch registers except for
%rdi and %rsi.  int 0x80 does preserve everything but the return values.
2003-04-30 18:06:14 +00:00
obrien
e7abd7e44d Only define platform once -- in a C file. 2003-04-30 17:14:58 +00:00
obrien
76d866f25c Floating point libc functions traditionally written in ASM.
AMD64 does away with the x87 in 64-bit long mode, so we have to play the
SSE/SSE2 game now.

Obtained from:	NetBSD/x86-64
2003-04-30 16:21:03 +00:00
obrien
006fb9f2ad Symlink with -f. 2003-04-30 15:49:40 +00:00
obrien
0315a71a55 No libc_r for AMD64. 2003-04-30 15:33:50 +00:00
deischen
63fd7f7479 Move the mailbox to the beginning of the thread and align the
thread so that the context (SSE FPU state) is also aligned.
2003-04-30 15:05:17 +00:00
mtm
2819db74bc Backout my changes in rev. 1.32 and 1.33. There is some code that depends
on the previous behaviour. This also brings strptime(3) behaviour back in line
with the other BSDs.

Approved by:	markm (mentor)
2003-04-30 10:25:57 +00:00
ru
b4e11fe302 Fixed alignment. 2003-04-30 07:13:50 +00:00
davidxu
148de0f38f Call kse_wakeup_mutli() after remove current thread from RUNQ to avoid
doing unnecessary idle kse wakeup.
2003-04-30 01:15:21 +00:00
davidxu
d0537b4f65 Call kse_wakeup_multi() to wakeup idle KSEs when there are threads ready
to run.
2003-04-30 01:03:58 +00:00
des
31f8a355e2 Make sure rhostip is always initialized.
PR:		bin/51508
Submitted by:	Peter Grimshaw <peter@tesseract.demon.co.uk>
2003-04-30 00:49:42 +00:00
des
4f251ebb97 Treat an empty PAM_RHOST the same as a NULL one.
PR:		bin/51508
2003-04-30 00:44:05 +00:00
des
c3c465c42c Set $HOME to the correct directory (within the chroot tree). 2003-04-30 00:40:24 +00:00
nectar
e69967f534 `Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by:	qpopper's interfering and buggy version of strlcpy
2003-04-29 21:13:50 +00:00
deischen
975e4bcef1 Jump to the correct label upon detecting an error. 2003-04-29 21:05:17 +00:00
deischen
6bd4376dc8 Create the thread signal lock as a KSE lock (as opposed to
a thread lock).

Better protect access to thread state while searching for
threads to handle a signal.

Better protect access to process pending signals while processing
a thread in sigwait().

Submitted by:	davidxu
2003-04-29 21:03:33 +00:00
mdodd
ac3f359209 Document VM86_INTCALL.
Submitted by:	 Bruce M Simpson
2003-04-29 08:35:28 +00:00
deischen
6deabb439b o Don't add a scope system thread's KSE to the list of available
KSEs when it's thread exits; allow the GC handler to do that.

o Make spinlock/spinlock critical regions.

The following were submitted by davidxu

  o Alow thr_switch() to take a null mailbox argument.

  o Better protect cancellation checks.

  o Don't set KSE specific data when creating new KSEs; rely on the
    first upcall of the KSE to set it.

  o Add the ability to set the maximum concurrency level and do this
    automatically.  We should have a way to enable/disable this with
    some sort of tunable because some applications may not want this
    to be the default.

  o Hold the scheduling lock across thread switch calls.

  o If scheduling of a thread fails, make sure to remove it from the list
    of active threads.

  o Better protect accesses to a joining threads when the target thread is
    exited and detached.

  o Remove some macro definitions that are now provided by <sys/kse.h>.

  o Don't leave the library in threaded mode if creation of the initial
    KSE fails.

  o Wakeup idle KSEs when there are threads ready to run.

  o Maintain the number of threads active in the priority queue.
2003-04-28 23:56:12 +00:00
deischen
4d8bc81d7d Use the correct link entry for walking the list of threads.
While I'm here, use the TAILQ_FOREACH macro instead of a more
manual method which was inherited from libc_r (so we could
remove elements from the list which isn't needed for libpthread).

Submitted by:	Kazuaki Oda <kaakun@highway.ne.jp>
2003-04-28 21:35:06 +00:00
robert
4c135fc4b7 Replace the return value of rfork_thread(3) in its manual page
function prototype with `pid_t' to match the declaration in
<unistd.h>.
2003-04-27 21:07:27 +00:00
robert
1e6c7486d5 Correct the return value of vfork(2) and rfork(2) in their
manual page function prototypes.
2003-04-27 21:01:34 +00:00
trhodes
10e8cd48a8 Add vmemoryuse to the list.
PR:		50796
Submitted by:	Dmitry Sivachenko <mitya@cavia.pp.ru>
2003-04-26 15:15:05 +00:00
trhodes
b583fa65de Add sys/user.h to the list of includes. Without it you lack a definition of
'struct kinfo_proc' for calls to kvm_getargv() and kvm_getenvv().

PR:	51322
2003-04-26 15:00:57 +00:00
rwatson
a146c7fe90 Add some strategic whitespace. 2003-04-26 03:32:18 +00:00