freebsd-nq/sys/kern
Ed Schouten 41ba7e9b13 Slightly improve the design of the TTY buffer.
The TTY buffers used the standard <sys/queue.h> lists. Unfortunately
they have a big shortcoming. If you want to have a double linked list,
but no tail pointer, it's still not possible to obtain the previous
element in the list. Inside the buffers we don't need them. This is why
I switched to custom linked list macros. The macros will also keep track
of the amount of items in the list. Because it doesn't use a sentinel,
we can just initialize the queues with zero.

In its simplest form (the output queue), we will only keep two
references to blocks in the queue, namely the head of the list and the
last block in use. All free blocks are stored behind the last block in
use.

I noticed there was a very subtle bug in the previous code: in a very
uncommon corner case, it would uma_zfree() a block in the queue before
calling memcpy() to extract the data from the block.
2009-02-03 19:58:28 +00:00
..
bus_if.m
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c When a statically linked binary is executed (or at least, one without 2009-01-25 12:07:43 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c
init_sysent.c
kern_acct.c
kern_alq.c
kern_clock.c - Implement generic macros for producing KTR records that are compatible 2009-01-17 07:17:57 +00:00
kern_condvar.c
kern_conf.c
kern_cons.c
kern_context.c
kern_cpu.c
kern_cpuset.c
kern_ctf.c
kern_descrip.c Clear the pointers to the file in the struct filedesc before file is closed 2008-12-30 12:51:56 +00:00
kern_dtrace.c
kern_environment.c
kern_event.c
kern_exec.c
kern_exit.c
kern_fork.c
kern_idle.c
kern_intr.c
kern_jail.c Mark most often used sysctl's as MPSAFE. 2009-01-28 19:58:05 +00:00
kern_kthread.c
kern_ktr.c
kern_ktrace.c
kern_linker.c
kern_lock.c
kern_lockf.c
kern_malloc.c - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
kern_mbuf.c Temporary workaround for the limitations of the mbuf flowid field: zero 2009-01-01 20:03:01 +00:00
kern_mib.c Mark most often used sysctl's as MPSAFE. 2009-01-28 19:58:05 +00:00
kern_module.c
kern_mtxpool.c
kern_mutex.c
kern_ntptime.c
kern_osd.c
kern_physio.c
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c - Add conditional Giant locking around the vrele() in 2009-01-23 22:46:45 +00:00
kern_prot.c
kern_resource.c
kern_rmlock.c
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_shutdown.c
kern_sig.c
kern_subr.c
kern_switch.c
kern_sx.c
kern_synch.c - Implement generic macros for producing KTR records that are compatible 2009-01-17 07:17:57 +00:00
kern_syscalls.c
kern_sysctl.c Mark most often used sysctl's as MPSAFE. 2009-01-28 19:58:05 +00:00
kern_tc.c
kern_thr.c
kern_thread.c
kern_time.c
kern_timeout.c Add explicit static DTrace tracing to the callout mechanism, capturing 2009-01-24 10:22:49 +00:00
kern_umtx.c
kern_uuid.c
kern_vimage.c
kern_xxx.c Fix compilation. Also move ogetkerninfo() to kern_xxx.c. 2008-12-29 19:24:00 +00:00
ksched.c
link_elf_obj.c
link_elf.c
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c - Use __XSTRING where I want the define to be expanded. This resulted in 2009-01-25 07:35:10 +00:00
sched_ule.c - Use __XSTRING where I want the define to be expanded. This resulted in 2009-01-25 07:35:10 +00:00
serdev_if.m
stack_protector.c
subr_acl_posix1e.c
subr_autoconf.c Prefer ANSI function definitions to K&R ones. 2009-02-03 07:52:07 +00:00
subr_blist.c
subr_bufring.c
subr_bus.c Declare bus_data_devices to be static: it isn't used elsewhere. 2009-02-03 00:10:21 +00:00
subr_clist.c Use NULL in preference to 0 for pointers. 2009-02-03 07:51:41 +00:00
subr_clock.c
subr_devstat.c Use NULL in preference to 0 in pointer contexts. 2009-02-03 07:54:42 +00:00
subr_disk.c Make bioq_disksort have a ANSI-C definition rather than a K&R definition. 2009-02-03 07:53:51 +00:00
subr_eventhandler.c
subr_fattime.c
subr_firmware.c Use NULL in preference to 0 for pointers. 2009-02-03 07:51:11 +00:00
subr_hints.c
subr_kdb.c
subr_kobj.c Use NULL in preference to 0 in pointer contexts. 2009-02-03 07:54:42 +00:00
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Document the relationship between enum VM_GUEST and the vm_guest_sysctl_names 2008-12-30 23:49:54 +00:00
subr_pcpu.c - Implement generic macros for producing KTR records that are compatible 2009-01-17 07:17:57 +00:00
subr_power.c
subr_prf.c Use NULL in preference to 0 for pointers. 2009-02-03 07:51:11 +00:00
subr_prof.c Use ANSI function definition for profil. 2009-02-03 07:52:36 +00:00
subr_rman.c rman_debug should be static, so make it static. 2009-02-03 07:53:08 +00:00
subr_rtc.c int foo(void) is the proper ANSI function definition when there's no 2009-02-03 07:50:01 +00:00
subr_sbuf.c
subr_scanf.c
subr_sleepqueue.c
subr_smp.c Whitespace tweak. 2009-01-26 15:32:39 +00:00
subr_stack.c
subr_taskqueue.c Use NULL in preference to 0 for pointers. 2009-02-03 07:51:41 +00:00
subr_trap.c
subr_turnstile.c
subr_unit.c
subr_witness.c o Use unsigned for bit fields. 2009-02-03 07:50:41 +00:00
sys_generic.c Fix select on platforms where sizeof(long) != sizeof(int). This used 2009-02-02 03:34:40 +00:00
sys_pipe.c
sys_process.c
sys_socket.c
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c Lock the semaphore identifier lock during semaphore initialization to 2009-01-15 12:15:46 +00:00
sysv_shm.c
tty_compat.c
tty_info.c If a process is a zombie and we couldn't identify another useful state, 2009-01-29 09:32:56 +00:00
tty_inq.c Slightly improve the design of the TTY buffer. 2009-02-03 19:58:28 +00:00
tty_outq.c Slightly improve the design of the TTY buffer. 2009-02-03 19:58:28 +00:00
tty_pts.c Set PTS_FINISHED before waking up any threads. 2008-12-21 21:16:57 +00:00
tty_pty.c Remove unneeded use of device unit numbers from pty(4). 2009-01-25 08:27:11 +00:00
tty_tty.c
tty_ttydisc.c
tty.c Slightly improve the design of the TTY buffer. 2009-02-03 19:58:28 +00:00
uipc_accf.c
uipc_cow.c Extend the struct vm_page wire_count to u_int to avoid the overflow 2009-01-03 13:24:08 +00:00
uipc_debug.c Remove two further uses (debugging and NULLing) of pr_ousrreq, missed due 2009-01-04 19:16:36 +00:00
uipc_domain.c Remove Giant locking from domains list. 2009-01-04 19:22:53 +00:00
uipc_mbuf2.c
uipc_mbuf.c Teach m_copyback() to use trailing space of the last mbuf in chain. 2009-01-18 20:19:55 +00:00
uipc_mqueue.c
uipc_sem.c
uipc_shm.c
uipc_sockbuf.c
uipc_socket.c
uipc_syscalls.c
uipc_usrreq.c White space and comment tweaks. 2009-01-01 20:03:22 +00:00
vfs_acl.c
vfs_aio.c Use the correct type for the timeout parameter to the 32-bit 2009-01-23 13:23:17 +00:00
vfs_bio.c
vfs_cache.c Convert the global mutex protecting the directory lookup name cache from a 2009-01-28 19:05:18 +00:00
vfs_cluster.c
vfs_default.c
vfs_export.c drop rnh lock before destroying it 2008-12-28 14:32:27 +00:00
vfs_extattr.c Do not call namei() while having another user-controlled vnode 2009-01-08 12:47:30 +00:00
vfs_hash.c
vfs_init.c
vfs_lookup.c
vfs_mount.c
vfs_subr.c Tweak the wording for vfs_mark_atime() since the I/O it is avoiding by not 2009-01-23 22:13:00 +00:00
vfs_syscalls.c Use shared vnode locks for fchdir(). 2009-01-23 22:13:30 +00:00
vfs_vnops.c Move the code from ufs_lookup.c used to do dotdot lookup, into 2009-01-21 14:51:38 +00:00
vnode_if.src Move the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP: 2009-01-21 14:42:00 +00:00