Commit Graph

256 Commits

Author SHA1 Message Date
thorpej
88ed237274 Bump libc to 12.107 and libpthread to 0.3 for fsync_range(2). 2003-11-18 01:00:19 +00:00
thorpej
137c808bb8 Userland portion of fsync_range(2), written by Bill Studenmund, and
contributed by Wasabi Systems, Inc.
2003-11-18 00:56:56 +00:00
cl
196dbdcd2b - delay processing unblocked threads until after locks are resolved:
without the blocked/unblocked upcall ordering, an interrupted blocked
  upcall might put the blocked thread on the intqueue because it needs
  to be continued.  With the delayed processing, we avoid putting such a
  thread twice on the runqueue.
- fix putting a thread on the intqueue when it needs to be continued
  after it blocked.

Also check return value when returning a single stack.
2003-11-17 22:59:00 +00:00
uwe
764c596c3f Cause SIGTRAP if NOTREACHED code is reached. 2003-11-17 22:38:11 +00:00
cl
803f13c062 check deferred signals for all unblocked threads 2003-11-12 22:21:21 +00:00
wiz
c3c78af0ec Various fixes. 2003-11-12 11:58:34 +00:00
christos
c8608b903b Document pthread_attr_setcreatesuspend_np, pthread_suspend_np, pthread_resume_np 2003-11-12 02:44:22 +00:00
martin
3e8ef3d56a Fix ucontext conversion macros. From Christian Limpach. 2003-11-11 16:21:05 +00:00
martin
d708163f7f All the ucontext <-> {fp}reg macros were slightly simplistic and untested
before (old gdb support on sparc did not use this).
Pointed out by Christian Limpach.
2003-11-10 07:52:52 +00:00
christos
38b1c6f405 Add:
int    pthread_attr_setcreatesuspend_np(pthread_attr_t *);
int    pthread_suspend_np(pthread_t);
int    pthread_resume_np(pthread_t);

needed for java. Approved and fixed by cl.
2003-11-09 18:56:48 +00:00
fvdl
c4e432f3bd Make register usage more consistent, also in comparison with the i386
version, for easier maintenance.
2003-11-08 21:46:42 +00:00
fvdl
127827f46e Restore %rax correctly during a full context restore (oops). 2003-11-08 21:45:59 +00:00
wiz
85cc64da0f Typo; from Jared Yanovich via jmc@openbsd. 2003-11-02 11:18:10 +00:00
yamt
71b290e975 use explicit "l" suffixes. (eg. lea -> leal) 2003-10-30 13:56:37 +00:00
wiz
bc81ecac30 sigwait(2), not (3). 2003-10-30 12:57:11 +00:00
jdolecek
e2e1314ccd bump date too 2003-10-30 11:53:33 +00:00
jdolecek
f65cf67b62 xref sigwait(3) 2003-10-30 11:51:42 +00:00
cl
812a254c5d remove incorrect assert:
regular threads can block in the kernel while holding (libpthread) locks
and have to be continued

XXX if the blocked upcall is preempted, the blocked threads syscall
XXX return value can get lost
2003-10-29 18:53:34 +00:00
lukem
f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
yamt
2016949b00 update a comment. 2003-10-24 17:35:22 +00:00
fvdl
c2405107f1 Correct and simplify computing the return point; just use PC-relative
addressing.
2003-10-20 14:50:18 +00:00
fvdl
b30e737545 Make sure the stack stays aligned. 2003-10-19 21:45:03 +00:00
yamt
5cd18e71cc in pthread__deliver_signal(),
copy siginfo_t into the stack of the target thread
rather than relying on the luck that on-stack siginfo_t stay valid.
2003-10-16 13:38:28 +00:00
chs
f58c80fc8f fix typo in previous. 2003-10-12 00:25:25 +00:00
wiz
37ac1db454 available, not avaliable. From miod@openbsd. 2003-09-29 09:50:21 +00:00
nathanw
9839173881 Don't include <machine/lock.h> anymore; instead, we now get
__cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED from <sys/types.h>.
Should prevent the massive namespace pollution by way of dragging in
many MD headers that has been observed to break stuff.
2003-09-26 22:48:23 +00:00
cl
bfa716044e SA_SIGINFO support for m68k (libpthread) 2003-09-22 14:45:48 +00:00
cl
c6de69ee49 fix pt_trapuc handling errors:
- movl to address register doesn't set flags (add explicit test)
- clr only clears a word (use clrl)
2003-09-17 20:08:07 +00:00
cl
5c40d56471 fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html
2003-09-16 13:51:31 +00:00
christos
86d645082f fix syntax; thanks aymeric 2003-09-13 17:19:55 +00:00
christos
d1bb4290e8 explicitly use a sigset_t * variable to recover the signal mask pointer. 2003-09-13 15:26:38 +00:00
drochner
45a9abb6af make it compile with PTHREAD_SIG_DEBUG again 2003-09-12 15:31:00 +00:00
kleink
8742dcef75 Fix pasto in previous. 2003-09-12 10:10:39 +00:00
christos
138df80b74 convert to use siginfo/ucontext style of signal delivery instead of
sigcontext. Approved by nathanw.
2003-09-12 00:37:17 +00:00
christos
338cc5f663 sprinkle ARGSUSED for good cheer. 2003-09-11 21:51:57 +00:00
cl
89d0cfd21f Remove possible race condition in upcall recycling. 2003-09-07 14:47:44 +00:00
uwe
b5623b232f Use delay slot in STACK_SWITCH (catching up with sparc64 changes). 2003-09-07 02:08:31 +00:00
uwe
7d522ba08b Use correct context to switch to.
From sparc64 fix by Andrey Petrov <petrov@netbsd>.
2003-09-07 01:54:47 +00:00
petrov
0d472e116b typo in previous commit, annul isn't good there,
noticed by Eduardo Horvath.
2003-08-26 17:50:06 +00:00
petrov
2cae323122 Use branch-slot in STACK_SWITCH, suggested by Martin Husemann. 2003-08-25 23:00:23 +00:00
petrov
c139cd4893 Use correct context to switch to. 2003-08-25 22:48:24 +00:00
ragge
644236bf71 Add PT_TRAPUC and pthread__switch_return_point.
Not tested (as most of the pthread stuff on vax) but at least
allow the system to compile.
2003-08-25 20:32:13 +00:00
nathanw
e1fb9dd8e8 In pthread__deliver_signal(), correctly use pt_trapuc or pt_uc as the
context-to-restore instead of always using pt_uc.

Fixes a problem with signal handlers for synchronous signals noted by
Matthias Drochner on current-users.
2003-08-22 17:35:52 +00:00
martin
88055fbde5 Include <stdlib.h> for exit() prototype. 2003-08-20 09:50:16 +00:00
nathanw
bd9a18b79f Split out pthread_{set,get}specific() into a separate file and arrange
for that file to not be built with profiling. This makes it reasonable to
use pthread_{set,get}specific() to implement thread-safe profiline call counts.
2003-08-13 18:52:01 +00:00
scw
46fc66f7d8 Adapt to Nathan's recent pt_trapuc/pt_sleepuc change. 2003-08-12 14:01:08 +00:00
agc
eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
lukem
a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
kleink
7d3a44f705 Remove PT_SLEEPUC, which somehow wasn't. 2003-07-29 15:18:49 +00:00
salo
99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00