Commit Graph

156 Commits

Author SHA1 Message Date
ad
80da99483e Don't exit an unheld mutex. 2007-07-10 21:05:03 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
ad
59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
pavel
934634a18c 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.
2007-02-17 22:31:36 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
9c03e39ea2 add missing initializer 2006-09-03 05:27:28 +00:00
christos
f2e0e5984c add missing initializer 2006-09-03 05:25:43 +00:00
christos
35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
mlelstv
30f5c7acb7 Correct timeout computation. Fixes kern/33740. 2006-06-15 15:42:42 +00:00
kardel
de4337ab21 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
2006-06-07 22:33:33 +00:00
elad
874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
mrg
084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
christos
ddceccd3fb Coverity CID 609: Kill dead code! BANG! 2006-04-12 01:17:41 +00:00
christos
e445d1fecf Coverity CID 992: Avoid NULL deref. 2006-04-12 01:16:02 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
perry
0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos
1eba90d1ad These headers are used by mount_smb. 2005-12-11 06:25:32 +00:00
elad
58e7332bdf Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
2005-12-11 00:02:28 +00:00
christos
f4be9c1233 PR/30303: Dave Huang: It is ok to unlock an unlocked file. 2005-06-28 03:24:32 +00:00
christos
c6c1539491 sprinkle const, remove casts. 2005-05-29 21:26:27 +00:00
christos
f6a2fa578d Fix reversed arguments. Found by -Wcast-qual and removing stupid casts. 2005-05-29 21:26:02 +00:00
christos
8dc75b1c08 Panic strings should not end with \n. 2005-05-08 18:44:39 +00:00
perry
bcfcddbac1 nuke trailing whitespace 2005-02-26 22:31:44 +00:00
skrll
f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
drochner
5573193349 fix some questionable pointer casts; gcc-3.4.x didn't
like this
2004-06-24 16:45:47 +00:00
itojun
05c2e80700 remove debugging printf(), seems like mistakenly commited 2004-05-28 09:38:13 +00:00
jonathan
230fb9b8ab Eliminate several uses of `curproc' from the socket-layer code and from NFS.
Add a new explicit `struct proc *p' argument to socreate(), sosend().
Use that argument instead of curproc. Follow-on changes to pass that
argument to socreate(), sosend(), and (*so->so_send)() calls.
These changes reviewed and independently recoded  by Matt Thomas.

Changes to soreceive() and (*dom->dom_exernalize() from Matt Thomas:
pass soreceive()'s struct uio* uio->uio_procp to unp_externalize().
Eliminate curproc from unp_externalize.   Also, now soreceive() uses
its uio->uio_procp value, pass that same value downward to
((pr->pru_usrreq)() calls for consistency, instead of (struct proc * )0.

Similar changes in sys/nfs to eliminate (most) uses of curproc,
either via the req-> r_procp field of a struct nfsreq *req argument,
or by passing down new explicit struct proc * arguments.

Reviewed by: Matt Thomas, posted to tech-kern.
NB: The (*pr->pru_usrreq)() change should be tested on more (all!) protocols.
2004-05-22 22:52:13 +00:00
simonb
b5d0e6bf06 Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.
2004-04-25 16:42:40 +00:00
itojun
e133d13e80 kill some strcpy 2004-04-21 18:16:14 +00:00
jdolecek
865a0b1787 align Extended file attributes defines 2004-03-22 16:42:06 +00:00
jdolecek
1e14d87c7e follow FreeBSD and replace code using the try/catch paradigm
abstracted by itry, ithrow, icatch et.al. macros

there is problem with these in stack setup for FreeBSD/ia64 at least,
and in general the rewritten explicit code is slighly more optimal
and smaller in size

the NetBSD code change is somewhat different to what was done in FreeBSD,
to improve readability of the code
2004-03-21 10:09:52 +00:00
wiz
73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
wiz
f05e6f1a3a occured -> occurred. From Peter Postma. 2004-02-24 15:12:51 +00:00
jdolecek
fc15b17c83 fix NT_OPEN_EXISTING to be really just 'open' and not include the 'create' bit
fixes the problem described in PR kern/22835 by Rob Quinn
2004-02-17 19:22:42 +00:00
simonb
a2facef339 Remove some assigned-to but otherwise unused variables. 2003-10-30 01:43:08 +00:00
jdolecek
e257c8b61f map ERRSRV:ERRbaduid to EAUTH 2003-09-27 12:24:25 +00:00
drochner
29eaa7cc18 "(u_short > 0xffff)" is never true, as gcc3 found out 2003-07-03 10:59:12 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
itojun
5dcb6d7469 fix lwp lossage 2003-06-29 12:16:19 +00:00
martin
6b2ac9f5b4 Fix small merge botch in previous. 2003-06-29 12:04:32 +00:00
martin
8908626c9a struct proc -> struct lwp 2003-06-29 12:01:34 +00:00
darrenr
960df3c8d1 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
2003-06-28 14:20:43 +00:00
martin
eac03aee15 Make it compile with DEBUG but no DIAGNOSTIC. 2003-06-02 20:43:36 +00:00
itojun
0c48aa3eda need dstlen to make it safe 2003-05-16 05:14:40 +00:00
jdolecek
c2704241db add a comment on SMB packet PID purpose to smb_rq_new()
adjust the commented out code to be compilable, but keep using '1' as the PID
2003-04-08 21:10:33 +00:00