The NetBSD Project

CVS log for src/sys/kern/kern_exit.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.242 / (download) - annotate - [select for diffs], Thu Sep 27 20:43:15 2012 UTC (7 months, 3 weeks ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-nbase, tls-maxphys-base, khorben-n900, agc-symver-base, agc-symver, HEAD
Changes since 1.241: +13 -26 lines
Diff to previous 1.241 (colored)

exit_lwps, lwp_wait: fix a race condition by re-trying if p_lock was dropped
in a case of process exit.  Necessary to re-flag all LWPs for exit, as their
state might have changed or new LWPs spawned.

Should fix PR/46168 and PR/46402.

Revision 1.241 / (download) - annotate - [select for diffs], Sun Aug 5 14:53:25 2012 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.240: +31 -29 lines
Diff to previous 1.240 (colored)

Use separate names for the multitudinous uses of `q' in exit1.

Now I can follow which process is which in this routine.

If I jiggle the whitespace so line numbers don't change, there is no
change in the output of `objdump -d kern_exit.o' for amd64.

ok abp

Revision 1.240 / (download) - annotate - [select for diffs], Fri Jul 27 20:52:49 2012 UTC (9 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.239: +8 -2 lines
Diff to previous 1.239 (colored)

revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind

Revision 1.239 / (download) - annotate - [select for diffs], Sun Jul 22 22:40:19 2012 UTC (10 months ago) by rmind
Branch: MAIN
Changes since 1.238: +9 -3 lines
Diff to previous 1.238 (colored)

fork1: fix use-after-free problems.  Addresses PR/46128 from Andrew Doran.
Note: PL_PPWAIT should be fully replaced and modificaiton of l_pflag by
other LWP is undesirable, but this is enough for netbsd-6.

Revision 1.238 / (download) - annotate - [select for diffs], Sun Apr 8 11:27:45 2012 UTC (13 months, 2 weeks ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.237: +5 -8 lines
Diff to previous 1.237 (colored)

Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat

Revision 1.237 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:50 2012 UTC (15 months ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.236: +7 -60 lines
Diff to previous 1.236 (colored)

Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.236 / (download) - annotate - [select for diffs], Wed Feb 15 11:59:30 2012 UTC (15 months, 1 week ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.235: +8 -3 lines
Diff to previous 1.235 (colored)

Fix fallout from the new tests exercising all error paths: do not deactivate
the pmap of a vmspace-less child of a posix spawn operation that never
made it to userland.

Revision 1.235 / (download) - annotate - [select for diffs], Sun Oct 9 20:30:37 2011 UTC (19 months, 2 weeks ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.234: +4 -3 lines
Diff to previous 1.234 (colored)

mark exit_psignal() as __noclone to work around a gcc 4.5 bug on arm.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Jun 6 22:04:34 2011 UTC (23 months, 2 weeks ago) by matt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.233: +7 -2 lines
Diff to previous 1.233 (colored)

Add some more MI hook points for PCU.  Discard the PCU state at lwp_exit and
at exec time.  Before forking, save the PCU state so that cpu_lwp_fork
doesn't have.  Remove MD code which did that before.

Revision 1.233 / (download) - annotate - [select for diffs], Sun May 1 00:11:52 2011 UTC (2 years ago) by rmind
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.232: +3 -3 lines
Diff to previous 1.232 (colored)

Rename limfree() to lim_free(), misc clean up.  No functional change.

Revision 1.232 / (download) - annotate - [select for diffs], Mon Feb 21 20:23:28 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.231: +3 -2 lines
Diff to previous 1.231 (colored)

Borrow the lwpctl data area from the parent for the vfork() child.
Otherwise the child will incorrectly see it is not running on any
CPU.  Among other things, this fixes crashes from having
LD_PRELOAD=libpthread.so set in the env.

reviewed by tech-kern

Revision 1.231 / (download) - annotate - [select for diffs], Sat Dec 18 01:36:19 2010 UTC (2 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.230: +4 -2 lines
Diff to previous 1.230 (colored)

- Fix a few possible locking issues in execve1() and exit1().  Add a note
  that scheduler locks are special in this regard - adaptive locks cannot
  be in the path due to turnstiles.  Randomly spotted/reported by uebayasi@.
- Remove unused lwp_relock() and replace lwp_lock_retry() by simplifying
  lwp_lock() and sleepq_enter() a little.
- Give alllwp its own cache-line and mark lwp_cache pointer as read-mostly.

OK ad@

Revision 1.230 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:37 2010 UTC (2 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.229: +3 -3 lines
Diff to previous 1.229 (colored)

many changes for COMPAT_LINUX:
 - update the linux syscall table for each platform.
 - support new-style (NPTL) linux pthreads on all platforms.
   clone() with CLONE_THREAD uses 1 process with many LWPs
   instead of separate processes.
 - move the contents of sys__lwp_setprivate() into a new
   lwp_setprivate() and use that everywhere.
 - update linux_release[] and linux32_release[] to "2.6.18".
 - adjust placement of emul fork/exec/exit hooks as needed
   and adjust other emul code to match.
 - convert all struct emul definitions to use named initializers.
 - change the pid allocator to allow multiple pids to refer to the same proc.
 - remove a few fields from struct proc that are no longer needed.
 - disable the non-functional "vdso" code in linux32/amd64,
   glibc works fine without it.
 - fix a race in the futex code where we could miss a wakeup after
   a requeue operation.
 - redo futex locking to be a little more efficient.

Revision 1.229 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:30 2010 UTC (2 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.228: +4 -4 lines
Diff to previous 1.228 (colored)

Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.

Revision 1.228 / (download) - annotate - [select for diffs], Tue May 11 09:30:29 2010 UTC (3 years ago) by pooka
Branch: MAIN
Changes since 1.227: +3 -3 lines
Diff to previous 1.227 (colored)

the crowd went crazy
as typo left the stage

Revision 1.227 / (download) - annotate - [select for diffs], Wed Mar 3 00:47:30 2010 UTC (3 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.226: +2 -4 lines
Diff to previous 1.226 (colored)

remove redundant checks of PK_MARKER.

Revision 1.226 / (download) - annotate - [select for diffs], Mon Mar 1 21:10:15 2010 UTC (3 years, 2 months ago) by darran
Branch: MAIN
Changes since 1.225: +15 -2 lines
Diff to previous 1.225 (colored)

DTrace: Add an SDT (Statically Defined Tracing) provider framework, and
implement most of the proc provider.  Adds proc:::create, exec,
exec_success, exec_faillure, signal_send, signal_discard, signal_handle,
lwp_create, lwp_start, lwp_exit.

Revision 1.225 / (download) - annotate - [select for diffs], Wed Nov 4 21:23:02 2009 UTC (3 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Changes since 1.224: +22 -29 lines
Diff to previous 1.224 (colored)

do_sys_wait(): fix previous by checking for ru != NULL.  Noticed by
Onno van der Linden.  Also, remove redundant arguments (seems that
was_zombie was not used since rev 1.177 ?).

Revision 1.224 / (download) - annotate - [select for diffs], Sun Nov 1 21:05:30 2009 UTC (3 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.223: +9 -6 lines
Diff to previous 1.223 (colored)

do_sys_wait: clear rusage, instead of returning garbage.  Patch from
dholland@ via PR/40717, with minor change by me.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Oct 22 22:28:57 2009 UTC (3 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.222: +2 -4 lines
Diff to previous 1.222 (colored)

Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.

Revision 1.222 / (download) - annotate - [select for diffs], Sun Jun 28 11:42:43 2009 UTC (3 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.221: +4 -3 lines
Diff to previous 1.221 (colored)

wrap a long line.

Revision 1.221 / (download) - annotate - [select for diffs], Fri May 8 13:32:59 2009 UTC (4 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.220: +3 -3 lines
Diff to previous 1.220 (colored)

exit1: fix a race with do_sys_wait/proc_free.

Revision 1.220 / (download) - annotate - [select for diffs], Sat Apr 25 15:06:31 2009 UTC (4 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.219: +10 -11 lines
Diff to previous 1.219 (colored)

- Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
  proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by <ad>.

Revision 1.219 / (download) - annotate - [select for diffs], Sat Mar 28 21:38:55 2009 UTC (4 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.218: +17 -26 lines
Diff to previous 1.218 (colored)

- proc_free(): no need assign 'p->p_pptr' to 'parent' many times,
  re-use it where appropriate (proc_lock is held across usages).
- Undefine DEBUG_EXIT.

Revision 1.218 / (download) - annotate - [select for diffs], Thu Jan 22 14:38:35 2009 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.217: +2 -3 lines
Diff to previous 1.217 (colored)

malloc -> kmem_alloc

Revision 1.217 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (4 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.216: +3 -3 lines
Diff to previous 1.216 (colored)

merge christos-time_t

Revision 1.216 / (download) - annotate - [select for diffs], Fri Nov 14 23:33:45 2008 UTC (4 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.215: +2 -6 lines
Diff to previous 1.215 (colored)

Make POSIX AIO loadable as a module.

Revision 1.215 / (download) - annotate - [select for diffs], Sat Nov 1 05:59:33 2008 UTC (4 years, 6 months ago) by wrstuden
Branch: MAIN
Changes since 1.214: +21 -20 lines
Diff to previous 1.214 (colored)

Adjust the sleeps in lwpcache and lwpublk. Make them uninterruptable
for now. This will prevent signals from waking them. Adjust
exit_lwps() to explicitly add LW_SINTR to all of them, so that
the process exit code can wake them up.

This is needed as threads in both of these wait channels die once
they are woken. So they aren't interruptable in the typical sense.

I am now able to suspend & resume firefox successfully now.

Revision 1.214 / (download) - annotate - [select for diffs], Sat Oct 25 14:10:26 2008 UTC (4 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.213: +3 -3 lines
Diff to previous 1.213 (colored)

exit1: update a comment.

Revision 1.213 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (4 years, 7 months ago) by wrstuden
Branch: MAIN
CVS Tags: matt-mips64-base2, haad-dm-base1
Changes since 1.212: +57 -4 lines
Diff to previous 1.212 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (4 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored)

Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Jun 16 09:51:14 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.210: +20 -38 lines
Diff to previous 1.210 (colored)

- PPWAIT is need only be locked by proc_lock, so move it to proc::p_lflag.
- Remove a few needless lock acquires from exec/fork/exit.
- Sprinkle branch hints.

No functional change.

Revision 1.210 / (download) - annotate - [select for diffs], Mon Jun 2 16:18:09 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.209: +3 -2 lines
Diff to previous 1.209 (colored)

Most contention on proc_lock is from getppid(), so cache the parent's PID.

Revision 1.209 / (download) - annotate - [select for diffs], Mon May 19 17:06:02 2008 UTC (5 years ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.208: +3 -15 lines
Diff to previous 1.208 (colored)

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Apr 29 16:21:01 2008 UTC (5 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.207: +5 -3 lines
Diff to previous 1.207 (colored)

Ignore processes with PK_MARKER set.

Revision 1.207 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (5 years ago) by martin
Branch: MAIN
Changes since 1.206: +2 -9 lines
Diff to previous 1.206 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.206 / (download) - annotate - [select for diffs], Mon Apr 28 15:36:01 2008 UTC (5 years ago) by ad
Branch: MAIN
Changes since 1.205: +2 -3 lines
Diff to previous 1.205 (colored)

Add MI code to support in-kernel preemption. Preemption is deferred by
one of the following:

- Holding kernel_lock (indicating that the code is not MT safe).
- Bracketing critical sections with kpreempt_disable/kpreempt_enable.
- Holding the interrupt priority level above IPL_NONE.

Statistics on kernel preemption are reported via event counters, and
where preemption is deferred for some reason, it's also reported via
lockstat. The LWP priority at which preemption is triggered is tuneable
via sysctl.

Revision 1.205 / (download) - annotate - [select for diffs], Sun Apr 27 11:39:20 2008 UTC (5 years ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.204: +3 -4 lines
Diff to previous 1.204 (colored)

Disable preemption during the final stages of LWP exit.

Revision 1.204 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.203: +25 -27 lines
Diff to previous 1.203 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.203 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.202: +22 -47 lines
Diff to previous 1.202 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.202 / (download) - annotate - [select for diffs], Thu Mar 27 19:06:52 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42, christos-time_t
Changes since 1.201: +7 -4 lines
Diff to previous 1.201 (colored)

Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

Revision 1.201 / (download) - annotate - [select for diffs], Sun Mar 23 16:53:45 2008 UTC (5 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Changes since 1.200: +9 -7 lines
Diff to previous 1.200 (colored)

Reorder a code block slightly, to allow proclist_mutex to be an adaptive
mutex (purely for testing).

Revision 1.200 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Jan 28 12:22:46 2008 UTC (5 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: mjf-devfs2
Changes since 1.198: +2 -10 lines
Diff to previous 1.198 (colored)

remove a special allocator for uareas, which is no longer necessary.
use pool_cache instead.

Revision 1.198 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:49 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.197: +15 -13 lines
Diff to previous 1.197 (colored)

Merge vmlocking2 to head.

Revision 1.197 / (download) - annotate - [select for diffs], Mon Dec 31 15:32:11 2007 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.196: +2 -7 lines
Diff to previous 1.196 (colored)

Remove systrace. Ok core@.

Revision 1.196 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:36 2007 UTC (5 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.195: +4 -3 lines
Diff to previous 1.195 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.195 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:08 2007 UTC (5 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.194: +12 -11 lines
Diff to previous 1.194 (colored)

Convert all the system call entry points from:
    int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

Revision 1.194 / (download) - annotate - [select for diffs], Fri Nov 30 23:05:43 2007 UTC (5 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.193: +4 -3 lines
Diff to previous 1.193 (colored)

Use membar_*().

Revision 1.193 / (download) - annotate - [select for diffs], Mon Nov 12 23:11:59 2007 UTC (5 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.192: +7 -3 lines
Diff to previous 1.192 (colored)

Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.

Revision 1.192 / (download) - annotate - [select for diffs], Wed Nov 7 15:56:21 2007 UTC (5 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.191: +7 -11 lines
Diff to previous 1.191 (colored)

Merge tty changes from the vmlocking branch.

Revision 1.191 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:21 2007 UTC (5 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.190: +7 -8 lines
Diff to previous 1.190 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.190 / (download) - annotate - [select for diffs], Wed Oct 24 14:50:40 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.189: +4 -4 lines
Diff to previous 1.189 (colored)

Make ras_lookup() lockless.

Revision 1.189 / (download) - annotate - [select for diffs], Fri Oct 19 12:16:42 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.188 / (download) - annotate - [select for diffs], Fri Oct 12 14:29:37 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.187: +29 -31 lines
Diff to previous 1.187 (colored)

Merge from vmlocking: fix a deadlock with (threaded) soft interrupts and
process exit.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Sep 6 23:58:56 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.186: +3 -3 lines
Diff to previous 1.186 (colored)

- Fix sleepq_block() to return EINTR if the LWP is cancelled. Pointed out
  by yamt@.

- Introduce SOBJ_SLEEPQ_LIFO, and use for LWPs sleeping via _lwp_park.
  libpthread enqueues most waiters in LIFO order to try and wake LWPs that
  ran recently, since their working set is more likely to be in cache.
  Matching the order of insertion reduces the time spent searching queues
  in the kernel.

- Do not boost the priority of LWPs sleeping in _lwp_park, just let them
  sleep at their user priority level. LWPs waiting for some I/O event in
  the kernel still wait with kernel priority and get woken more quickly.
  This needs more evaluation and is to be revisited, but the effect on a
  variety of benchmarks is positive.

- When waking LWPs, do not send an IPI to remote CPUs or arrange for the
  current LWP to be preempted unless (a) the thread being awoken has kernel
  priority and has higher priority than the currently running thread or (b)
  the remote CPU is idle.

Revision 1.186 / (download) - annotate - [select for diffs], Wed Aug 15 12:20:28 2007 UTC (5 years, 9 months ago) by ad
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.185: +15 -11 lines
Diff to previous 1.185 (colored)

proc_free: don't destroy locks until the last LWP is confirmed off the CPU.
This is an ideal candidate for pool_cache.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Aug 15 12:07:32 2007 UTC (5 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.184: +4 -4 lines
Diff to previous 1.184 (colored)

Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.

Revision 1.184 / (download) - annotate - [select for diffs], Tue Aug 7 12:45:54 2007 UTC (5 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.183: +7 -7 lines
Diff to previous 1.183 (colored)

Do cv_broadcast() on proc::p_waitcv to be on the safe side (the parent
could be multithreaded).

Revision 1.183 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:52 2007 UTC (5 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.182: +12 -2 lines
Diff to previous 1.182 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.182 / (download) - annotate - [select for diffs], Fri Jun 15 18:29:53 2007 UTC (5 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.181: +14 -12 lines
Diff to previous 1.181 (colored)

proc_free: avoid a potential race where we could free struct proc before
the last LWP in the process is off the CPU. Noted by yamt@.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Jun 13 12:14:10 2007 UTC (5 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.180: +11 -3 lines
Diff to previous 1.180 (colored)

exit_lwps: fix a deadlock.

Revision 1.180 / (download) - annotate - [select for diffs], Thu May 31 06:24:23 2007 UTC (5 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

Make AIO initialization MP-safe.

Actually, lwp_exit() with (l != curlwp) will not work.
This fix might be pulled up from vmlocking branch.

Revision 1.179 / (download) - annotate - [select for diffs], Thu May 17 14:51:39 2007 UTC (6 years ago) by yamt
Branch: MAIN
Changes since 1.178: +5 -14 lines
Diff to previous 1.178 (colored)

merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.

Revision 1.178 / (download) - annotate - [select for diffs], Tue May 8 20:10:15 2007 UTC (6 years ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.177: +14 -14 lines
Diff to previous 1.177 (colored)

Add the child 'rusage' of an exiting process to its own 'rusage' exactly
once, and prior to passing it to the caller of sys_wait4() and at the same
time as adding it to the parent.
Commands like:
time sh -c 'i=0; while [ $i -lt 1000 ]; do i=$(expr $i + 1); done'
now give same output.

Revision 1.177 / (download) - annotate - [select for diffs], Mon May 7 16:53:17 2007 UTC (6 years ago) by dsl
Branch: MAIN
Changes since 1.176: +70 -50 lines
Diff to previous 1.176 (colored)

Split sys_wait4() so that compat code can fiddle with the returned 'status'
and 'rusage' without having to copy data to/from stackgap buffers.
The old split (find_stopped_child) could be removed.
amd64 seems to run netbsd32, linux and linux32 emulations. sparc64 compiles.

Revision 1.176 / (download) - annotate - [select for diffs], Mon May 7 09:30:14 2007 UTC (6 years ago) by dsl
Branch: MAIN
Changes since 1.175: +8 -4 lines
Diff to previous 1.175 (colored)

Add child rusage values to exiting process in 'find_stopped_child'
so that it is (correctlly) available to the caller of wait4().
The self and child rusage values remain split for zombies.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Apr 30 20:11:41 2007 UTC (6 years ago) by dsl
Branch: MAIN
Changes since 1.174: +10 -17 lines
Diff to previous 1.174 (colored)

Remove proc->p_ru and the 'rusage' pool.
I think it existed to cache the numbers in kernel memory of a zombie when
proc->p_stats was part of the 'u' area - so got freed earlier and wouldn't
(easily) be accessible from a separate process.  However since both the
p_ru and p_stats fields are freed at the same time it is no longer needed.
Ride the recent 4.99.19 version change.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Apr 30 14:44:30 2007 UTC (6 years ago) by rmind
Branch: MAIN
Changes since 1.173: +6 -2 lines
Diff to previous 1.173 (colored)

Import of POSIX Asynchronous I/O.
Seems to be quite stable. Some work still left to do.

Please note, that syscalls are not yet MP-safe, because
of the file and vnode subsystems.

Reviewed by: <tech-kern>, <ad>

Revision 1.173 / (download) - annotate - [select for diffs], Thu Mar 29 17:35:17 2007 UTC (6 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.172: +7 -7 lines
Diff to previous 1.172 (colored)

cv_wakeup -> cv_signal

Revision 1.172 / (download) - annotate - [select for diffs], Wed Mar 21 18:26:00 2007 UTC (6 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.171: +4 -22 lines
Diff to previous 1.171 (colored)

Improvements to lwp_wait1(), for PR kern/35932:

- Better detect simple cycles of threads calling _lwp_wait and return
  EDEADLK. Does not handle deeper cycles like t1 -> t2 -> t3 -> t1.
- If there are multiple threads in _lwp_wait, then make sure that
  targeted waits take precedence over waits for any LWP to exit.
- When checking for deadlock, also count the number of zombies currently
  in the process as potentially reapable. Whenever a zombie is murdered,
  kick all waiters to make them check again for deadlock.
- Add more comments.

Also, while here:

- LOCK_ASSERT -> KASSERT in some places
- lwp_free: change boolean arguments to type 'bool'.
- proc_free: let lwp_free spin waiting for the last LWP to exit, there's
  no reason to do it here.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Mar 11 23:40:58 2007 UTC (6 years, 2 months ago) by ad
Branch: MAIN
Branch point for: reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.170: +7 -7 lines
Diff to previous 1.170 (colored)

Adjust previous: move the release of specificdata after the very last
file system operation.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Mar 11 23:19:49 2007 UTC (6 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.169: +9 -9 lines
Diff to previous 1.169 (colored)

exit1: destroy the proc/lwp specificdata after calling uvm_proc_exit, as
file systems can still be using it.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:24 2007 UTC (6 years, 2 months ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.168: +23 -24 lines
Diff to previous 1.168 (colored)

- Make the proclist_lock a mutex. The write:read ratio is unfavourable,
  and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.

Revision 1.168 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:43 2007 UTC (6 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.167: +4 -4 lines
Diff to previous 1.167 (colored)

TRUE -> true, FALSE -> false

Revision 1.167 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:42 2007 UTC (6 years, 3 months ago) by pavel
Branch: MAIN
Changes since 1.166: +5 -5 lines
Diff to previous 1.166 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Feb 16 00:39:16 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.165: +13 -18 lines
Diff to previous 1.165 (colored)

proc_free() was returning a NULL rusage pointer to wait() when a traced
process was reparented. Change proc_free() to copy the rusage to a buffer
on the stack if required, so it can be passed both to the debugger and
to the real parent process.

Fixes kern/35582 (kernel panics with gdb).

Revision 1.165 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.164: +464 -344 lines
Diff to previous 1.164 (colored)

Merge newlock2 to head.

Revision 1.164 / (download) - annotate - [select for diffs], Fri Dec 22 08:04:01 2006 UTC (6 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.163: +3 -5 lines
Diff to previous 1.163 (colored)

lwp::l_acflag is no longer useful.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Dec 6 10:02:22 2006 UTC (6 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

use KSI_INIT rather than memset.  no functional changes.

Revision 1.162 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (6 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.161: +6 -5 lines
Diff to previous 1.161 (colored)

remove some __unused from function parameters.

Revision 1.161 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:15 2006 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.160: +5 -5 lines
Diff to previous 1.160 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.160 / (download) - annotate - [select for diffs], Wed Oct 11 04:51:06 2006 UTC (6 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.159: +9 -2 lines
Diff to previous 1.159 (colored)

Don't free specificdata in lwp_exit2(); it's not safe to block there.
Instead, free an LWP's specificdata from lwp_exit() (if it is not the
last LWP) or exit1() (if it is the last LWP).  For consistency, free the
proc's specificdata from exit1() as well.  Add lwp_finispecific() and
proc_finispecific() functions to make this more convenient.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Sep 23 15:36:12 2006 UTC (6 years, 8 months ago) by xtraeme
Branch: MAIN
Changes since 1.158: +2 -3 lines
Diff to previous 1.158 (colored)

Remove duplicated includes, from Jeff Ito -> PR kern/26113. Thanks.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Aug 23 19:49:09 2006 UTC (6 years, 9 months ago) by manu
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.157: +7 -5 lines
Diff to previous 1.157 (colored)

1) Complete Linux exit_group() emulation
Members of the thread group must die without reporting to the parent and
without going to zombie stage. We do that by reparenting to init before
catching a SIGKILL. The parent will not see the child death.

The thread group leader must report the exit status, even if it exits
because of another thread calling exit_group(). We do that by storing the
exit status in struct linux_emuldata_shared, and the exit hook has the
duty of setting struct proc's p_xstat for the thread group leader.

2) For exit/fork/exec hooks, move the NPTL specific code to separate functions
that are shared between COMPAT_LINUX and COMPAT_LINUX32

3) Fix LINUX_CLONE_PARENT_SETTID semantics

Revision 1.157 / (download) - annotate - [select for diffs], Wed Jul 19 21:11:37 2006 UTC (6 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.156: +14 -3 lines
Diff to previous 1.156 (colored)

- Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.

Revision 1.156 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (7 years ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.155: +6 -8 lines
Diff to previous 1.155 (colored)

integrate kauth.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Mar 5 07:21:38 2006 UTC (7 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.154: +4 -4 lines
Diff to previous 1.154 (colored)

implement PT_SYSCALL

Revision 1.154 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (7 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.153: +4 -4 lines
Diff to previous 1.153 (colored)

merge ktrace-lwp.

Revision 1.153 / (download) - annotate - [select for diffs], Sat Oct 1 21:07:38 2005 UTC (7 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

log when traced process is orphaned

PR: 17388 by Greg A. Woods

Revision 1.152 / (download) - annotate - [select for diffs], Sat Oct 1 06:12:44 2005 UTC (7 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

simplify lwp exit code.

Revision 1.151 / (download) - annotate - [select for diffs], Sun Aug 28 14:57:18 2005 UTC (7 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.150: +4 -2 lines
Diff to previous 1.150 (colored)

protect p_nrlwps by sched_lock.  no objection on tech-kern@.  PR/29652.

Revision 1.150 / (download) - annotate - [select for diffs], Wed Aug 10 09:44:02 2005 UTC (7 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.149: +11 -2 lines
Diff to previous 1.149 (colored)

exit_lwps: fix a race with eg. sa_setwoken.
ie. "exit_lwps: lwp_wait1 failed with error 11"
PR/30689.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Aug 10 09:42:03 2005 UTC (7 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.148: +4 -4 lines
Diff to previous 1.148 (colored)

exit_lwps: fix a race which causes a panic "setrunnable: lwp %p state was %d".

Revision 1.148 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.147: +2 -5 lines
Diff to previous 1.147 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.147 / (download) - annotate - [select for diffs], Sun May 8 18:44:39 2005 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

Panic strings should not end with \n.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Mar 30 17:07:50 2005 UTC (8 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

PR/19837: Stephen Ma: signal(SIGCHLD, SIG_IGN) should not create zombies.

Revision 1.145 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (8 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.144: +13 -13 lines
Diff to previous 1.144 (colored)

nuke trailing whitespace

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jan 24 21:27:02 2005 UTC (8 years, 4 months ago) by dbj
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, matt-timespec
Branch point for: yamt-km
Changes since 1.143: +3 -2 lines
Diff to previous 1.143 (colored)

clear p->p_cwdi of exiting processes and
avoid dereferencing invalid p_cwdi in checkdirs
this fixes a race condition between exiting processes and mount
see discussion on tech-kern:
 http://mail-index.netbsd.org/tech-kern/2004/10/04/0006.html
 http://mail-index.netbsd.org/tech-kern/2004/10/08/0005.html

Revision 1.143 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:52 2004 UTC (8 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored)

introduce a function, proclist_foreach_call, to iterate all procs on
a proclist and call the specified function for each of them.
primarily to fix a procfs locking problem, but i think that it's useful for
others as well.

while i'm here, introduce PROCLIST_FOREACH macro, which is similar to
LIST_FOREACH but skips marker entries which are used by proclist_foreach_call.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Aug 7 03:34:37 2004 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Use the P_ZOMBIE macro instead of open-coding it. No functional change.

Revision 1.141 / (download) - annotate - [select for diffs], Mon May 31 15:33:38 2004 UTC (8 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

cwdfree() signature has been changed to accomodate fine-grained locking.

Revision 1.140 / (download) - annotate - [select for diffs], Tue May 4 21:23:39 2004 UTC (9 years ago) by pk
Branch: MAIN
Changes since 1.139: +118 -96 lines
Diff to previous 1.139 (colored)

exit1: if !BIGLOCK, once the exiting process has been placed on the zombie
list and the proclist lock is released, we shouldn't touch the process
structure anymore, since it may be collected immediately by a waiting
parent.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Mar 14 01:08:47 2004 UTC (9 years, 2 months ago) by cl
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0
Branch point for: netbsd-2
Changes since 1.138: +24 -21 lines
Diff to previous 1.138 (colored)

add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP

Revision 1.138 / (download) - annotate - [select for diffs], Fri Mar 5 07:27:22 2004 UTC (9 years, 2 months ago) by dbj
Branch: MAIN
Changes since 1.137: +8 -3 lines
Diff to previous 1.137 (colored)

add some spltty() calls around TTY_LOCK() calls that didn't have them

Revision 1.137 / (download) - annotate - [select for diffs], Tue Mar 2 09:15:26 2004 UTC (9 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.136: +8 -2 lines
Diff to previous 1.136 (colored)

once exit1() releases big kernel lock, the struct proc can be freed and
re-used by another cpu immediately.  in that case, lwp_exit2() will
access freed memory.  to fix this:

- remove curlwp from p_lwps in exit1() rather than letting lwp_exit2() do so.
- add assertions to ensure freed proc has no lwps.

kern/24329 from me and kern/24574 from Havard Eidnes.

Revision 1.136 / (download) - annotate - [select for diffs], Wed Feb 18 14:42:20 2004 UTC (9 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.135: +4 -4 lines
Diff to previous 1.135 (colored)

Run pmap_deactivate() earlier in exit1(). Prevents a panic on sparc MP
where p->p_vmspace was 0xdeadbeef in pmap_deactivate().

Approved by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.135 / (download) - annotate - [select for diffs], Mon Feb 9 13:11:21 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.134: +4 -2 lines
Diff to previous 1.134 (colored)

- borrow vmspace0 in uvm_proc_exit instead of uvmspace_free.
  the latter is not a appropriate place to do so and it broke vfork.
- deactivate pmap before calling cpu_exit() to keep a balance of
  pmap_activate/deactivate.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Feb 7 10:05:52 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.133: +2 -9 lines
Diff to previous 1.133 (colored)

don't deactivate pmap in exit1 because we'll touch the pmap later.
instead, borrow vmspace0 immediately before destroying the pmap
in uvmspace_free.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Jan 4 11:33:31 2004 UTC (9 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.132: +83 -137 lines
Diff to previous 1.132 (colored)

Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread

Revision 1.132 / (download) - annotate - [select for diffs], Sat Jan 3 19:43:55 2004 UTC (9 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.131: +5 -5 lines
Diff to previous 1.131 (colored)

fix some comments, use NULL instead of 0 for pointer comparison

Revision 1.131 / (download) - annotate - [select for diffs], Fri Jan 2 18:52:17 2004 UTC (9 years, 4 months ago) by cl
Branch: MAIN
Changes since 1.130: +12 -9 lines
Diff to previous 1.130 (colored)

kernel part of no-syscall upcall stack return:  libpthread registers
an offset between ss_sp and struct sa_stackinfo_t (located in struct
__pthread_st) when calling sa_register.  The kernel increments the
sast_gen counter in struct sastack when an upcall stack is used.
libpthread increments the sasi_stackgen counter in struct
sa_stackinfo_t when an upcall stack is freed.  The kernel compares the
two counters to decide if a stack is free or in use.

- add struct sa_stackinfo_t with sasi_stackgen to count stack use in
  userland
- add sast_gen to struct sastack to count stack use in kernel
- add SA_FLAG_STACKINFO to enable the stackinfo_offset argument in the
  sa_register syscall
- add sa_stackinfo_offset to struct sadata for offset between ss_sp
  and struct sa_stackinfo_t
- add ssize_t stackinfo_offset argument to sa_register, initialize
  struct sadata's sa_stackinfo_offset from it if SA_FLAG_STACKINFO is
  set
- add sa_getstack, sa_getstack0, sa_stackused and sa_setstackfree
  functions to find/use/free upcall stacks and use these where
  appropriate
- don't record stack for upcall in sa_upcall0
- pass sau to sa_switchcall instead of l2 (l2 = curlwp in sa_switchcall)
- add sa_vp_blocker to struct sadata to pass recently blocked lwp to
  sa_switchcall
- delay finding a stack for blocked upcalls to sa_switchcall
- add sa_stacknext to struct sadata pointing to next most likely free
  upcall stack; also g/c sa_stackslist in struct sadata and sast_list
  in struct sastack
- add L_SA_WOKEN flag: LWP is on sa_woken queue
- add L_SA_RECYCLE flag: LWP should be recycled in sa_setwoken
- replace l_upcallstack with L_SA_WOKEN/L_SA_RECYCLE/L_SA_BLOCKING
  flags
- g/c now unused sast_blocker in struct sastack
- make sa_switchcall, sa_upcall0 and sa_upcall_getstate static in
  kern_sa.c
- call sa_upcall_userret only once in userret
- split sa_makeupcalls out of sa_upcall_userret and use to process
  the sa_upcalls queue
- on process exit: mark LWPs sleeping in saunblock interruptible; also
  there are no LWPs sleeping on l->l_upcallstack anymore; also clear
  sa_wokenq_head to prevent unblocked upcalls

additional changes:
- cleanup timerupcall sa_vp == curlwp check
- add check in sa_yield if we didn't block on our way here and we
  wouldn't any longer be the LWP on the VP
- invalidate sa_vp_ofaultaddr after resolving pagefault

Revision 1.130 / (download) - annotate - [select for diffs], Sat Dec 6 04:16:33 2003 UTC (9 years, 5 months ago) by atatat
Branch: MAIN
Changes since 1.129: +14 -2 lines
Diff to previous 1.129 (colored)

The missing pieces of PROC_PID_STOPEXIT/P_STOPEXIT, a sysctl tweakable
flag that makes a process stop as it exits.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Nov 17 22:52:09 2003 UTC (9 years, 6 months ago) by cl
Branch: MAIN
Changes since 1.128: +5 -9 lines
Diff to previous 1.128 (colored)

- use list to keep track of free stacks.
- use splay tree for the pagefault check if the thread was running on
  an upcall stack.

=> removes the limitation that all upcall stacks need to be
   adjoining and that all upcall stacks have to be loaded with the
   1st sys_sa_stacks call.
=> enables keeping information associated with a stack in the kernel
   which makes it simpler to find out which LWP is using a stack.
=> allows increasing the SA_MAXNUMSTACKS without having to
   allocate an array of that size.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (9 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.127: +76 -47 lines
Diff to previous 1.127 (colored)

- Count number of zombies and stopped children and requeue them at the top
  of the sibling list so that find_stopped_child can be optimised to avoid
  traversing the entire sibling list - helps when a process has a lot of
  children.
- Modify locking in pfind() and pgfind() to that the caller can rely on the
  result being valid, allow caller to request that zombies be findable.
- Rename pfind() to p_find() to ensure we break binary compatibility.
- Remove svr4_pfind since p_find willnow do the job.
- Modify some of the SMP locking of the proc lists - signals are still stuffed.

Welcome to 1.6ZF

Revision 1.127 / (download) - annotate - [select for diffs], Thu Nov 6 09:30:13 2003 UTC (9 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.126: +16 -7 lines
Diff to previous 1.126 (colored)

Ensure that the controlling tty is unlinked from the session and pgrp.
Due to the way the console is handled, neither the revoke() nor vrele()
is guaranteed to be seen by the real, underlying tty.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Nov 6 09:16:22 2003 UTC (9 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.125: +12 -16 lines
Diff to previous 1.125 (colored)

Remove a pile of redundant (caddr_t) casts.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Nov 3 22:34:51 2003 UTC (9 years, 6 months ago) by cl
Branch: MAIN
Changes since 1.124: +2 -8 lines
Diff to previous 1.124 (colored)

Reimplement VP donation such that multiple unblocked upcalls can be
combined.  Also prepare for adding VP repossession later.

- kern_sa.c: sa_yield/sa_switch: detect if there are pending unblocked
  upcalls.
- kern_sa.c: sa_unblock_userret/sa_setwoken: queue LWPs about to invoke
  an unblocked upcall on the sa_wokenq.  put queued LWPs in a state where
  they can be put in the cache.  notify LWP on the VP about pending
  upcalls.
- kern_sa.c: sa_upcall_userret: check sa_wokenq for pending upcalls,
  generate unblocked upcalls with multiple event sas
- kern_sa.c: sa_vp_repossess/sa_vp_donate: g/c, restore original
  sa_vp_repossess

Revision 1.124 / (download) - annotate - [select for diffs], Tue Sep 16 13:46:24 2003 UTC (9 years, 8 months ago) by cl
Branch: MAIN
Changes since 1.123: +5 -2 lines
Diff to previous 1.123 (colored)

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

Revision 1.123 / (download) - annotate - [select for diffs], Sat Sep 13 15:32:40 2003 UTC (9 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.122: +36 -4 lines
Diff to previous 1.122 (colored)

provide siginfo_t in for SIGCHLD

Revision 1.122 / (download) - annotate - [select for diffs], Thu Sep 11 01:32:09 2003 UTC (9 years, 8 months ago) by cl
Branch: MAIN
Changes since 1.121: +2 -5 lines
Diff to previous 1.121 (colored)

KNF and use f instead of s to temporarily save l_flag

Revision 1.121 / (download) - annotate - [select for diffs], Wed Aug 20 14:04:00 2003 UTC (9 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

use LSDEAD instead of SDEAD for lwp state.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Aug 20 13:50:53 2003 UTC (9 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

fix indent.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:44 2003 UTC (9 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.118: +3 -7 lines
Diff to previous 1.118 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Jul 17 18:16:58 2003 UTC (9 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.117: +15 -3 lines
Diff to previous 1.117 (colored)

Changes from Stephan Uphoff to patch problems with LWPs blocking when they
shouldn't, and MP.

Revision 1.117 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:20 2003 UTC (9 years, 10 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:53 2003 UTC (9 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.115 / (download) - annotate - [select for diffs], Wed Mar 19 11:36:33 2003 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.114: +55 -47 lines
Diff to previous 1.114 (colored)

Alternative pid/proc allocater, removes all searches associated with pid
lookup and allocation, and any dependency on NPROC or MAXUSERS.
NO_PID changed to -1 (and renamed NO_PGID) to remove artificial limit
on PID_MAX.
As discussed on tech-kern.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Mar 12 15:26:33 2003 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.113: +9 -9 lines
Diff to previous 1.113 (colored)

Need to call calcru while l->l_stat == LSONPROC

Revision 1.113 / (download) - annotate - [select for diffs], Wed Mar 5 11:40:55 2003 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.112: +13 -11 lines
Diff to previous 1.112 (colored)

Get processes execution time before the LWPs state is changed

Revision 1.112 / (download) - annotate - [select for diffs], Sat Feb 22 01:00:14 2003 UTC (10 years, 3 months ago) by nathanw
Branch: MAIN
Changes since 1.111: +4 -3 lines
Diff to previous 1.111 (colored)

Set P_WEXIT earlier; specifically, before a pool_get(, PR_WAITOK) that
could sleep.

Pointed out by enami.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Feb 21 16:32:19 2003 UTC (10 years, 3 months ago) by skrll
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored)

typo in comment.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Feb 17 23:45:47 2003 UTC (10 years, 3 months ago) by nathanw
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

Test p->p_sa instead of p->p_flag & P_SA, as the latter may have been
cleared by sigexit().

Revision 1.109 / (download) - annotate - [select for diffs], Fri Feb 14 10:11:57 2003 UTC (10 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.108: +171 -119 lines
Diff to previous 1.108 (colored)

Split sys_wait4 so that code isn't duplicated in compat tree.
(approved by christos)

Revision 1.108 / (download) - annotate - [select for diffs], Mon Jan 27 20:30:32 2003 UTC (10 years, 3 months ago) by nathanw
Branch: MAIN
Changes since 1.107: +6 -4 lines
Diff to previous 1.107 (colored)

Call exit_lwps() from exit1() if there is more than one LWP (as
recorded by p_nlwps) *or* if the process was a SA process. Since
cached SA LWPs aren't counted in p_nlwps, it was possible for
them to not be cleaned up and remain on the alllwp list, pointing to a
dead proc.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:26 2003 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.106: +195 -42 lines
Diff to previous 1.106 (colored)

Merge the nathanw_sa branch.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Nov 30 09:59:22 2002 UTC (10 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

fix typo in comment. pointed out by David Sainty

Revision 1.105 / (download) - annotate - [select for diffs], Sat Nov 30 09:54:43 2002 UTC (10 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.104: +4 -3 lines
Diff to previous 1.104 (colored)

fix bug in previous - if child was traced and p_opptr == p_pptr,
need to reparent the process to initproc, so that child wouldn't
have its p_pptr pointer still pointing on the exited parent

pointed out by Dave Sainty in private mail (the patch in kern/14443
didn't have this bug)

Revision 1.104 / (download) - annotate - [select for diffs], Thu Nov 28 21:41:29 2002 UTC (10 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.103: +15 -5 lines
Diff to previous 1.103 (colored)

exit1(): make sure that, if orphaned child is being traced, it's
reparented back to original parent before it's killed.
This makes the original parent aware that the child has exited if
the debugger failed to wait() on the debugged zombie before exiting.
Since we clear tracing flags before killing the child, the reparenting
logic in wait4() wouldn't be triggered, so it's necessary to do it here.

Problem reported and fix provided in kern/14443 by David Sainty.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:16 2002 UTC (10 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.102: +7 -2 lines
Diff to previous 1.102 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.102 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:41 2002 UTC (10 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.101: +2 -3 lines
Diff to previous 1.101 (colored)

Don't include <sys/map.h>.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:32 2002 UTC (10 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.100: +6 -6 lines
Diff to previous 1.100 (colored)

Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.100 / (download) - annotate - [select for diffs], Wed Aug 28 07:16:36 2002 UTC (10 years, 8 months ago) by gmcgarry
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.99: +7 -2 lines
Diff to previous 1.99 (colored)

MI kernel support for user-level Restartable Atomic Sequences (RAS).

Revision 1.99 / (download) - annotate - [select for diffs], Tue Aug 13 05:42:27 2002 UTC (10 years, 9 months ago) by manu
Branch: MAIN
Changes since 1.98: +8 -8 lines
Diff to previous 1.98 (colored)

In exit1(), moved the call to the emulation exit hook to a place where it is
safet to sleep.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Aug 7 11:13:41 2002 UTC (10 years, 9 months ago) by briggs
Branch: MAIN
Changes since 1.97: +4 -2 lines
Diff to previous 1.97 (colored)

Only include sys/pmc.h if PERFCTRS is defined.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Aug 7 05:16:24 2002 UTC (10 years, 9 months ago) by briggs
Branch: MAIN
Changes since 1.96: +15 -2 lines
Diff to previous 1.96 (colored)

Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Aug 2 22:45:57 2002 UTC (10 years, 9 months ago) by manu
Branch: MAIN
Changes since 1.95: +8 -8 lines
Diff to previous 1.95 (colored)

Move the call up exit hooks before curproc = NULL so that we can
use lockmgr in exit hooks.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Jul 25 20:04:02 2002 UTC (10 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.94: +26 -6 lines
Diff to previous 1.94 (colored)

Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.

Reviewed by Christos Zoulas.

Revision 1.94 / (download) - annotate - [select for diffs], Mon Jun 17 16:22:50 2002 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.93: +8 -2 lines
Diff to previous 1.93 (colored)

Niels Provos systrace work, ported to NetBSD by kittenz and reworked...

Revision 1.93 / (download) - annotate - [select for diffs], Sun Mar 17 23:41:30 2002 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.92: +4 -12 lines
Diff to previous 1.92 (colored)

oops, forgot to commit the caller of exithook...

Revision 1.92 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:08 2001 UTC (11 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, newlock-base, ifpoll-base, ifpoll
Branch point for: newlock
Changes since 1.91: +4 -1 lines
Diff to previous 1.91 (colored)

add RCSIDs

Revision 1.91 / (download) - annotate - [select for diffs], Wed Jul 18 19:10:27 2001 UTC (11 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, thorpej-devvp
Changes since 1.90: +4 -3 lines
Diff to previous 1.90 (colored)

Add `WALLSIG' which causes wait4(2) to wait for all processes, regardless
of exit signal.  Add Linux-compatible aliases __WCLONE (for WALTSIG) and
__WALL (for WALLSIG), for compatibility with the Linux clone(2) API.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Mar 5 20:38:21 2001 UTC (12 years, 2 months ago) by fvdl
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Changes since 1.89: +5 -1 lines
Diff to previous 1.89 (colored)

Avoid spinning forever when hardclock() wants to grab the kernel lock
held by the reaper. From Bill Sommerfeld.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Feb 26 21:09:57 2001 UTC (12 years, 2 months ago) by lukem
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.88: +11 -12 lines
Diff to previous 1.88 (colored)

minor KNF

Revision 1.88 / (download) - annotate - [select for diffs], Sat Feb 10 05:05:27 2001 UTC (12 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.87: +1 -20 lines
Diff to previous 1.87 (colored)

Don't uvm_deallocate() the address space in exit1().  The address
space is already torn down in uvmspace_free() when the vmspace
refrence count reaches 0.  Move the shmexit() call into uvmspace_free().

Note that there is a beneficial side-effect of deferring the unmap
to uvmspace_free() -- on systems where TLB invalidations are
particularly expensive, the unmapping of the address space won't
have to cause TLB invalidations; uvmspace_free() is going to be
run in a context other than the exiting process's, so the "pmap is
active" test will evaluate to FALSE in the pmap module.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Dec 22 22:59:00 2000 UTC (12 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored)

split off thread specific stuff from struct sigacts to struct sigctx, leaving
    only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

Revision 1.86 / (download) - annotate - [select for diffs], Tue Nov 7 12:41:52 2000 UTC (12 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.85: +7 -1 lines
Diff to previous 1.85 (colored)

add void *p_emuldata into struct proc - this can be used to hold per-process
	emulation-specific data
add process exit, exec and fork function hooks into struct emul:
* e_proc_fork() - called in fork1() after the new forked process is setup
* e_proc_exec() - called in sys_execve() after the executed process is setup
* e_proc_exit() - called in exit1() after all the other process cleanups are
  done, right before machine-dependant switch to new context; also called
  for "old" emulation from sys_execve() if emulation of executed program and
  the original process is different

This was discussed on tech-kern.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Aug 22 17:28:28 2000 UTC (12 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.84: +6 -2 lines
Diff to previous 1.84 (colored)

Define the MI parts of the "big kernel lock" perimeter.  From
Bill Sommerfeld.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Aug 12 22:41:55 2000 UTC (12 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Don't bother with a trampoline to start the pagedaemon and
reaper threads.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Aug 12 22:26:01 2000 UTC (12 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

In reaper(), use ltsleep() instead of simple_unlock()/tsleep().

Revision 1.82 / (download) - annotate - [select for diffs], Tue Aug 1 04:57:30 2000 UTC (12 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.81: +7 -18 lines
Diff to previous 1.81 (colored)

ANSI'ify.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:18 2000 UTC (12 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.80: +1 -3 lines
Diff to previous 1.80 (colored)

remove include of <vm/vm.h>

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:14 2000 UTC (12 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.79: +1 -2 lines
Diff to previous 1.79 (colored)

remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.79 / (download) - annotate - [select for diffs], Sat May 27 00:11:12 2000 UTC (13 years ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Remove a gratuitous use of curproc

Revision 1.78 / (download) - annotate - [select for diffs], Mon May 8 19:58:17 2000 UTC (13 years ago) by thorpej
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

__predict_false() the test for init exiting.

Revision 1.77 / (download) - annotate - [select for diffs], Mon May 8 19:06:36 2000 UTC (13 years ago) by thorpej
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

Don't reset file size limit to infinity on exit.  Instead, temporarily
raise the limit to infinity when writing out the accounting file.

From Artur Grabowski <art@stacken.kth.se>.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:11 2000 UTC (13 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.75: +11 -11 lines
Diff to previous 1.75 (colored)

Get rid of register declarations.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Mar 23 06:30:11 2000 UTC (13 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Sep 28 14:47:03 1999 UTC (13 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.73: +2 -3 lines
Diff to previous 1.73 (colored)

Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:31 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.72: +8 -2 lines
Diff to previous 1.72 (colored)

Add a read/write lock to the proclists and PID hash table.  Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Jul 22 18:13:37 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.71: +31 -12 lines
Diff to previous 1.71 (colored)

Rework the process exit path, in preparation for making process exit
and PID allocation MP-safe.  A new process state is added: SDEAD.  This
state indicates that a process is dead, but not yet a zombie (has not
yet been processed by the process reaper).

SDEAD processes exist on both the zombproc list (via p_list) and deadproc
(via p_hash; the proc has been removed from the pidhash earlier in the exit
path).  When the reaper deals with a process, it changes the state to
SZOMB, so that wait4 can process it.

Add a P_ZOMBIE() macro, which treats a proc in SZOMB or SDEAD as a zombie,
and update various parts of the kernel to reflect the new state.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jul 20 21:54:05 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +9 -7 lines
Diff to previous 1.70 (colored)

Move the call of cpu_wait() out of the wait4() functions, and into the
body of reaper(), right before the call to uvm_exit().  cpu_wait() must
be done before uvm_exit() because the resources it frees might be located
in the PCB.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Jul 15 23:18:43 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +9 -5 lines
Diff to previous 1.69 (colored)

A few things to make the Linux clone(2) emulation work a bit better:
- When the exit signal is specified to be 0, don't just assume they
  meant SIGCHLD.  In the Linux world, this appears to mean "don't deliver
  an exit signal at all".
- Simplify P_EXITSIG(); don't check against initproc here, just change
  the exit signal to SIGCHLD if reparenting to initproc.

A very simple clone(2) test program now works, and the MpegTV package
starts, but doesn't run properly yet (I believe there is a separate
bug which keeps it from working properly).

Revision 1.69 / (download) - annotate - [select for diffs], Thu May 13 17:28:30 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Fix a (currently) harmless brian-o in last.

Revision 1.68 / (download) - annotate - [select for diffs], Thu May 13 00:59:04 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.67: +16 -7 lines
Diff to previous 1.67 (colored)

Allow an alternate exit signal (i.e. not SIGCHLD) to be delivered to the
parent, specified at fork time.  Specify a new flag to wait4(2), WALTSIG,
to wait for processes which use an alternate exit signal.

This is required for clone(2).

Revision 1.67 / (download) - annotate - [select for diffs], Fri Apr 30 21:23:49 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.66: +6 -1 lines
Diff to previous 1.66 (colored)

Pull signal actions out of struct user, make them a separate proc
substructure, and allow them to be shared.

Required for clone(2).

Revision 1.66 / (download) - annotate - [select for diffs], Fri Apr 30 20:54:04 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

Oops, forgot to commit this one.  Free the cwdinfo on exit.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:22 1999 UTC (14 years, 2 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.64: +1 -14 lines
Diff to previous 1.64 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Feb 23 02:57:18 1999 UTC (14 years, 3 months ago) by ross
Branch: MAIN
Changes since 1.63: +3 -6 lines
Diff to previous 1.63 (colored)

Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(),
(inlined) so scheduler functionality can be kept in a single .h/.c set.
Also, the wait hook has changed the way it clips the scheduler history.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jan 23 22:23:19 1999 UTC (14 years, 4 months ago) by sommerfe
Branch: MAIN
Changes since 1.62: +6 -7 lines
Diff to previous 1.62 (colored)

Tweak to earlier fix to p_estcpu:
	- no longer conditionalized
	- when traced, charge time to real parent, not debugger
	- make it clear for future rototillers that p_estcpu should be moved
	  to the "copy" region of struct proc.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jan 23 08:25:36 1999 UTC (14 years, 4 months ago) by ross
Branch: MAIN
Changes since 1.61: +7 -1 lines
Diff to previous 1.61 (colored)

Fix the recently infamous "sucky performance" problem by charging wait(2)'ing
parents for children's p_estcpu. I think this problem has always been there.
It's particularly noticable with X because the server builds up non-trivial
CPU, and hence, non-trivial p_estcpu scheduler penalty. The repeatedly
forked children were always starting from scratch and receiving a scheduler
preference.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Nov 11 22:37:13 1998 UTC (14 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.60: +1 -7 lines
Diff to previous 1.60 (colored)

Remove some code accidentally readded when Christos implement P_NOCLDWAIT.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Oct 19 22:19:26 1998 UTC (14 years, 7 months ago) by tron
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Sep 18 18:48:22 1998 UTC (14 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.58: +24 -1 lines
Diff to previous 1.58 (colored)

Add NOCLDWAIT (from FreeBSD)

Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 12 17:20:02 1998 UTC (14 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.57: +7 -7 lines
Diff to previous 1.57 (colored)

Make copyrights consistent; fix weird/trailing spaces add missing (c) etc.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:10 1998 UTC (14 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.56: +4 -3 lines
Diff to previous 1.56 (colored)

Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Sep 8 23:57:58 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +108 -17 lines
Diff to previous 1.55 (colored)

Implement a new kernel thread, the "reaper", which performs the task
of freeing the VM resources once a process has exited.  A valid thread
must do this work, as doing so may block in a multi-processor environment.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Sep 1 01:02:33 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +3 -4 lines
Diff to previous 1.54 (colored)

Use the pool allocator and the "nointr" pool page allocator for rusage
structures.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Aug 31 23:20:16 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Aug 2 04:41:32 1998 UTC (14 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (colored)

Use a pool for proc structures.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:49 1998 UTC (14 years, 9 months ago) by perry
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jun 25 21:17:16 1998 UTC (14 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (colored)

defopt KTRACE

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 2 18:33:20 1998 UTC (15 years ago) by christos
Branch: MAIN
Changes since 1.49: +3 -4 lines
Diff to previous 1.49 (colored)

New fktrace syscall from Darren Reed [with fixes from me]

Revision 1.49 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:28 1998 UTC (15 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Merge with Lite2 + local changes

Revision 1.48 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:28 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.47: +3 -1 lines
Diff to previous 1.47 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:49 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.46: +11 -1 lines
Diff to previous 1.46 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jan 3 02:48:43 1998 UTC (15 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

Don't call shmexit() if the vmspace ref count is not 1.  Update for new
argument to shmexit().

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 28 13:17:05 1997 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-signal-base, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Branch point for: thorpej-signal, netbsd-1-3
Changes since 1.44: +15 -9 lines
Diff to previous 1.44 (colored)

Delay turning off P_TRACED until the process is actually waited on.  It can't
have any signals delivered while exiting, so this should be okay.  Change the
test for a traced process in wait4() to exclude a process that was started by
the debugger; in this case, only one SIGCHLD should be delivered.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 28 04:49:27 1997 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

Reinstate P_FSTRACE, with different semantics:
* Never send a SIGCHLD to the parent if P_FSTRACE is set.
* Do not permit mixing ptrace(2) and procfs; only permit using the one that
  was attached.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Apr 28 02:51:41 1997 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.42: +1 -6 lines
Diff to previous 1.42 (colored)

Remove remnants of P_FSTRACE, which is no longer used.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Apr 23 18:59:53 1997 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.41: +1 -5 lines
Diff to previous 1.41 (colored)

Nuke the old COMPAT_09 truncation of UIDs, GIDs, process and process group IDs.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Feb 7 05:33:09 1997 UTC (16 years, 3 months ago) by mikel
Branch: MAIN
CVS Tags: mrg-vm-swap, is-newarp-before-merge, is-newarp-base
Branch point for: is-newarp
Changes since 1.40: +2 -3 lines
Diff to previous 1.40 (colored)

check options argument to wait{3,4,pid}(); from Klaus Klein in PR 3182.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 17 16:31:54 1996 UTC (16 years, 7 months ago) by perry
Branch: MAIN
CVS Tags: thorpej-setroot
Changes since 1.39: +2 -5 lines
Diff to previous 1.39 (colored)

removed #ifdef tahoe

Revision 1.39 / (download) - annotate - [select for diffs], Mon Apr 22 01:38:25 1996 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.38: +1 -2 lines
Diff to previous 1.38 (colored)

remove include of <sys/cpu.h>

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 9 18:59:29 1996 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.37: +8 -3 lines
Diff to previous 1.37 (colored)

More proto fixes

Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 9 01:19:21 1996 UTC (17 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.36: +9 -5 lines
Diff to previous 1.36 (colored)

If parent is in ppwait, wake it up early to prevent deadlock.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Feb 4 02:15:25 1996 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.35: +11 -8 lines
Diff to previous 1.35 (colored)

First pass at prototyping

Revision 1.35 / (download) - annotate - [select for diffs], Sun Dec 24 11:23:33 1995 UTC (17 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.34: +9 -9 lines
Diff to previous 1.34 (colored)

Remove the process from zombproc and its parent's child list before freeing
its resources.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Dec 9 04:09:32 1995 UTC (17 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)

Add a limfree(), and use it.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:13 1995 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored)

Prefix names of system call implementation functions with `sys_'.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Sep 27 20:26:51 1995 UTC (17 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Fix typo in declaration of exit(), pointed out by Chris Demetriou.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 19 21:44:59 1995 UTC (17 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +16 -13 lines
Diff to previous 1.30 (colored)

Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jun 24 20:33:59 1995 UTC (17 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.29: +4 -76 lines
Diff to previous 1.29 (colored)

Extracted all of the compat_xxx routines, and created a library [libcompat]
for them. There are a few #ifdef COMPAT_XX remaining, but they are not easy
or worth eliminating (yet).

Revision 1.29 / (download) - annotate - [select for diffs], Sat Dec 24 15:07:26 1994 UTC (18 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

various cleanups for -Wall.  some inspired by James Jegers.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 30 21:47:39 1994 UTC (18 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 20 22:54:35 1994 UTC (18 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +2 -4 lines
Diff to previous 1.26 (colored)

Minor change; use proc_reparent().

Revision 1.26 / (download) - annotate - [select for diffs], Thu Oct 20 04:22:45 1994 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.25: +64 -50 lines
Diff to previous 1.25 (colored)

update for new syscall args description mechanism

Revision 1.25 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:33 1994 UTC (18 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +15 -54 lines
Diff to previous 1.24 (colored)

Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:26 1994 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.23: +507 -1 lines
Diff to previous 1.23 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 19 05:57:44 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22 (colored)

update to lite

Revision 1.22 / (download) - annotate - [select for diffs], Tue May 17 08:03:05 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)

forgot a cast, and killed phil!

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 13 09:29:06 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

SHUT UP!

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 5 22:28:44 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored)

a conditional p_regs!

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 5 08:46:53 1994 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored)

Remove now-bogus cast.

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 5 05:38:07 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored)

lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 4 03:41:52 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (colored)

Rename a lot of process flags.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Apr 29 04:41:30 1994 UTC (19 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored)

kill syscall name aliases. no user-visible changes

Revision 1.15 / (download) - annotate - [select for diffs], Fri Feb 11 03:09:17 1994 UTC (19 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

Mike Karels' solution to Andrew Herbert <andrew@werple.apana.org.au>'s
kern_exit race condition problem.  this is a hack:
	don't vrele() or vgoneall() if we don't have the vnode
	any more.  no vgoneall() is necessary, because if the refcnt
	is zero, there's nobody to take it away from!
a possible "real" long term solution would be to change the extra ref
into a bit in the vnode's flags, and DTRT in the places where the last
ref is killed.  That has some problems, too.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 20 21:22:47 1994 UTC (19 years, 4 months ago) by ws
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

Make procfs really work for debugging.
Implement not & notepg files in procfs.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jan 4 11:30:26 1994 UTC (19 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

field name change

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 22 13:42:27 1993 UTC (19 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

various bug fixes from BSDI, via jsp.  Kill some iffy fixes
by wfj (and replace them with better ones from BSDI).  add support
for p_vnode, and add proc_reparent() function, from jsp.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 18 04:20:31 1993 UTC (19 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

Canonicalize all #includes.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Nov 14 13:22:55 1993 UTC (19 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.9 / (download) - annotate - [select for diffs], Wed Oct 20 23:04:33 1993 UTC (19 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

ACCOUNTING define doesn't exist any more...

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 9 22:03:59 1993 UTC (19 years, 8 months ago) by phil
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

These changes are due to a mismatch with user functions prototyped as
func(short) and the fact the the kernel uses full ints.  This caused
problems on the pc532 port.  These fixes take the good 16 bits passed
by the user program and converts them into the correct form for the
kernel.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 13 22:13:20 1993 UTC (19 years, 10 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Branch point for: magnum
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 4 23:30:35 1993 UTC (19 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

change exit() to kexit(), so prototypes are "safe" with stdio.h, etc.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:34 1993 UTC (19 years, 11 months ago) by andrew
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.4 / (download) - annotate - [select for diffs], Sat May 22 11:41:36 1993 UTC (20 years ago) by cgd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.3 / (download) - annotate - [select for diffs], Tue May 18 18:19:15 1993 UTC (20 years ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.2 / (download) - annotate - [select for diffs], Sun May 2 09:23:15 1993 UTC (20 years ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

add barebones accounting, enabled w/"options ACCOUNTING", via /dev/acct

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (20 years, 2 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>