Age | Commit message (Collapse) | Author |
|
invoke bufadjust() accordingly. Similar to what sysctl kern.bufcachepercent
does.
|
|
|
|
|
|
|
|
traced processes to the active thread, otherwise we will deadlock resulting
in an unkillable stopped process.
ok guenther@
|
|
that leaks all the file pointers. Instead make sure that the exit path via
restart: -> out: does not free the uninitialized pointer.
OK deraadt@ guenther@
|
|
Byte order adjustment for bpf was hidden behind bpf_mtap_af() and
sizeof(u_int32_t) is used for length of the bpf header.
tested by sebastia and mxb at alumni.chalmers.se.
ok claudio
|
|
|
|
|
|
|
|
ok deraadt@
|
|
|
|
stop, just like we do for PT_CONTINUE/PT_STEP. The current code isn't
ready for directing signals to other threads yet.
|
|
valid after that. Copy the data into a temp buffer and then copy it back
into the shiny new cluster. Problem found by deraadt@. Ok deraadt@
|
|
exit1() is wrong, since single_thread_check() already decrements it and may
call exit1() after that. I can't reproduce the hang that this was supposed
to fix anyway.
|
|
|
|
losing them.
ok claudio
|
|
<machine/reg.h> for the needs of struct sigcontext; said struct ought to
only use simple integer types.
Fixes build of groff on landisk.
ok pirofti@ (who had a similar diff)
|
|
It implements a full-stop model where all threads are stopped before handing
over control to the debugger. Events are reported as before through wait(2);
you will have to call ptrace(PT_GET_PROCESS_STATE, ...) to find out which
thread hit the event. Since this changes the size of struct ptrace_state,
you will have to recompile gdb.
ok guenther@
|
|
Ok by mikeb@ and deraadt@
|
|
|
|
selected fd is automatically fd_used(). We need to fd_unused() it,
because it will be fd_used() again in finishdup(). spotted by guenther
ok miod
|
|
|
|
|
|
This expands the already bloated FILL_KPROC macro to take an extra
parameter that indicates if the callee is a thread or a process.
The userland bits are adjusted accordingly and ps(1) and top(1) now
display per thread usage times when -H is used.
Also pkill(1) had to be adjusted so that duplicates don't pop up.
libkvm does basically the same thing as the kernel bits.
Okay guenther@.
|
|
Unlock missed an 'f', which caused it to unlock the in-use pageqs, rather
than the free pageqs as it was supposed to.
|
|
threads list. Calling TAILQ_NEXT on them is a bad idea and will panic
the kernel. So check the P_WEXIT flag and pretend the thread doesn't
exist if it is set. Also make PT_GET_THREAD_FIRST return the first
thread on the threads list instead of the "main" thread, such that you
can actually keep enumerating the threads in this case.
ok guenther@, miod@
|
|
|
|
|
|
|
|
|
|
The fault path is used to update the maxrss of the faulting proc.
Doesn't affect anything, as it was 0 before.
Requested by espie, "just commit it" deraadt
|
|
|
|
|
|
|
|
descriptors the process currently has open.
ok guenther miod gilles ...
|
|
the dup and dup2 cases. with guenther
ok miod
|
|
|
|
figured out by and ok guenther
|
|
|
|
ok guenther@
|
|
from a fork syscall done by the parent. Use __tfork, not rfork
here to match the ktrace records for the parent (CALL __tfork,
RET __tfork). ok guenther
|
|
during CMSG_DATA SCM_RIGHTS fd transfers. If this is exceeded,
return EMFILE.
ok claudio guenther gilles
|
|
compatibility with FreeBSD/NetBSD.
Also rename SIMPLEQ_REMOVE_NEXT to SIMPLEQ_REMOVE_AFTER.
ok mikeb@ guenther@
|
|
Reduces O(n log n) allocations to O(log n).
ok deraadt, tedu
|
|
to identify ktrace files. kdump(1) will now refuse to operate on
trace data without the start record and as a bonus will print only
PID, unless an -H flag is specified to print PID/TID pairs. Initial
diff, input from and ok deraadt, guenther.
|
|
|
|
count processes instead of threads. New sysctl()s KERN_NTHREADS and
KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel
variables are replaced by nprocess, maxprocess, nthreads, and maxthread.
ok tedu@ mikeb@
|
|
for the tick that we're already in the middle of.
noted and tested by aja; ok kurt@
|
|
- Posix rules that a 0-byte mmap must return EINVAL
- our allocators are unable to distinguish between free memory and
0 bytes of allocated memory
|