summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2000-04-25Use CIRCLEQ_FOREACHConstantine Sapuntzakis
2000-04-25non-O_NOFOLLOW error introduced by accident, this is fragile code..Theo de Raadt
2000-04-21see if there is any meaning under curproc before using &proc0 in ↵Michael Shalayeff
vfs_syncwait(); from art@
2000-04-21Change kernel-only open flag FNOSYMLINK to userland-visible O_NOFOLLOW;Todd C. Miller
adapated from FreeBSD. Also change O_FSYNC to the more standard O_SYNC and document it. open(2) needs some real examples for proper usage, to come later.
2000-04-21do not declare and use a local variable which conflicts with a globalTheo de Raadt
variable which is used by a macro when VM is used instead of UVM. very cute, Art -- 10 points for artistic expression.
2000-04-20Add a function "ktrsettracevnode", that changes the ktrace vnode for a processArtur Grabowski
in a correct way. Use it in all places where the vnode was changed. (most of the earlier code was incorrect and had races).
2000-04-20syncTheo de Raadt
2000-04-20system call hookup for p{read,write}{,v}Theo de Raadt
2000-04-20p{read,write}{,v} from csapuntz, partial NetBSD origin I thinkTheo de Raadt
2000-04-19Unbreak genio (how could I commit that garbage?).Artur Grabowski
Let ktrwrite return an error if the write failed so that we won't loop in genio writing to a full disk (or whatever other error happened).
2000-04-19When logging genio, check if we need to yield in the same way as in uiomove.Artur Grabowski
2000-04-19Remove the roundrobin_attempts hack and replace it with per-process schedulingArtur Grabowski
flags (much nicer for future smp work). Add two generic functions yield() and preempt(). Use preepmt() in uio when we are told to yield. Based on my idea, code written by Jason Thorpe from NetBSD.
2000-04-19Don't abuse malloc to allocate small fixed-size structs that we can keep on ↵Artur Grabowski
the stack.
2000-04-19Change struct file interface methods read and write to pass file offset inConstantine Sapuntzakis
and out. Make pread/pwrite in netbsd & linux thread safe - which is the whole point anyway.
2000-04-18If the user does a huge I/O split the genio logging into smaller chunksArtur Grabowski
to avoid allocating a huge buffer which could lead to kmem starvation.
2000-04-15Fix sys_sync to actually sync all file systems.Constantine Sapuntzakis
2000-04-09range error; < cd_ndevs, not <=Theo de Raadt
2000-04-09Move a locking function that was spread throughout disk device drivers intoConstantine Sapuntzakis
the disk structure. The locking was mostly used in disk device drivers to prevent multiple disklabel operations from going on simultaneously against the device. Added disk_construct(), a constructor for the disk structure, that initializes the lock structure in disk. It is called by default in disk_attach() if it hasn't been called yet. Added disk_lock and disk_unlock
2000-04-09Added config_detach_children, config_activate_children.Constantine Sapuntzakis
Added ref counting to devices: device_ref, device_unref and a new method for devices : ca_zeroref, called when the ref count hits zero. Note that ca_zeroref may be called from interrupt context.
2000-04-08Initial check-in for support of 32-bit CardBus PC Cards; from NetBSD. On manyAaron Campbell
machines, this code needs the new PCIBIOS* options enabled in the kernel config file to work, but your mileage may vary. Included is a working 3c575 driver for 3Com 10/100 CardBus PC Card NICs (tested only with the 'C' revision). The 3c575 is the pccard version of the PCI EtherLink XL cards, and thus the xl driver has been split into /sys/dev/ic.
2000-04-06Random cleanup.Artur Grabowski
2000-04-01fdup could fail when want for fdalloc > than the free fd in the block.Niels Provos
slightly different fix than in the bug report by Rob Pickering <rob@syntonet.co.uk>
2000-03-23Iiieeek! This kludge was almost funny.Artur Grabowski
Probably something from the stone age. Kill it.
2000-03-23Don't reinitialize the tsleep and ITIMER_REAL timers all the time.Artur Grabowski
The function and the argument never change.
2000-03-23No need for our own declaration of lbolt.Artur Grabowski
2000-03-23Use the new timeout facilities for ITIMER_REAL.Artur Grabowski
2000-03-23use the new timeout interface for tsleep.Artur Grabowski
2000-03-23convert to new timeouts.Artur Grabowski
2000-03-23Update a comment to reflect reality.Artur Grabowski
2000-03-23Provide methods to check if a timeout was initalized and if it is scheduled.Artur Grabowski
2000-03-23Use new timeouts for pfslowtimo and pffasttimo.Artur Grabowski
2000-03-23Preserve the FIFO order of issued timeouts.Artur Grabowski
2000-03-23Adapt roundrobin and schedcpu to the new timeout API.Artur Grabowski
2000-03-23New API for timeouts. Replaces the old timeout()/untimeout() API andArtur Grabowski
makes it the callers responsibility to allocate resources for the timeouts. This is a KISS implementation and does _not_ solve the problems of slow handling of a large number of pending timeouts (this will be solved in future work) (although hardclock is now guarateed to take constant time for handling of timeouts). Old timeout() and untimeout() are implemented as wrappers around the new API and kept for compatibility. They will be removed as soon as all subsystems are converted to use the new API.
2000-03-22some more machine_stack_grows_upMichael Shalayeff
2000-03-20bring proto into scopeTheo de Raadt
2000-03-17ratecheck - function to help implement rate-limited actions (from NetBSD)Jakob Schlyter
ok art@
2000-03-17Cryptographic services framework, and software "device driver". TheAngelos D. Keromytis
idea is to support various cryptographic hardware accelerators (which may be (detachable) cards, secondary/tertiary/etc processors, software crypto, etc). Supports session migration between crypto devices. What it doesn't (yet) support: - multiple instances of the same algorithm used in the same session - use of multiple crypto drivers in the same session - asymmetric crypto No support for a userland device yet. IPsec code path modified to allow for asynchronous cryptography (callbacks used in both input and output processing). Some unrelated code simplification done in the process (especially for AH). Development of this code kindly supported by Network Security Technologies (NSTI). The code was writen mostly in Greece, and is being committed from Montreal.
2000-03-16Bring in some new UVM code from NetBSD (not current).Artur Grabowski
- Introduce a new type of map that are interrupt safe and never allow faults in them. mb_map and kmem_map are made intrsafe. - Add "access protection" to uvm_vslock (to be passed down to uvm_fault and later to pmap_enter). - madvise(2) now works. - various cleanups.
2000-03-15prevent overflow in a diagnostic check; art@ okMichael Shalayeff
2000-03-13Get rid of leading NULs in /kern/msgbuf. If the msgbuf modified in betweenTodd C. Miller
reads at just the right time is is possible to get duplicate output but in practice this is extremely rare. Joint effort with Theo.
2000-03-03If we attempted reschedule two times without suceeding, uiomove will yield,Artur Grabowski
giving other processes a chance to run. A process feeding a huge buffer to {read,write}{,v} on a file that doesn't need to wait for I/O, could have hogged a lot of cpu in the kernel, blocking all userland activity. Based on a similiar fix in FreeBSD.
2000-03-03Keep track of the number of times we trigger a reschedule before theArtur Grabowski
context switch actually happens.
2000-03-03Use the LIST_FIRST macro to get the head of zombproc list.Artur Grabowski
2000-03-03Use LIST_ macros instead of internal field names to walk the allproc list.Artur Grabowski
2000-03-03Style.Angelos D. Keromytis
2000-03-03Remove extraneous newline.Angelos D. Keromytis
2000-03-02New function: m_getptr(), takes as argument an mbuf chain and anAngelos D. Keromytis
offset, returns a pointer to them specific mbuf and the offset inside it that corresponds to the offset argument (so one can find where the n'th byte is in an mbuf).
2000-03-02Add an option DDB_SAFE_CONSOLE that defaults db_console to 1.Artur Grabowski
In many cases, setting db_console in /etc/rc is too late.
2000-02-29more fix to ancillary data alignment. we need padding afterJun-ichiro itojun Hagino
last cmsg_data item (see the figure on RFC2292 page 18).