summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* uh, commit all of the patchjulian2002-09-292-0/+2
|
* commit the version I actually tested..julian2002-09-292-4/+8
| | | | Submitted by: davidxu
* Implement basic KSE loaning. This stops a hread that is blocked in BOUND modejulian2002-09-297-9/+98
| | | | | | | | | from stopping another thread from completing a syscall, and this allows it to release its resources etc. Probably more related commits to follow (at least one I know of) Initial concept by: julian, dillon Submitted by: davidxu
* Fix style nit where conditionally compiled code was unconditionalized,obrien2002-09-291-2/+1
| | | | | | but style(9) was consulted. Submitted by: bde
* lock proc while calling psignaljulian2002-09-292-18/+34
| | | | | | (plus related cleanups) Submitted by: davidxu
* Move includ of <sys/bus_priate.h> later to get semantic identity ofphk2002-09-281-1/+1
| | | | | | | | device_t the same throughout kernel. This is a very fine point of C which fortunatly does not make any difference in normal circumstances but which due to the pervasiveness of device_t in the kernel can make a lint barf a lot.
* Change a return to a break so the local buffers get properly freeed.phk2002-09-281-1/+1
| | | | | | Spotte by: FlexeLint Reviewed by: rwatson
* Remove unused includes.phk2002-09-281-4/+4
| | | | | Clarify the intention of a while(); Move a local variable to avoid potential name-confusion.
* Be consistent about "static" functions: if the function is markedphk2002-09-2812-15/+15
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Correctly order VI_UNLOCK(), local variables and block comment.phk2002-09-281-4/+4
|
* Rewrite the kse_create() function to better aproach the semantics wejulian2002-09-281-56/+71
| | | | have specified in the design.
* Add a workaround for what seems to be confusion between binutils and thejake2002-09-272-0/+20
| | | | | | | | | | | sparc v9 ABI. The Elf_Rela records for local symbols appear to already have the symbol's value added in to the addend field, even though the ABI specifies we need to lookup the symbol and add its value too. This breaks text relocations in klds because the symbol's value is added twice, and the resulting address points off into nowhere land, so for now just use the addend. Tested by: rwatson
* Rename struct specinfo to the more appropriate struct cdev.phk2002-09-272-8/+8
| | | | Agreed on: jake, rwatson, jhb
* Redo how completing threads pass their state to userlandjulian2002-09-272-162/+242
| | | | | | | if they are not going to cross over themselves. Also change how the list of completed user threads is tracked and passed to the KSE. This is not a change in design but rather the implementation of what was originally envisionned.
* Under DIAGNOSTIC, complain if ENOIOCTL leaks out through VOP_IOCTL().phk2002-09-261-0/+6
|
* Make biowait() check bio_error before the BIO_ERROR flag, to properyphk2002-09-261-2/+2
| | | | | | catch internal GEOM use of bio_error. Sponsored by: DARPA & NAI Labs.
* - Export the alq daemon thread pointer.jeff2002-09-262-5/+9
| | | | - Don't log ktr events from the alq daemon.
* - Move ASSERT_VOP_*LOCK* functionality into functions in vfs_subr.cjeff2002-09-261-29/+92
| | | | | | | - Make the VI asserts more orthogonal to the rest of the asserts by using a new, common vfs_badlock() function and adding a 'str' arg. - Adjust generated ASSERTS to match the new prototype. - Adjust explicit ASSERTS to match the new prototype.
* - We don't need any automated lock checking for vop_islocked.jeff2002-09-261-1/+1
|
* Make the following name changes to KSE related functions, etc., to betterarchie2002-09-256-25/+26
| | | | | | | | | | | | | | | represent their purpose and minimize namespace conflicts: kse_fn_t -> kse_func_t struct thread_mailbox -> struct kse_thr_mailbox thread_interrupt() -> kse_thr_interrupt() kse_yield() -> kse_release() kse_new() -> kse_create() Add missing declaration of kse_thr_interrupt() to <sys/kse.h>. Regenerate the various generated syscall files. Minor style fixes. Reviewed by: julian
* Round up instead of towards 0 in clock_getres() so that a resolution ofbde2002-09-251-1/+6
| | | | | | | 0 is never returned. PR: 41781 MFC after: 3 days
* - Lock down the syncer with sync_mtx.jeff2002-09-251-74/+188
| | | | | | | | | | | | | | | | | | | - Enable vfs_badlock_mutex by default. - Assert that the vp is locked in VOP_UNLOCK. - Use standard interlock macros in remaining code. - Correct a race in getnewvnode(). - Lock access to v_numoutput with interlock. - Lock access to buf lists and splay tree with interlock. - Add VOP and VI asserts. - Lock b_vnbufs with the vnode interlock. - Add vrefcnt() for callers who want to retreive the vnode ref without holding a lock. Add a comment that describes when this is safe. - Add vholdl() and vdropl() so that callers who already own the interlock can avoid race conditions and unnecessary unlocking. - Move the VOP_GETATTR() in vflush() into the WRITECLOSE conditional case. - Hold the interlock before droping the mntlist_mtx in vflush() to avoid a race. - Fix locking in vfs_msync().
* - Properly lock v_vflags in getdirents().jeff2002-09-252-8/+28
|
* - Use incore() where no other interlock locking is necessary.jeff2002-09-251-2/+6
| | | | - Lock access to numoutput.
* - Lock accesses to v_numoutput.jeff2002-09-251-0/+16
| | | | - Lock calls to gbincore.
* - Don't protect mountedhere with the vn interlock.jeff2002-09-251-5/+7
| | | | - Protect mountedhere with the vn lock.
* - Use the standard vp interlock macros.jeff2002-09-251-8/+12
|
* Don't use local variable 'p' in a debug statement.. we removed it.julian2002-09-232-2/+2
|
* oops don't do dthe copy range in a new KSE. There isn't one any more.julian2002-09-231-0/+2
|
* slightly clean up the thread_userret() and thread_consider_upcall() calls.julian2002-09-233-27/+52
| | | | | | | also some slight changes for TDF_BOUND testing and small style changes Should ONLY affect KSE programs Submitted by: davidxu
* Add code to create > 1 KSe per process.julian2002-09-231-16/+39
| | | | | | (support code not yet complete) Submitted by: davidxu
* Indentation does not define a block.. you need breces {} as well..julian2002-09-231-1/+3
| | | | | | also add a mutex assert. (threaded path only) Submitted by: davidxu
* - Hold the credential of the caller and use it in all subsequent vn ops.jeff2002-09-231-6/+7
| | | | | | - Get rid of the ill conceived aq_td field. Suggested by: rwatson
* - Add support for logging KTR via ALQ. This is optional and enabled by thejeff2002-09-221-3/+92
| | | | KTR_ALQ config option.
* - Tell witness about ALQ's spin lock.jeff2002-09-221-0/+1
|
* - Add an asynchronous fixed length record logging mechanism calledjeff2002-09-221-0/+499
| | | | | | | | ALQ (Asynch. Logging Queues). ALQ supports many seperate queues with different record and buffer sizes. It opens and logs to any vnode so it can be used with character devices as well as regular files. Reviewed in part by: phk, jake, markm
* Removed unneeded include (missed in last revision).jake2002-09-221-2/+0
|
* Moved netisr code from kern/kern_intr.c to net/netisr.c as threatened in ajake2002-09-221-79/+1
| | | | comment.
* Use the fields in the sysentvec and in the vm map header in place of thejake2002-09-217-38/+66
| | | | | | | | constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS. This is mainly so that they can be variable even for the native abi, based on different machine types. Get stack protections from the sysentvec too. This makes it trivial to map the stack non-executable for certain abis, on machines that support it.
* Assert my copyright on this file (using the default 2-clause BSD).phk2002-09-201-11/+4
| | | | | The vast majority of the contents is from my keyboard and no significant pieces remain of the former copyright holders code.
* (This commit touches about 15 disk device drivers in a very consistentphk2002-09-202-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs.
* For reasons now lost in historical fog, the bounds_check_with_label()phk2002-09-201-0/+58
| | | | | | | | | | | | function were put in i386/i386/machdep.c from where it has been cut and pasted to other architectures with only minor corruption. Disklabel is really a MI format in many ways, at least it certainly is when you operate on struct disklabel. Put bounds_check_with_label() back in subr_disklabel.c where it belongs. Sponsored by: DARPA & NAI Labs.
* We don't need the <sys/disklabel.h> include for alpha anymore.phk2002-09-201-3/+0
| | | | Sponsored by: DARPA & NAI Labs.
* Make FreeBSD "struct disklabel" agnostic, step 312 of 723:phk2002-09-202-151/+150
| | | | | | | | | | Rename bioqdisksort() to bioq_disksort(). Keep a #define around to avoid changing all diskdrivers right now. Move it from subr_disklabel.c to subr_disk.c. Move prototype from <sys/disklabel.h> to <sys/bio.h> Sponsored by: DARPA and NAI Labs.
* Make FreeBSD "struct disklabel" agnostic, step 311 of 723:phk2002-09-203-66/+45
| | | | | | | | | | | | | | | | | | | | | | | | | Rename diskerr() to disk_err() for naming consistency. Drop the by now entirely useless struct disklabel argument. Add a flag argument for new-line termination. Fix a couple of printf-format-casts to %j instead of %l. Correctly print the name of all bio commands. Move the function from subr_disklabel.c to subr_disk.c, and from <sys/disklabel.h> to <sys/disk.h>. Use the new disk_err() throughout, #include <sys/disk.h> as needed. Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs. Remove unused disklabel members of softc for aac, amr and mlx, which seem to originally have been intended for diskerr() use, but which only rotted and got Copy&Pasted at least two times to many. Sponsored by: DARPA & NAI Labs.
* Remove unused variable.phk2002-09-201-1/+0
|
* Retire now unused DIOCGDVIRGIN kludge.phk2002-09-201-33/+0
| | | | Sponsored by: DARPA & NAI Labs.
* Switch to using strlcpy() in several places. It seems theremux2002-09-191-7/+7
| | | | were cases where we could get unterminated strings before.
* Add ability to dump stacktraces on kernel panics when DDB is compiled intojhb2002-09-191-2/+17
| | | | | | | | | | | | | | | the kernel. By default this is turned off since otherwise it could scroll valuable panic messages off of the screen. This option can be turned on by the DDB_TRACE kernel option as well as the debug.trace_on_panic sysctl. Also, fix the DDB_UNATTENDED option to use its own header instead of abusing opt_ddb.h. This way turning that one option on or off doesn't force you to recompile all of ddb. Requested by: many (1), bde (2*) * - I know bde prefers !abusing option headers in general but can't remember if he as brought up this specific case.
* VOP_FSYNC() requires that it's vnode argument be locked, which nfs_link()truckman2002-09-193-3/+7
| | | | | | | | | | wasn't doing. Rather than just lock and unlock the vnode around the call to VOP_FSYNC(), implement rwatson's suggestion to lock the file vnode in kern_link() before calling VOP_LINK(), since the other filesystems also locked the file vnode right away in their link methods. Remove the locking and and unlocking from the leaf filesystem link methods. Reviewed by: rwatson, bde (except for the unionfs_link() changes)
OpenPOWER on IntegriCloud