mtm [Mon, 2 Jun 2003 11:01:00 +0000 (11:01 +0000)]
Unwind the _giant_mutex from pthread_detach(). When detaching a joiner thread
it's important the correct lock order is observed: lock first the joined and
then the joiner.
obrien [Mon, 2 Jun 2003 08:13:49 +0000 (08:13 +0000)]
[rev 1.26 log cont.]
I got a bazaar bug report after someone did several back to back
'make worlds'. I'm not sure how compiling /usr/src as C99 would cause
this, but be cautious and affective go back to previous state until I can
look into it.
obrien [Mon, 2 Jun 2003 02:41:38 +0000 (02:41 +0000)]
Don't use ## to concatinate to two things that don't together make a C token.
Two tokens that don't together form a vaid preprocssor token cannot be
pasted together using ANSI-C token concatinatation. GCC 3.2's cpp, at least,
produces the desired result w/o using "##".
obrien [Mon, 2 Jun 2003 01:01:42 +0000 (01:01 +0000)]
To quote Tony Maher <tonymaher@optushome.com.au>, "maybe 3rd time lucky ;-)"
*sigh* Just can't get a brake when trying to react too quickly and fix the build.
mjacob [Mon, 2 Jun 2003 00:37:42 +0000 (00:37 +0000)]
Check in some months long pending minor debug output changes.
Clarify that the implicit fallthrough was *not* intentional (thanks, Poul!)
and reorganize the code so a correct fallthrough (with /* FALLTHROUGH */)
occurs.
marcel [Mon, 2 Jun 2003 00:16:39 +0000 (00:16 +0000)]
o Fix a cut-n-paste bug. We were clobbering rp with gp...
o Make sure the arguments to ctx_wrapper() are loaded from the
backing store by forcing an underflow. Do this by making all
registers in the register frame local.
alc [Sun, 1 Jun 2003 23:59:48 +0000 (23:59 +0000)]
Change kernel_object and kmem_object to (&kernel_object_store) and
(&kmem_object_store), respectively. This allows the address of these
objects to be resolved at link-time rather than run-time.
marcel [Sun, 1 Jun 2003 23:22:56 +0000 (23:22 +0000)]
Improve set_mcontext:
o Don't copy psr verbatim from the user supplied context. Only allow
userland to change the processor settings that are part of the user
mask.
marcel [Sun, 1 Jun 2003 23:19:21 +0000 (23:19 +0000)]
Improve on cpu_set_upcall:
o Use pcb and tf for the new pcb and the new trapframe and use pcb0
for the old (current) pcb. The mix of pcb, pcb2 and tf was slightly
confusing.
o Don't define td->td_frame here. It has already been set previously
by cpu_thread_setup. Add a KASSERT to make sure pcb and tf are both
non-NULL.
o Make sure the number of dirty registers is 0 for the new thread.
There are no user registers on the backing store because we heven't
enter userland yet.
Make the PacketAliasSetAddress() function call optional. If it
is not called, and no static rules match an outgoing packet, the
latter retains its source IP address. This is in support of the
"static NAT only" mode.
tjr [Sun, 1 Jun 2003 22:37:38 +0000 (22:37 +0000)]
Give the -o option before any filename operands when invoking the sort
utility. 1003.1-2001 does not allow sort to accept the -o option after
the operands (Base Definitions, 12.2 Utility Syntax Guidelines,
Guideline 9).
mux [Sun, 1 Jun 2003 19:26:34 +0000 (19:26 +0000)]
- Style(9) fixes, most notably :
o Remove register keyword
o ANSIfy prototypes
o Remove "return;" at the end of void functions
o Remove trailing spaces
o Don't align local variables with tabs and reorder them
o Don't use /* FOO */ at the end of a #ifdef FOO block if
it's a small block
- Other non-functional changes :
o 6 -> ETHER_ADDR_LEN
o Don't initialize if_output; ether_ifattach() does it for us
marcel [Sun, 1 Jun 2003 08:29:43 +0000 (08:29 +0000)]
Implement cpu_thread_setup(). This is mostly the same as on i386,
except for the fact that trapframes have a size recorded in it
that we set here too. We need this for proper thread setup.
truckman [Sun, 1 Jun 2003 06:24:32 +0000 (06:24 +0000)]
Fix up locking problems in fifo_open() and fifo_close():
Sleep on the vnode interlock while waiting for another
caller to increment fi_readers or fi_writers. Hold the
vnode interlock while incrementing fi_readers or fi_writers
to prevent a wakeup from being missed.
Only access fi_readers and fi_writers while holding the vnode
lock. Previously fifo_close() decremented their values without
holding a lock.
Move resource deallocation from fifo_close() to fifo_inactive(),
which allows the VOP_CLOSE() call in the error return path in
fifo_open() to be removed. Fifo_open() was calling VOP_CLOSE()
with the vnode lock held, in violation the current vnode locking
API. Also the way fifo_close() used vrefcnt() to decide whether
to deallocate resources was bogus according to comments in the
vrefcnt() implementation.
marcel [Sun, 1 Jun 2003 05:57:58 +0000 (05:57 +0000)]
Remove the ia64 hackery in threadinit() that was needed to work around
the lameness of the kstack code. The EPC overhaul de-lame-ified the
kstack code by removing the need for contigmalloc(). We can now
allocate stacks using malloc(). We probably want to make the stacks
swappable as well so that we can make it MI. But that's another story.