Commit Graph

148 Commits

Author SHA1 Message Date
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
jdolecek dfc728f814 fix pasto in smb_rq_setcallback(), mistakely used SMBRQ_SLOCK() instead
of SMBRQ_SUNLOCK()
found during LOCKDEBUG PR kern/21067 hunt
2003-04-08 18:13:41 +00:00
jdolecek 49d2e49597 FILE_USE()/FILE_UNUSE() file entry returned from fd_getfile() properly
bug discovered with LOCKDEBUG, adresses PR kern/21067 by Martin Husemann
2003-04-08 16:29:11 +00:00
jdolecek ddf683ae7a fix simplelock acquire/release in smb_co_rele()
adresses PR kern/21067 by Martin Husemann
2003-04-08 14:56:49 +00:00
jdolecek 1cd92a1660 use pools instead of malloc(9) for allocation of smb request structures
convert all code to use smb_{rq|t2}_alloc() instead of allocating
structures on stack, make smb_rq_init()/smb_t2_init() static and not
exported outside smb_rq.c
2003-04-07 19:35:39 +00:00
jdolecek b37f22dc9f add support for asynchronous execution of SMB requests:
* add receive hook - if set, this function is called when request is finished
* unstatic smb_rq_enqueue(), smb_rq_reply() so that code can use that
  independant of smb_rq_simple() et al
this is needed for NT DIRECTORY CHANGE NOTIFY SMB, since they typically
take very long to complete and we want to be able to use single kernel thread
to handle them all

add support for 'nowait' requests (flag SMBR_NOWAIT), which don't expect
and answer from server and are marked as 'processed' immediatelly
after they are sent to server - needed for NT CANCEL SMB
2003-04-07 11:23:02 +00:00
jdolecek dfb3906cfb add bunch of NT DIRECTORY CHANGE NOTIFY and NT CREATE AND X related constants
add mapping for ERRDOS:STATUS_NOTIFY_ENUM_DIR and ERRHRD:ERRgeneral
2003-04-07 11:13:24 +00:00
jdolecek dee9f67e51 add SMB_CAPS() macro, which returns session capabilities 2003-04-05 13:13:50 +00:00
jdolecek 55535a9403 smb_iod_addrq(): change vc_maxmux check to #ifdef DIAGNOSTIC panic
change other SMBERROR() calls to SMBIODEBUG() - they are only useful when
debugging, and avoids spamming console/system logs with messages triggerable
from userland
2003-04-05 11:12:23 +00:00