Age | Commit message (Collapse) | Author |
|
i got carried away and deleted a whole bunch of useless casts
this is C, not C++. ok md5
|
|
to wakeup.
|
|
|
|
|
|
|
|
|
|
|
|
uses rfork(RFTHREAD) to create threads, which are presently processes
that are a little more tightly bound together. several new syscalls
added to facilitate a userland thread library.
all conditional on RTHREADS, currently disabled.
ok deraadt
|
|
'go for it' deraadt@
|
|
|
|
(but I tend to call it ssh localhost & now when telnetd is
history). This is more localized patch, but leaves us with
a recursive lock for protecting scheduling and signal state.
Better care is taken to actually be symmetric over mi_switch.
Also, the dolock cruft in psignal can go with this solution.
Better test runs by more people for longer time has been
carried out compared to the c2k5 patch.
Long term the current mess with interruptible sleep, the
default action on stop signals and wakeup interactions need
to be revisited. ok deraadt@, art@
|
|
|
|
everyone for the prompt review and ok of this work ;-) Yeah, that includes me
too, or maybe especially me. I am sorry.
Change the sched_lock to a mutex. This fixes, among other things, the infamous
"telnet localhost &" problem. The real bug in that case was that the sched_lock
which is by design a non-recursive lock, was recursively acquired, and not
enough releases made us hold the lock in the idle loop, blocking scheduling
on the other processors. Some of the other processors would hold the biglock though,
which made it impossible for cpu 0 to enter the kernel... A nice deadlock.
Let me just say debugging this for days just to realize that it was all fixed
in an old diff noone ever ok'd was somewhat of an anti-climax.
This diff also changes splsched to be correct for all our architectures.
|
|
"put this process to sleep" and "find a process to run" operations.
no functional change. ok art@
|
|
shuffle functions around so that scheduler is all together.
no real functional changes. ok art@ testing miod@
|
|
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.
It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code. Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.
ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@
|
|
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.
ok art@ niklas@ nordin@
|
|
scheduling errors on non-i386 yet.
deraadt@ aaron@ ok
|
|
|
|
Introduce the cpu_info structure, p_cpu field in struct proc and global
scheduling context and various changed code to deal with this. At the
moment no architecture uses this stuff yet, but it will allow us slow and
controlled migration to the new APIs.
All new code is ifdef:ed out.
ok deraadt@ niklas@
|
|
is just going to annoy people
|
|
|
|
|
|
p->p_rtime in this case instead of zeroing it; based on an idea
from nordin@. Also add a printf about microtime() not being monotonic
for this case (from miod@) #ifdef DIAGNOSTIC. This version OK otto@
|
|
Also add a check for a negative result when subtracting microtime(&now)
from runtime and simply treat this as zero. This should *not* happen
but due to an apparent bug in microtime on dual clock machines, it does.
The microtime bug is currently being examined.
Based on a diff from miod@ with help from otto@; ok deraadt@ otto@
|
|
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
matthieu, who noted it now that X is not running as root. ok nordin
|
|
|
|
|
|
declarations (extern int foo), and compensate in the appropriate locations.
|
|
|
|
|
|
|
|
|
|
(Look ma, I might have broken the tree)
|
|
|
|
ltsleep takes an additional argument - a simplelock and unlocks it when it's
safe to do so.
tsleep now becomes a wrapper around ltsleep.
From NetBSD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
not once per process.
|
|
traced proc. The vnode is in the proc and all functions need the proc.
|
|
|
|
|
|
|
|
cpu_exit no longer frees the vmspace and u-area. This is now handled by a
separate kernel thread "reaper". This is to avoid sleeping locks in the
critical path of cpu_exit where we're not allowed to sleep.
From NetBSD
|