The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.201 / (download) - annotate - [select for diffs], Sat Oct 5 12:57:40 2019 UTC (6 weeks, 5 days ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119, HEAD
Changes since 1.200: +5 -2 lines
Diff to previous 1.200 (colored)

Check for valid timespec in clock_settime1()

An alternative approach would be to check the valie in settime1(), but
it would result in multiple checks for valid tv_nsec, as there are
settime1() users that need to check the ranges earlier.

Reported-by: syzbot+96e5ce2c2c704d96c2f0@syzkaller.appspotmail.com

Revision 1.200 / (download) - annotate - [select for diffs], Fri Sep 20 14:12:57 2019 UTC (2 months ago) by kamil
Branch: MAIN
Changes since 1.199: +5 -2 lines
Diff to previous 1.199 (colored)

Validate usec ranges in settimeofday1()

Revision 1.199 / (download) - annotate - [select for diffs], Wed Aug 7 07:22:12 2019 UTC (3 months, 2 weeks ago) by mrg
Branch: MAIN
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored)

mark a variable __diagused to fix this problem affecting many builds:

kern/kern_time.c:1413:6: error: variable 'error' set but not used [-Werror=unused-but-set-variable]

Revision 1.198 / (download) - annotate - [select for diffs], Tue Aug 6 15:47:55 2019 UTC (3 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.197: +71 -10 lines
Diff to previous 1.197 (colored)

Fix race in timer destruction.

Anything we confirmed about the world before callout_halt may cease
to be true afterward, so make sure to start over in that case.

Add some comments explaining what's going on.

Reported-by: syzbot+d58da99969f58c1a024a@syzkaller.appspotmail.com

Revision 1.197 / (download) - annotate - [select for diffs], Sun Mar 10 14:45:53 2019 UTC (8 months, 1 week ago) by kre
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.196: +4 -4 lines
Diff to previous 1.196 (colored)

Fix the code that deals with very long sleeps (> 248 days) which
go beyond the maximum that the callout mechanism can handle.
[See the comments in tvtohz() in subr_sleep.c for the details.]

When that happens the timeout is clamped to MAX_INT (ticks), and the
code in nanosleep1() looped (or tried to) repeating the sleep (aka
kpause()) until the requested end time for the sleep was reached.

Unfortunately, the code assumed that kpause() would return 0 when
it returned after the timeout expired.   But it doesn't, it returns
EWOULDBLOCK instead (why is incomprehensible to me, but I assume
there is a reason.)   [That comes from sleepq_block() which returns
EWOULDBLOCK when callout_halt() indicates that the callout had fired,
which is exactly what has happened when the time has elapsed.]

There was already code to deal with that EWOULDBLOCK and return 0
instead of an error in that case - but it was placed after the
error code was tested against 0 for the purposes of the loop.

Simply move the EWOULDBLOCK->0 mapping earlier, so the code which
is expecting "error == 0" to mean "nothing went wrong" actually
gets to see that happen, and the loop can actually loop.

(Someday the loop should probably be rewritten as a loop, instead of
as a bunch of code followed by a "goto again"!)

Revision 1.196 / (download) - annotate - [select for diffs], Sun Feb 24 07:23:11 2019 UTC (8 months, 3 weeks ago) by mlelstv
Branch: MAIN
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored)

The callout is used by any nonvirtual timer including CLOCK_MONOTONIC
and needs to be initialized.

Detected by [syzkaller].

Revision 1.195 / (download) - annotate - [select for diffs], Sun Feb 10 17:13:33 2019 UTC (9 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.194: +4 -6 lines
Diff to previous 1.194 (colored)

Introduce PR_ZERO to avoid open-coding memset()s everywhere. OK riastradh@.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Jan 31 20:09:05 2019 UTC (9 months, 2 weeks ago) by maxv
Branch: MAIN
Changes since 1.193: +3 -2 lines
Diff to previous 1.193 (colored)

Fix kernel info leaks.

Revision 1.193 / (download) - annotate - [select for diffs], Thu Nov 29 17:40:12 2018 UTC (11 months, 3 weeks ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.192: +3 -2 lines
Diff to previous 1.192 (colored)

Improve my kern_time.c::rev1.192, systematically clear the buffers we get
from 'ptimer_pool' to prevent more leaks.

Revision 1.192 / (download) - annotate - [select for diffs], Wed Nov 28 15:10:40 2018 UTC (11 months, 3 weeks ago) by maxv
Branch: MAIN
Changes since 1.191: +3 -2 lines
Diff to previous 1.191 (colored)

Fix kernel info leak.

	+ Possible info leak: [len=32, leaked=16]
	| #0 0xffffffff80baf3a7 in kleak_copyout
	| #1 0xffffffff80b940f8 in sys___timer_settime50
	| #2 0xffffffff80259c42 in syscall

Revision 1.191 / (download) - annotate - [select for diffs], Tue Nov 13 07:16:33 2018 UTC (12 months, 1 week ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.190: +3 -2 lines
Diff to previous 1.190 (colored)

Fix kernel info leak. There are 2x4 bytes of padding in struct itimerval.

[  738.451860] kleak: Possible leak in copyout: [len=32, leaked=8]
[  738.481840] #0 0xffffffff80b7c42a in kleak_note <netbsd>
[  738.491821] #1 0xffffffff80b7c4aa in kleak_copyout <netbsd>
[  738.501806] #2 0xffffffff80b6154e in sys___getitimer50 <netbsd>
[  738.511778] #3 0xffffffff80b61e39 in sys___setitimer50 <netbsd>
[  738.521781] #4 0xffffffff8025ab3c in sy_call <netbsd>
[  738.521781] #5 0xffffffff8025ad6e in sy_invoke <netbsd>
[  738.531808] #6 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.190 / (download) - annotate - [select for diffs], Sun Nov 11 11:17:49 2018 UTC (12 months, 1 week ago) by maxv
Branch: MAIN
Changes since 1.189: +3 -2 lines
Diff to previous 1.189 (colored)

Fix stack info leak. There are 4 bytes of padding in struct timeval. Looks
like there are other leaks related to timeval in this file.

[  133.414352] kleak: Possible leak in copyout: [len=16, leaked=4]
[  133.414352] #0 0xffffffff80224d0a in kleak_note <netbsd>
[  133.424360] #1 0xffffffff80224d8a in kleak_copyout <netbsd>
[  133.434361] #2 0xffffffff80b5fd79 in sys___gettimeofday50 <netbsd>
[  133.434361] #3 0xffffffff8025a89c in sy_call <netbsd>
[  133.444351] #4 0xffffffff8025aace in sy_invoke <netbsd>
[  133.454365] #5 0xffffffff8025ab54 in syscall <netbsd>

Revision 1.189 / (download) - annotate - [select for diffs], Fri Nov 11 15:29:36 2016 UTC (3 years ago) by njoly
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-compat-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, pgoyette-compat, netbsd-8
Changes since 1.188: +4 -3 lines
Diff to previous 1.188 (colored)

Adjust clock_nanosleep(2) to not copyout remaining time struct if
TIMER_ABSTIME flag is set.

Ok Christos.

Revision 1.188 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:43 2016 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.187: +4 -4 lines
Diff to previous 1.187 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.187 / (download) - annotate - [select for diffs], Fri Jun 10 23:29:20 2016 UTC (3 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.186: +5 -2 lines
Diff to previous 1.186 (colored)

GSoC 2016: Charles Cui: Add timer related macros
    _POSIX_CPUTIME
    _POSIX_THREAD_CPUTIME
    _POSIX_DELAYTIMER_MAX

Revision 1.186 / (download) - annotate - [select for diffs], Sat Apr 23 23:08:26 2016 UTC (3 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.185: +33 -2 lines
Diff to previous 1.185 (colored)

Add clock_getcpuclockid2(2) as well as CLOCK_{PROCESS,THREAD}_CPUTIME_ID.

Revision 1.185 / (download) - annotate - [select for diffs], Tue Mar 8 05:02:55 2016 UTC (3 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.184: +2 -3 lines
Diff to previous 1.184 (colored)

- GC pts_fired, and fix the comment about MAX_TIMERS
- Bump MAX_TIMERS to 36 so that we have 32 POSIX user timers which is the
  minimum required.

Revision 1.184 / (download) - annotate - [select for diffs], Thu Mar 3 01:39:17 2016 UTC (3 years, 8 months ago) by uwe
Branch: MAIN
Changes since 1.183: +10 -4 lines
Diff to previous 1.183 (colored)

Don't leak garabage from the kernel stack on sleep(0) and equivalents.
Hat tip to perl's ext/POSIX/t/wrappers.t

Revision 1.183 / (download) - annotate - [select for diffs], Fri Feb 26 17:08:58 2016 UTC (3 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.182: +6 -6 lines
Diff to previous 1.182 (colored)

Make comments and code match reality; there are 4 reserved timers.

Revision 1.182 / (download) - annotate - [select for diffs], Tue Oct 6 15:03:34 2015 UTC (4 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.181: +2 -3 lines
Diff to previous 1.181 (colored)

CID/1325753: remove extra return.

Revision 1.181 / (download) - annotate - [select for diffs], Fri Oct 2 19:47:08 2015 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.180: +9 -5 lines
Diff to previous 1.180 (colored)

PR/50295: clock_nanotime() should not set errno, but return the error.

Revision 1.180 / (download) - annotate - [select for diffs], Fri Jul 24 13:02:52 2015 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.179: +4 -4 lines
Diff to previous 1.179 (colored)

Unused inits (harmless).

Found by Brainy.

Revision 1.179 / (download) - annotate - [select for diffs], Wed May 22 16:00:52 2013 UTC (6 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: nick-nhusb, netbsd-7-0, netbsd-7
Changes since 1.178: +8 -4 lines
Diff to previous 1.178 (colored)

Make ts2timo(9) always return the absolute start time if the start argument
is present, and handle the TIMER_ABSTIME case in nanosleep1(9).

Revision 1.178 / (download) - annotate - [select for diffs], Sun Mar 31 16:45:06 2013 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.177: +4 -6 lines
Diff to previous 1.177 (colored)

always return immediately on error, and if we passed negative seconds,
return with 0.

Revision 1.177 / (download) - annotate - [select for diffs], Fri Mar 29 10:34:12 2013 UTC (6 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.176: +2 -20 lines
Diff to previous 1.176 (colored)

Move clock_gettime1() to subr_time.c (which is included in rump kernels)

Revision 1.176 / (download) - annotate - [select for diffs], Fri Mar 29 01:08:17 2013 UTC (6 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.175: +6 -11 lines
Diff to previous 1.175 (colored)

Centralize the computation of struct timespec to the int timo.
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Oct 2 01:44:28 2012 UTC (7 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Changes since 1.174: +41 -7 lines
Diff to previous 1.174 (colored)

kernel portion of clock_nanosleep()

Revision 1.174 / (download) - annotate - [select for diffs], Thu Mar 22 17:46:07 2012 UTC (7 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored)

Misplaced parenthesis; fixes PR 44927

Revision 1.173 / (download) - annotate - [select for diffs], Mon Feb 20 01:12:42 2012 UTC (7 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored)

itimerfire: fix a regression, check if timer is already queued.

Revision 1.172 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:55 2012 UTC (7 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.171: +5 -115 lines
Diff to previous 1.171 (colored)

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

Revision 1.171 / (download) - annotate - [select for diffs], Sun Dec 18 22:30:25 2011 UTC (7 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base2
Changes since 1.170: +13 -5 lines
Diff to previous 1.170 (colored)

Fix monotonic interval timers.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Oct 27 16:12:52 2011 UTC (8 years ago) by christos
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.169: +26 -14 lines
Diff to previous 1.169 (colored)

There is no reason not to support CLOCK_MONOTONIC in {g,s}etitimer() since
the underlying implementation already supports it, so add it.

Revision 1.169 / (download) - annotate - [select for diffs], Wed Jul 27 14:35:34 2011 UTC (8 years, 3 months ago) by uebayasi
Branch: MAIN
Changes since 1.168: +2 -4 lines
Diff to previous 1.168 (colored)

These don't need uvm/uvm_extern.h.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Apr 8 10:35:37 2011 UTC (8 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.167: +40 -21 lines
Diff to previous 1.167 (colored)

implement timer_create of CLOCK_MONOTONIC

Revision 1.167 / (download) - annotate - [select for diffs], Tue Apr 5 00:27:35 2011 UTC (8 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored)

fix assertion failure in timer_intr.  CLOCK_REALTIME timers can be on
timer_queue.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Dec 17 22:08:18 2010 UTC (8 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.165: +7 -7 lines
Diff to previous 1.165 (colored)

realtimerexpire: rename a confusing variable.  no functional change.
(now_ms -> now_ns as it hold a nano second value)

Revision 1.165 / (download) - annotate - [select for diffs], Thu Apr 8 11:51:13 2010 UTC (9 years, 7 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.164: +18 -8 lines
Diff to previous 1.164 (colored)

Add a new clock_gettime1() function that holds most of the
clock_gettime syscall code (except for the copyout). Adjust all
corresponding syscalls to make use of it.

Revision 1.164 / (download) - annotate - [select for diffs], Sat Apr 3 17:20:05 2010 UTC (9 years, 7 months ago) by njoly
Branch: MAIN
Changes since 1.163: +20 -12 lines
Diff to previous 1.163 (colored)

Move most clock_getres syscall code, except for coypout call, to a new
clock_getres1() function which can be used by emulations. Adjust all
clock_getres syscalls to now make of use it.

Revision 1.163 / (download) - annotate - [select for diffs], Thu Dec 10 12:39:12 2009 UTC (9 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.162: +6 -3 lines
Diff to previous 1.162 (colored)

If a struct sigevent with SIGEV_SIGNAL is passed to timer_create(2),
check the signal number to be in the allowed range. An invalid
signal number could crash the kernel by overflowing the sigset_t
array.
More checks would be good, and SIGEV_THREAD shouldn't be dropped
silently, but this fixes at least the local DOS vulnerability.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Oct 3 20:48:42 2009 UTC (10 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.161: +28 -2 lines
Diff to previous 1.161 (colored)

Introduce time_wraps() to check if setting the time will wrap it (or
close to it). Useful for secmodels.

Replace open-coded form with it in secmodel code (securelevel, keylock).

Note: I need to find a way to make secmodel_keylock.c ~<100 lines.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Sep 13 18:45:11 2009 UTC (10 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.160: +7 -7 lines
Diff to previous 1.160 (colored)

Wipe out the last vestiges of POOL_INIT with one swift stroke.  In
most cases, use a proper constructor.  For proplib, give a local
equivalent of POOL_INIT for the kernel object implementation.  This
way the code structure can be preserved, and a local link set is
not hazardous anyway (unless proplib is split to several modules,
but that'll be the day).

tested by booting a kernel in qemu and compile-testing i386/ALL

Revision 1.160 / (download) - annotate - [select for diffs], Sun Mar 29 19:21:19 2009 UTC (10 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.159: +8 -6 lines
Diff to previous 1.159 (colored)

Move the internal poll/select related API's to use timespec instead
of timeval (rides the uvm bump).

Revision 1.159 / (download) - annotate - [select for diffs], Sat Jan 31 15:53:36 2009 UTC (10 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.158: +2 -17 lines
Diff to previous 1.158 (colored)

settime1: fix a bug i introduced when i made l_stime use monotonic time.
from Matthias Drochner on tech-kern@.  PR/40511 from Martin Husemann.

Revision 1.158 / (download) - annotate - [select for diffs], Fri Jan 30 23:11:27 2009 UTC (10 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.157: +6 -8 lines
Diff to previous 1.157 (colored)

timer_intr: hold proc_lock across the loop, otherwise the process we are
about to signal could disappear.

Revision 1.157 / (download) - annotate - [select for diffs], Sun Jan 11 15:57:29 2009 UTC (10 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.156: +4 -3 lines
Diff to previous 1.156 (colored)

- fix leaked lock, thanks ad@ for noticing.
- remove unneeded cast.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (10 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.155: +58 -63 lines
Diff to previous 1.155 (colored)

merge christos-time_t

Revision 1.155 / (download) - annotate - [select for diffs], Thu Oct 16 18:21:45 2008 UTC (11 years, 1 month ago) by wrstuden
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.154: +16 -15 lines
Diff to previous 1.154 (colored)

Adjust locking on the sadata::sa_vps list. The main time we
walk the list, we're looking for a vp to do something with. We do
this in the signal code and in the timer code. The signal code already
runs with proc::p_lock held, so it's a very natural lock to use. The
timer code, however, calls into the sa timer code with a spinlock held.
Since proc::p_lock is an adaptable mutex, we can sleep to get it. Sleeping
with a spinlock is BAD. So proc::p_lock is _not_ the right lock there,
and something like sadata::sa_mutex would be best.

Address this difficulty by noting that both uses actually just read
the list. Changing the list of VPs is rare - once one's added, it stays
until the process ends. So make the locking protocol that to write the
list you have to hold both proc::p_lock and sadata::sa_mutex (taken
in that order). Thus holding either one individually grants read access.

This removes a case where we could sleep with timer_lock, a spinlock at
IPL_SCHED (!!), while trying to get p_lock. If that ever happened, we'd
pretty much be dead. So don't do that!

This fixes a merge botch from how I handled our gaining p_lock - p_lock
should not have simply replaced p_smutex.

While here, tweak the sa_unblock_userret() code for the case
when the blessed vp is actually running (on another CPU). Make its
resched RESCHED_IMMED so we whack the CPU. Addresses a hang I've
observed in starting firefox on occasion when I see one thread running
in userland and another thread sitting in lwpublk, which means it's on
the list of threads for which we need an unblocked upcall. This list is
one on which things should NOT linger.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (11 years, 1 month ago) by wrstuden
Branch: MAIN
Changes since 1.153: +117 -6 lines
Diff to previous 1.153 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Sep 25 17:17:10 2008 UTC (11 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4
Changes since 1.152: +2 -78 lines
Diff to previous 1.152 (colored)

Split rate-checking routines into their own module for easier reuse.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Sep 23 16:44:49 2008 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3
Changes since 1.151: +10 -11 lines
Diff to previous 1.151 (colored)

fix half-assed change usec -> nsec that broke non-real timers.

Revision 1.151 / (download) - annotate - [select for diffs], Fri Aug 8 16:44:52 2008 UTC (11 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-2
Changes since 1.150: +4 -4 lines
Diff to previous 1.150 (colored)

Fix broken setitimer(). (Sverre Froyen)

Revision 1.150 / (download) - annotate - [select for diffs], Tue Jul 15 16:18:08 2008 UTC (11 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.149: +86 -88 lines
Diff to previous 1.149 (colored)

Use more timespecs internally. From Alexander Shishkin and me.
Welcome to 4.99.70, 30 more to go for 100.

Revision 1.149 / (download) - annotate - [select for diffs], Tue Jul 8 20:53:02 2008 UTC (11 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.148: +32 -16 lines
Diff to previous 1.148 (colored)

Fix to bug reported and tested by Alexander Shishkin. struct ptimer has
a union that contains either a callout [for CLOCK_REALTIME] or a flag
and a list [for other clock types]. Make sure we perform the right actions
on the right union member depending on the clock type. Otherwise this would
result in crashes.

Revision 1.148 / (download) - annotate - [select for diffs], Thu May 29 15:27:51 2008 UTC (11 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.147: +37 -20 lines
Diff to previous 1.147 (colored)

Explicitly compute the next interval using 64bit arithmetic, if the time
was either stepped backwards or the timer has overflown. This fixes
PR 26470.

Revision 1.147 / (download) - annotate - [select for diffs], Thu May 8 18:56:58 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Changes since 1.146: +3 -4 lines
Diff to previous 1.146 (colored)

- Add tc_gonebad(): allows timecounter to be flagged as bad and removed at
  the next clock tick.
- Remove time_lock, which is no longer required.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (11 years, 6 months ago) by martin
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.145: +2 -9 lines
Diff to previous 1.145 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.145 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.144: +6 -6 lines
Diff to previous 1.144 (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.144 / (download) - annotate - [select for diffs], Tue Apr 22 12:04:22 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.143: +6 -9 lines
Diff to previous 1.143 (colored)

Give callout_halt() an additional 'kmutex_t *interlock' argument. If there
is a need to block and wait for the callout to complete, and there is an
interlock, it will be dropped while waiting and reacquired before return.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Apr 21 12:56:31 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.142: +10 -7 lines
Diff to previous 1.142 (colored)

Make ntp, pmc, reboot, sysarch, time syscalls MPSAFE.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Apr 21 00:13:46 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.141: +284 -156 lines
Diff to previous 1.141 (colored)

timer fixes for PR 37093:

- Fix serious concurrency problems, making the code MT and MP safe in
  the process.
- Don't allocate memory or inspect process state from hardclock().

Revision 1.141 / (download) - annotate - [select for diffs], Mon Feb 25 12:25:03 2008 UTC (11 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, christos-time_t
Changes since 1.140: +22 -16 lines
Diff to previous 1.140 (colored)

nanosleep1: handle kpause spontaneous wakeups.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Feb 19 14:21:56 2008 UTC (11 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.139: +29 -15 lines
Diff to previous 1.139 (colored)

wrap long lines.  no functional change.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Feb 19 14:17:39 2008 UTC (11 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored)

nanosleep1: whitespace.  no functional change.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Jan 20 18:09:12 2008 UTC (11 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: mjf-devfs-base, bouyer-xeni386-nbase
Changes since 1.137: +2 -56 lines
Diff to previous 1.137 (colored)

Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.

Revision 1.137 / (download) - annotate - [select for diffs], Sat Dec 22 01:14:55 2007 UTC (11 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-base
Changes since 1.136: +3 -1 lines
Diff to previous 1.136 (colored)

use binuptime for l_stime/l_rtime.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Dec 22 00:35:32 2007 UTC (11 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.135: +2 -123 lines
Diff to previous 1.135 (colored)

reduce #ifdef __HAVE_TIMECOUNTER.

Revision 1.135 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:09 2007 UTC (11 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.134: +46 -46 lines
Diff to previous 1.134 (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.134 / (download) - annotate - [select for diffs], Sat Dec 8 13:31:56 2007 UTC (11 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.133: +4 -4 lines
Diff to previous 1.133 (colored)

Replace usage of p_cred in kauth(9) call with kauth_cred_get().

okay yamt@.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Nov 25 08:43:11 2007 UTC (12 years ago) by elad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.132: +3 -10 lines
Diff to previous 1.132 (colored)

Kill a KAUTH_REQ_SYSTEM_TIME_SYSTEM request that's no longer needed.

Revision 1.132 / (download) - annotate - [select for diffs], Sun Nov 25 00:35:27 2007 UTC (12 years ago) by elad
Branch: MAIN
Changes since 1.131: +20 -42 lines
Diff to previous 1.131 (colored)

Refactor time modification checks and place them in the secmodel code.

okay christos@

Revision 1.131 / (download) - annotate - [select for diffs], Thu Nov 15 20:12:04 2007 UTC (12 years ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.130: +15 -3 lines
Diff to previous 1.130 (colored)

Add a bit of locking around timecounter attachment / selection.

Revision 1.130 / (download) - annotate - [select for diffs], Fri Oct 19 12:16:43 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.129: +3 -3 lines
Diff to previous 1.129 (colored)

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

Revision 1.129 / (download) - annotate - [select for diffs], Mon Oct 8 20:06:19 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.128: +19 -18 lines
Diff to previous 1.128 (colored)

Merge run time accounting changes from the vmlocking branch. These make
the LWP "start time" per-thread instead of per-CPU.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Aug 9 07:36:19 2007 UTC (12 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.127: +2 -30 lines
Diff to previous 1.127 (colored)

Shuffle routines which just roll values around from kern_clock.c
and kern_time.c to subr_time.c.

Revision 1.127 / (download) - annotate - [select for diffs], Tue Aug 7 11:43:35 2007 UTC (12 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.126: +2 -4 lines
Diff to previous 1.126 (colored)

No reason not to make itimespecfix() generally available..

Revision 1.126 / (download) - annotate - [select for diffs], Tue Aug 7 11:39:18 2007 UTC (12 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.125: +2 -6 lines
Diff to previous 1.125 (colored)

Export itimespecfix() until itimerfix() dies.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:54 2007 UTC (12 years, 4 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.124: +10 -7 lines
Diff to previous 1.124 (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.124 / (download) - annotate - [select for diffs], Mon May 21 15:35:48 2007 UTC (12 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored)

rename si_sigval -> si_value to match POSIX RTS.

Revision 1.123 / (download) - annotate - [select for diffs], Sun May 13 19:51:35 2007 UTC (12 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.122: +4 -3 lines
Diff to previous 1.122 (colored)

nanosleep1() shouldn't try to get the current time into a NULL address.

Revision 1.122 / (download) - annotate - [select for diffs], Sun May 13 14:43:53 2007 UTC (12 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.121: +3 -4 lines
Diff to previous 1.121 (colored)

Instead of the #define versions of tc_getfrequency() and nanouptime(), use
the function ones in kern_kern_clock.c (adding tc_getfrequency).
Adjust includes so this builds.

Revision 1.121 / (download) - annotate - [select for diffs], Sun May 13 10:58:51 2007 UTC (12 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.120: +2 -13 lines
Diff to previous 1.120 (colored)

Add a #define for nanouptime() in the !__HAVE_TIMECOUNTERS case.

Revision 1.120 / (download) - annotate - [select for diffs], Sun May 13 10:34:25 2007 UTC (12 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.119: +28 -41 lines
Diff to previous 1.119 (colored)

Split sys_nanosleep().

Revision 1.119 / (download) - annotate - [select for diffs], Sat May 12 20:27:57 2007 UTC (12 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.118: +22 -15 lines
Diff to previous 1.118 (colored)

Change interface to settimeofday1() so that it can also be used from
compat code in order to avoid the stackgap.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:33 2007 UTC (12 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Branch point for: reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:26 2007 UTC (12 years, 8 months ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.116: +4 -4 lines
Diff to previous 1.116 (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.116 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:07 2007 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

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

TRUE -> true, FALSE -> false

Revision 1.114 / (download) - annotate - [select for diffs], Fri Feb 16 02:53:43 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.113: +9 -8 lines
Diff to previous 1.113 (colored)

Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.112: +14 -98 lines
Diff to previous 1.112 (colored)

Merge newlock2 to head.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Dec 27 12:10:09 2006 UTC (12 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.111: +2 -16 lines
Diff to previous 1.111 (colored)

remove nqnfs.

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

use KSI_INIT rather than memset.  no functional changes.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (13 years ago) by yamt
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.109: +15 -16 lines
Diff to previous 1.109 (colored)

remove some __unused from function parameters.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Oct 20 22:22:48 2006 UTC (13 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

Add an XXX to remind me why it's there when grepping. (securelevel ref)

Revision 1.108 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:17 2006 UTC (13 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.107: +16 -15 lines
Diff to previous 1.107 (colored)

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

Revision 1.107 / (download) - annotate - [select for diffs], Mon Sep 25 18:28:56 2006 UTC (13 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored)

PR/34612: Bucky Katz: SA returns from sleep do not set the signal flags
Patch applied, many thanks for the example!

Revision 1.106 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:57 2006 UTC (13 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.105: +11 -9 lines
Diff to previous 1.105 (colored)

First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)

Revision 1.105 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (13 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.104: +17 -17 lines
Diff to previous 1.104 (colored)

Use the LWP cached credentials where sane.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Jul 16 19:23:11 2006 UTC (13 years, 4 months ago) by kardel
Branch: MAIN
Changes since 1.103: +5 -1 lines
Diff to previous 1.103 (colored)

fix another t{s,v}tohz() fallout (invalid remaining time)
now passes regression/sys/kern/sleeping

Revision 1.103 / (download) - annotate - [select for diffs], Fri Jul 14 22:45:20 2006 UTC (13 years, 4 months ago) by kardel
Branch: MAIN
Changes since 1.102: +6 -4 lines
Diff to previous 1.102 (colored)

keep NetBSD boottime semantics:
- only set at boot
- only tracking delta of set-time operations
-> will keep boottime stable across ACPI sleeps
   uptime(1) will report the time since last boot

Revision 1.102 / (download) - annotate - [select for diffs], Sat Jul 8 12:10:33 2006 UTC (13 years, 4 months ago) by kardel
Branch: MAIN
Changes since 1.101: +9 -2 lines
Diff to previous 1.101 (colored)

report true clock resolution based on the frequency information
from the underlying counter in clock_getres(). For frequencies
above 1GHz report a resolution if 1 nsec.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:40 2006 UTC (13 years, 5 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.100: +213 -16 lines
Diff to previous 1.100 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.100 / (download) - annotate - [select for diffs], Thu May 18 10:09:12 2006 UTC (13 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.99: +1 -1 lines
Diff to previous 1.99 (colored)

timers_alloc: use PR_WAITOK.

Revision 1.99 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (13 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.98: +11 -7 lines
Diff to previous 1.98 (colored)

integrate kauth.

Revision 1.98 / (download) - annotate - [select for diffs], Mon Dec 5 00:16:34 2005 UTC (13 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, ktrace-lwp-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.97: +42 -31 lines
Diff to previous 1.97 (colored)

- make settime take timespec.
- avoid wrapping of time in settime (from OpenBSD)
- pass struct proc down so that we can log a detailed message.

Revision 1.97 / (download) - annotate - [select for diffs], Sat Nov 26 05:26:33 2005 UTC (13 years, 11 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-readahead-base3
Changes since 1.96: +9 -5 lines
Diff to previous 1.96 (colored)

Convert malloc/free of struct ptimers to pools.
Move the ptimer pool to kern_time.c to keep like pools together,
and it wasn't used in kern_proc.c

Revision 1.96 / (download) - annotate - [select for diffs], Fri Nov 11 07:07:42 2005 UTC (14 years ago) by simonb
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base2, yamt-readahead-base
Branch point for: yamt-readahead
Changes since 1.95: +3 -4 lines
Diff to previous 1.95 (colored)

Call nanotime() directly, instead of doing the
microtime()/TIMEVAL_TO_TIMESPEC() dance.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Oct 23 00:09:14 2005 UTC (14 years, 1 month ago) by cube
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.94: +4 -3 lines
Diff to previous 1.94 (colored)

Implement a few changes needed to properly resolve PR#30924, as
discussed in the PR.

- introduce sys/timevar.h to hold kernel-specific stuff relevant to
  sys/time.h.  Ideally, timevar.h would contain all (or almost) of the
  #ifdef _KERNEL part of time.h, but that's a pretty big and tedious
  change to make.  For now, it will contain only the prototypes I
  introduced when working on COMPAT_NETBSD32.

- split copyinout_t into copyin_t and copyout_t, it makes prototypes more
  explicit about the meaning of a given argument.  Suggested by yamt@.

- move copyinout_t definition in sys/time.h to systm.h as copyin_t and
  copyout_t

- make everything uses the new types and include the proper headers at
  the proper places.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Oct 2 17:51:27 2005 UTC (14 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: yamt-vop-base
Branch point for: yamt-vop
Changes since 1.93: +5 -7 lines
Diff to previous 1.93 (colored)

avoid calling into the pool code while holding sched_lock
since both pool_get() and pool_put() can call wakeup().
instead, allocate the struct sadata_upcall before taking
sched_lock in mi_switch() and free it after releasing sched_lock.

clean up some modularity warts by adding a callback to
struct sadata_upcall for freeing sa_arg.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Sep 23 12:10:33 2005 UTC (14 years, 2 months ago) by jmmv
Branch: MAIN
Changes since 1.92: +3 -2 lines
Diff to previous 1.92 (colored)

Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Jul 23 18:54:07 2005 UTC (14 years, 4 months ago) by cube
Branch: MAIN
Changes since 1.91: +64 -38 lines
Diff to previous 1.91 (colored)

Split sys_timer_create, sys_timer_gettime and sys_timer_settime so they
can be easily used by netbsd32 code.

XXX Meanwhile, introduce a copyinout_t type that matches the prototype of
XXX copyin(9) and copyout(9).  Its logical place would be in systm.h, near
XXX the definition of copyin, but, well, see the comment.

Revision 1.91 / (download) - annotate - [select for diffs], Mon Jul 11 19:50:42 2005 UTC (14 years, 4 months ago) by cube
Branch: MAIN
Changes since 1.90: +32 -15 lines
Diff to previous 1.90 (colored)

Split sys_getitimer and sys_setitimer to make it possible to share the
relevant code with the COMPAT_NETBSD32 version, and make the latter use
the new functions.

This fixes netbsd32_setitimer() which had drifted from the native syscall
and did not work properly anymore.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Jun 23 23:15:12 2005 UTC (14 years, 5 months ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.89: +7 -17 lines
Diff to previous 1.89 (colored)

Use ANSI function decls.  Apply some static.

Revision 1.89 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (14 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.88: +7 -8 lines
Diff to previous 1.88 (colored)

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

Revision 1.88 / (download) - annotate - [select for diffs], Wed Mar 2 11:05:34 2005 UTC (14 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

Copyright maintenance.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (14 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored)

nuke trailing whitespace

Revision 1.86 / (download) - annotate - [select for diffs], Thu Jan 6 19:26:41 2005 UTC (14 years, 10 months ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.85: +6 -3 lines
Diff to previous 1.85 (colored)

If sa_upcall() fails (which is always going to be due to resource exhaustion),
do not leak siginfo structures.

Note that in the cases of trap signals and timer events, losing this
information could be very bad; right now it will cause us to spin until the
process is SIGKILLed.

"Needs work."

Revision 1.85 / (download) - annotate - [select for diffs], Sun Nov 14 03:30:09 2004 UTC (15 years ago) by atatat
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored)

Wrap TIMEVAL_TO_TIMESPEC and TIMESPEC_TO_TIMEVAL macros in

	do { ... } while(/*CONSTCOND*/0)

so that they can be used unadorned in if/else blocks, etc.  This means
that you now *have* to put a ; at the end of the "call" to these
macros.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Apr 27 05:25:33 2004 UTC (15 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.83: +4 -4 lines
Diff to previous 1.83 (colored)

Fix "comments within comments" problem pointed out by Geoff Wing on
source-changes.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Apr 27 01:12:44 2004 UTC (15 years, 6 months ago) by kleink
Branch: MAIN
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored)

POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2].  From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).

Revision 1.82 / (download) - annotate - [select for diffs], Sun Mar 14 01:08:47 2004 UTC (15 years, 8 months ago) by cl
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, 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
Branch point for: netbsd-2-1, netbsd-2-0, netbsd-2
Changes since 1.81: +11 -8 lines
Diff to previous 1.81 (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.81 / (download) - annotate - [select for diffs], Fri Jan 2 18:52:17 2004 UTC (15 years, 10 months ago) by cl
Branch: MAIN
Changes since 1.80: +7 -13 lines
Diff to previous 1.80 (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.80 / (download) - annotate - [select for diffs], Tue Dec 2 01:34:30 2003 UTC (15 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

PR/23613: Christian Biere: Bogus bounds check in nanosleep.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Nov 13 03:09:30 2003 UTC (16 years ago) by chs
Branch: MAIN
Changes since 1.78: +4 -10 lines
Diff to previous 1.78 (colored)

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Nov 2 16:26:10 2003 UTC (16 years ago) by cl
Branch: MAIN
Changes since 1.77: +14 -19 lines
Diff to previous 1.77 (colored)

Cleanup signal delivery for SA processes:
General idea:  only consider the LWP on the VP for signal delivery, all
other LWPs are either asleep or running from waking up until repossessing
the VP.

- in kern_sig.c:kpsignal2: handle all states the LWP on the VP can be in
- in kern_sig.c:proc_stop: only try to stop the LWP on the VP.  All other
  LWPs will suspend in sa_vp_repossess() until the VP-LWP donates the VP.
  Restore original behaviour (before SA-specific hacks were added) for
  non-SA processes.
- in kern_sig.c:proc_unstop: only return the LWP on the VP
- handle sa_yield as case 0 in sa_switch instead of clearing L_SA, add an
  L_SA_YIELD flag
- replace sa_idle by L_SA_IDLE flag since it was either NULL or == sa_vp

Also don't output itimerfire overrun warning if the process is already
exiting.
Also g/c sa_woken because it's not used.
Also g/c some #if 0 code.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Oct 8 00:28:42 2003 UTC (16 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

* Shuffle some data structures so, and add a flags word to ksiginfo_t.
  Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Sep 14 06:56:22 2003 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored)

set the sigval in the setitimer case.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Sep 13 22:39:18 2003 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.74: +8 -3 lines
Diff to previous 1.74 (colored)

enable SI_TIMER notification.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Sep 9 15:16:30 2003 UTC (16 years, 2 months ago) by cl
Branch: MAIN
Changes since 1.73: +12 -5 lines
Diff to previous 1.73 (colored)

fix timerupcall breakage after SA_SIGINFO changes:
- sa_upcall only stores a pointer to the `arg'

Revision 1.73 / (download) - annotate - [select for diffs], Sat Sep 6 22:03:10 2003 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.72: +15 -12 lines
Diff to previous 1.72 (colored)

SA_SIGINFO changes.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:51 2003 UTC (16 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.71: +3 -7 lines
Diff to previous 1.71 (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.71 / (download) - annotate - [select for diffs], Thu Jul 17 18:16:59 2003 UTC (16 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.70: +22 -3 lines
Diff to previous 1.70 (colored)

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

Revision 1.70 / (download) - annotate - [select for diffs], Wed May 28 22:27:57 2003 UTC (16 years, 5 months ago) by nathanw
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.69: +9 -3 lines
Diff to previous 1.69 (colored)

Expand the test in itimerfire() to only wake up an idle SA LWP if the
process isn't stopped.

Revision 1.69 / (download) - annotate - [select for diffs], Mon May 19 03:23:37 2003 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Make ppsratecheck conform with its man page, which says, "If maxpps
is set to 0, the function will always return 0 (no packets/events
are permitted)." Before this patch, ppsratecheck returned 1 once
a second when maxpps was 0.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Apr 16 21:34:15 2003 UTC (16 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.67: +6 -2 lines
Diff to previous 1.67 (colored)

Flag that adjtime has happened, hardware RTC might be wrong

Revision 1.67 / (download) - annotate - [select for diffs], Mon Mar 10 21:49:56 2003 UTC (16 years, 8 months ago) by nathanw
Branch: MAIN
Changes since 1.66: +34 -11 lines
Diff to previous 1.66 (colored)

Change the contract for timer_settime() (the internal routine, not the
syscall sys_timer_settime()) to take an absolute value for realtime
timers. This avoids a pair of gratiuitous conversions with the
possibility that the timer's intermediate value would be 0.0, which
would signal timer_settime() to cancel the timer.

Adjust callers of timer_settime() to compensate; catch the case where
sys_timer_settime() with an absolute time value of now and a virtual
timer would also be subtracted down to a timer-cancelling 0.0.

This should fix the bug seen in libpthread's nanosleep() where certain
applications, such as xmms, would wedge with unexpired userlevel
alarms.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Feb 4 15:50:06 2003 UTC (16 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

itimerfire(): fix bug in previous - if two or more timers would
fire close together, the second (and every other) timer would be
added to mask incorrectly - timerid value would be shifted twice,
and sa_upcall() would later kill process with SIGILL

Revision 1.65 / (download) - annotate - [select for diffs], Tue Feb 4 15:46:39 2003 UTC (16 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.64: +5 -4 lines
Diff to previous 1.64 (colored)

cosmetic - use type 'timer_t' for timerid local in sys_timer_create()
and sys_timer_delete()

Revision 1.64 / (download) - annotate - [select for diffs], Mon Feb 3 23:39:41 2003 UTC (16 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.63: +43 -12 lines
Diff to previous 1.63 (colored)

Prevent one timer from overrunning another with the current userret
mechanism by keeping a list (bitset) of which timers have fired and using
that list in the upcall (Does this sound familiar? SEND HELP NEED SIGINFO).

Provoke the idle LWP into running again with setrunnable(sa->sa_idle)
instead of a wakeup() call, since we know what it is.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:32 2003 UTC (16 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.62: +601 -137 lines
Diff to previous 1.62 (colored)

Merge the nathanw_sa branch.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Oct 22 03:23:24 2002 UTC (17 years, 1 month ago) by simonb
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.61: +2 -4 lines
Diff to previous 1.61 (colored)

"oatv" in adjtime1() isn't used after being set; remove it.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jan 31 00:13:08 2002 UTC (17 years, 9 months ago) by simonb
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, kqueue-base, ifpoll-base, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6
Changes since 1.60: +35 -16 lines
Diff to previous 1.60 (colored)

Implement the CLOCK_MONOTONIC clock for the posix/opengroup realtime
clock_() functions.  This simply returns the kernel mono_time variable.
As discussed on tech-kern.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Dec 9 16:10:43 2001 UTC (17 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.59: +48 -50 lines
Diff to previous 1.59 (colored)

Changed clocktl interface to use syscallargs structures

Revision 1.59 / (download) - annotate - [select for diffs], Tue Nov 13 00:34:21 2001 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.58: +4 -5 lines
Diff to previous 1.58 (colored)

PR/8657: z@rentaboat.se: alarm takes more seconds that it can handle.

This is a followup to PR/14558.

    - itimerfix(9) limited the number of seconds to 100M, before I changed
      it to 1000M for PR/14558.
    - nanosleep(2) documents a limit of 1000M seconds.
    - setitimer(2), select(2), and other library functions that indirectly
      use setitimer(2) for example alarm(3) don't specify a limit.

So it only seems appropriate that any positive number of seconds in
struct timeval should be accepted by any code that uses itimerfix(9)
directly, except nanosleep(2) which should check for 1000M seconds
manually. This changes makes the manual pages of select(2), nanosleep(2),
setitimer(2), and alarm(3) consistent with the code.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:18 2001 UTC (18 years ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.57: +4 -1 lines
Diff to previous 1.57 (colored)

add RCSIDs

Revision 1.57 / (download) - annotate - [select for diffs], Mon Nov 12 14:52:33 2001 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

PR/14558: Tero Kivinen: There is no point in limiting the number of seconds
to 100 million. Use 1000 million like the man page for nanosleep suggests.
This is much closer to MAXINT, and it conforms to POSIX.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Sep 16 06:50:06 2001 UTC (18 years, 2 months ago) by manu
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.55: +74 -28 lines
Diff to previous 1.55 (colored)

Split root-only time-related system calls so that we have an upper part, that
checks root privs, and a lower part that does the actual job. The lower part
will be called by the upcoming clockctl driver. Approved by Christos
Also fixed a few cosmetic things

Revision 1.55 / (download) - annotate - [select for diffs], Mon Jun 11 07:07:12 2001 UTC (18 years, 5 months ago) by tron
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.54: +7 -3 lines
Diff to previous 1.54 (colored)

Lower interrupt priortiy properly if setting the setting the kernel time
is denied in a securelevel above 1. This fixes PR kern/13158.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Sep 19 23:26:25 2000 UTC (19 years, 2 months ago) by bjh21
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.53: +3 -2 lines
Diff to previous 1.53 (colored)

Extend NFS_V2_ONLY to remove NQNFS lease support as well.  Saves another 10k.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Aug 2 12:24:11 2000 UTC (19 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

allow admins to disable pps rate limitation, by setting "maxpps"
parameter to negative value.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jul 13 17:33:39 2000 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.51: +9 -1 lines
Diff to previous 1.51 (colored)

Add a comment about the hzto() return value.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Jul 9 14:13:04 2000 UTC (19 years, 4 months ago) by jhawk
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Comment police. s/DIAGNOSTICS/DIAGNOSTIC/

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jul 9 06:44:59 2000 UTC (19 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.49: +55 -1 lines
Diff to previous 1.49 (colored)

add ppsratelimit(9), which does event-per-sec rate limitation.
use it from icmp6 error rate limitation code.
XXX better name for the function?

Revision 1.49 / (download) - annotate - [select for diffs], Sun Jul 9 06:40:08 2000 UTC (19 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.48: +7 -5 lines
Diff to previous 1.48 (colored)

shorten splclock() period in ratelimit().
From: onoe

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:31 2000 UTC (19 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.47: +1 -2 lines
Diff to previous 1.47 (colored)

remove include of <vm/vm.h>

Revision 1.47 / (download) - annotate - [select for diffs], Wed May 31 05:02:34 2000 UTC (19 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.46: +11 -3 lines
Diff to previous 1.46 (colored)

Track which process a CPU is running/has last run on by adding a
p_cpu member to struct proc.  Use this in certain places when
accessing scheduler state, etc.  For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.

While I'm here, comment a few places where there are known issues
for the SMP implementation.

Revision 1.46 / (download) - annotate - [select for diffs], Fri May 26 21:20:32 2000 UTC (19 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.45: +3 -2 lines
Diff to previous 1.45 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:12 2000 UTC (19 years, 7 months ago) by augustss
Branch: MAIN
Changes since 1.44: +14 -14 lines
Diff to previous 1.44 (colored)

Get rid of register declarations.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Mar 23 06:30:12 2000 UTC (19 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +6 -5 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Wed Feb 16 12:36:19 2000 UTC (19 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

correct ratecheck() signedness.  without this fix, ratecheck() will never
success again after first success with lasttime=(0,0).

Revision 1.42 / (download) - annotate - [select for diffs], Thu Feb 3 23:04:46 2000 UTC (19 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.41: +66 -1 lines
Diff to previous 1.41 (colored)

Implement ratecheck(), a function which can help programmers implement
rate-limited actions.  See ratecheck(9) for details of its use.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Oct 10 18:41:53 1999 UTC (20 years, 1 month ago) by hwr
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

If time delta is larger than thresh. Use 10* adj factor. Make this
work for negative deltas too. From NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
in kern/8589.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Aug 16 18:53:55 1999 UTC (20 years, 3 months ago) by tron
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.39: +1 -3 lines
Diff to previous 1.39 (colored)

Remove the prototype for settime(), it is in "sys/time.h" now.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Aug 16 18:42:25 1999 UTC (20 years, 3 months ago) by tron
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Make settime() public because we need to use it for the Linux emulation.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Aug 5 18:08:15 1999 UTC (20 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jun 7 22:33:53 1999 UTC (20 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.36: +8 -1 lines
Diff to previous 1.36 (colored)

Make sure `olddelta' is a valid pointer before performing the guts of
the adjtime(2) system call.  Fixes PR #7721, Darren Reed.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Aug 18 06:27:01 1998 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, kenh-if-detach-base, kenh-if-detach, kame_14_19990705, kame_14_19990628, chs-ubc-base, chs-ubc
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored)

Add some braces to make egcs happy (ambiguous else warning).

Revision 1.35 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:51 1998 UTC (21 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored)

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

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

defopt NFSSERVER

Revision 1.33 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:31 1998 UTC (21 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Merge with Lite2 + local changes

Revision 1.32 / (download) - annotate - [select for diffs], Fri Feb 20 07:22:14 1998 UTC (21 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +4 -4 lines
Diff to previous 1.31 (colored)

Fix missing newline in time zone warning.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Feb 19 00:51:38 1998 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +3 -1 lines
Diff to previous 1.30 (colored)

Include the NFS option header.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Oct 15 17:04:08 1997 UTC (22 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: 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, netbsd-1-3
Changes since 1.29: +12 -10 lines
Diff to previous 1.29 (colored)

Adjust u_int arguments of some system calls to int, to match user-level
prototypes.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Apr 26 21:22:57 1997 UTC (22 years, 7 months ago) by tls
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Changes since 1.28: +14 -5 lines
Diff to previous 1.28 (colored)

Don't allow the time to be set backwards if in highly secure mode, since this would allow inode change times to be manipulated.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Apr 21 16:56:54 1997 UTC (22 years, 7 months ago) by jtc
Branch: MAIN
Changes since 1.27: +6 -2 lines
Diff to previous 1.27 (colored)

In nanosleep, use local error variable when storing rqtp in so that
an error from a failed tsleep will still be returned to the caller.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Apr 16 14:41:29 1997 UTC (22 years, 7 months ago) by jtc
Branch: MAIN
Changes since 1.26: +59 -2 lines
Diff to previous 1.26 (colored)

Add POSIX.1b nanosleep().

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 31 02:34:23 1997 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

NFSCLIENT -> NFS

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jan 15 01:37:53 1997 UTC (22 years, 10 months ago) by perry
Branch: MAIN
Changes since 1.24: +19 -4 lines
Diff to previous 1.24 (colored)

Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Dec 22 10:21:11 1996 UTC (22 years, 11 months ago) by cgd
Branch: MAIN
Branch point for: thorpej-setroot
Changes since 1.23: +19 -26 lines
Diff to previous 1.23 (colored)

* catch up with system call argument type fixups/const poisoning.
* Fix arguments to various copyin()/copyout() invocations, to avoid
  gratuitous casts.
* Some KNF formatting fixes

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 15 23:53:32 1996 UTC (23 years ago) by cgd
Branch: MAIN
Changes since 1.22: +15 -12 lines
Diff to previous 1.22 (colored)

clean up a few spaces vs. tabs and KNF bogons.  Make this compile
cleanly with -Wall -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Nov 15 22:44:26 1996 UTC (23 years ago) by jtc
Branch: MAIN
Changes since 1.21: +115 -17 lines
Diff to previous 1.21 (colored)

Add clock_gettime, clock_settime, and clock_getres

Revision 1.21 / (download) - annotate - [select for diffs], Thu Oct 24 04:35:33 1996 UTC (23 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.20: +8 -4 lines
Diff to previous 1.20 (colored)

replace a construction in sys_setitimer() that was too tricky for its
(and my!) own good with a more straightforward one that is equally (and
more apparently) correct.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Feb 18 11:57:06 1996 UTC (23 years, 9 months ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored)

Changes for NVSv3 code: pull in more NFS include files into kern_time.c
to get types right (overkill for just one function call, but oh well).
Clear B_NEEDCOMMIT in bdwrite().

Revision 1.19 / (download) - annotate - [select for diffs], Tue Feb 13 21:10:43 1996 UTC (23 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

uipc_proto.c: No need for the forward decls anymore; everything is prototyped.
kern_time.c: add header to get the NFS prototypes if needed.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Feb 9 18:59:53 1996 UTC (23 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.17: +1 -3 lines
Diff to previous 1.17 (colored)

More proto fixes

Revision 1.17 / (download) - annotate - [select for diffs], Sun Feb 4 02:16:26 1996 UTC (23 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.16: +14 -8 lines
Diff to previous 1.16 (colored)

First pass at prototyping

Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:28 1995 UTC (24 years, 1 month 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.15: +12 -12 lines
Diff to previous 1.15 (colored)

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

Revision 1.15 / (download) - annotate - [select for diffs], Tue Sep 19 21:45:09 1995 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.14: +26 -21 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Tue Mar 21 13:33:41 1995 UTC (24 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +8 -9 lines
Diff to previous 1.13 (colored)

Update to use timer{add,sub}().

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 13 22:19:45 1994 UTC (24 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

LEASE_UPDATETIME -> lease_updatetime

Revision 1.12 / (download) - annotate - [select for diffs], Sun Dec 11 18:06:10 1994 UTC (24 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +9 -55 lines
Diff to previous 1.11 (colored)

Use __timer{add,sub}(), not timeval{add,sub}().  Remove the latter completely.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Oct 20 04:22:59 1994 UTC (25 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.10: +54 -54 lines
Diff to previous 1.10 (colored)

update for new syscall args description mechanism

Revision 1.10 / (download) - annotate - [select for diffs], Sun Sep 18 21:49:07 1994 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored)

Remove extern of tickadj.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:48 1994 UTC (25 years, 5 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.8: +3 -2 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 20 07:24:51 1994 UTC (25 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.7: +62 -38 lines
Diff to previous 1.7 (colored)

update to Lite

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 5 09:15:48 1994 UTC (25 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

Remove now-bogus casts.

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 5 05:38:20 1994 UTC (25 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.5: +11 -9 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Sat Dec 18 04:21:18 1993 UTC (25 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +7 -7 lines
Diff to previous 1.4 (colored)

Canonicalize all #includes.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 13 22:13:28 1993 UTC (26 years, 4 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, magnum-base
Branch point for: magnum
Changes since 1.3: +32 -21 lines
Diff to previous 1.3 (colored)

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

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:48 1993 UTC (26 years, 5 months ago) by andrew
Branch: MAIN
Changes since 1.2: +16 -4 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Thu May 20 02:54:44 1993 UTC (26 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (26 years, 8 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>