freebsd-dev/sys/kern
Bjoern A. Zeeb 42eedeac00 Split eventhandler_register() into an internal part and a wrapper function
that provides the allocated and setup eventhandler entry.

Add a new wrapper for VIMAGE that allocates extra space to hold the
callback function and argument in addition to an extra wrapper function.
While the wrapper function goes as normal callback function the
argument points to the extra space allocated holding the original func
and arg that the wrapper function can then call.

Provide an iterator function for the virtual network stack (vnet) that
will call the callback function for each network stack.

Provide a new set of macros for VNET that in the non-VIMAGE case will
just call eventhandler_register() while in the VIMAGE case it will use
vimage_eventhandler_register() passing in the extra iterator function
but will only register once rather than per-vnet.
We need a special macro in case we are interested in the tag returned
as we must check for curvnet and can neither simply assign the
return value, nor not change it in the non-vnet0 case without that.

Sponsored by:	ISPsystem
Discussed with:	jhb
Reviewed by:	zec (earlier version), jhb
MFC after:	1 month
2010-03-19 19:51:03 +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 Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c
init_sysent.c Regenerate 2009-10-27 11:01:15 +00:00
kern_acct.c
kern_alq.c
kern_clock.c Introduce the new kernel thread called "deadlock resolver". 2010-01-09 01:46:38 +00:00
kern_condvar.c
kern_conf.c Fix several style issues. 2010-02-27 15:26:36 +00:00
kern_cons.c
kern_context.c In r197963, a race with thread being selected for signal delivery 2009-10-27 10:47:58 +00:00
kern_cpu.c Free allocated sbufs before returning ENOMEM. 2010-01-08 22:58:50 +00:00
kern_cpuset.c Another nit that both I and ispell missed. 2009-10-26 18:32:06 +00:00
kern_ctf.c
kern_descrip.c On the return path from F_RDAHEAD and F_READAHEAD fcntls, do not 2009-11-20 22:22:53 +00:00
kern_dtrace.c
kern_environment.c Merge change r198561 from projects/mips to head: 2010-01-10 22:34:18 +00:00
kern_event.c Do not leak process lock when current thread is not allowed to see target. 2010-02-14 13:59:01 +00:00
kern_exec.c - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and 2009-10-23 15:14:54 +00:00
kern_exit.c Let access overriding to TTYs depend on the cdev_priv, not the vnode. 2009-12-19 18:42:12 +00:00
kern_fail.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
kern_fork.c
kern_gzio.c Merge projects/enhanced_coredumps (r204346) into HEAD: 2010-03-02 06:58:58 +00:00
kern_idle.c Split P_NOLOAD into a per-thread flag (TDF_NOLOAD). 2009-11-03 16:46:52 +00:00
kern_intr.c KASSERT that return value of interrupt filter complies with contract 2010-01-27 09:59:08 +00:00
kern_jail.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
kern_kthread.c Use the cached value within comparison. 2010-02-19 15:10:05 +00:00
kern_ktr.c Style fixes. 2010-03-11 15:13:55 +00:00
kern_ktrace.c - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and 2009-10-23 15:14:54 +00:00
kern_linker.c - Unbreak build with KLD_DEBUG defined 2009-11-17 21:56:12 +00:00
kern_lock.c Fix typos. 2010-01-07 01:24:09 +00:00
kern_lockf.c
kern_lockstat.c
kern_malloc.c
kern_mbuf.c
kern_mib.c Declare the kern.ngroups sysctl to be read-only, but tunable at boot for 2010-01-12 18:20:20 +00:00
kern_module.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
kern_mtxpool.c
kern_mutex.c - Fix a race in sched_switch() of sched_4bsd. 2010-01-23 15:54:21 +00:00
kern_ntptime.c
kern_osd.c
kern_physio.c
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c For kinfo_proc in kp->ki_siglist, return the set of the signals pending 2010-02-27 15:32:49 +00:00
kern_prot.c Only allocate the space we need before calling kern_getgroups instead 2010-01-15 07:18:46 +00:00
kern_resource.c sched_getparam was just plain broke for time-share 2010-03-03 21:46:51 +00:00
kern_rmlock.c Remove extra spaces (no functional change). 2009-12-25 21:14:05 +00:00
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_shutdown.c MFp4: 2010-02-03 08:42:08 +00:00
kern_sig.c Merge projects/enhanced_coredumps (r204346) into HEAD: 2010-03-02 06:58:58 +00:00
kern_switch.c
kern_sx.c In current code, threads performing an interruptible sleep (on both 2009-12-12 21:31:07 +00:00
kern_synch.c
kern_syscalls.c Introduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and 2010-03-19 10:56:30 +00:00
kern_sysctl.c
kern_tc.c
kern_thr.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
kern_thread.c Inform hwpmc(4) of a thread's impending demise prior to invoking sched_throw(). 2009-10-25 04:34:47 +00:00
kern_time.c
kern_timeout.c Properly fix callout handling by putting all the per-cpu info in 2009-12-14 12:23:46 +00:00
kern_umtx.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
kern_uuid.c
kern_xxx.c
ksched.c sched_getparam was just plain broke for time-share 2010-03-03 21:46:51 +00:00
link_elf_obj.c Kernel module support for mips. 2010-02-18 05:49:52 +00:00
link_elf.c
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh Remove unused LIBCOMPAT keyword from syscalls.master. 2010-02-08 10:02:01 +00:00
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c Split out an invariant in order to better check that newtd, when 2010-01-24 18:16:38 +00:00
sched_ule.c - Fix a race in sched_switch() of sched_4bsd. 2010-01-23 15:54:21 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c Fix comments. 2010-01-04 12:39:42 +00:00
subr_acl_posix1e.c Now that all the callers seem to be fixed, add KASSERTs to make sure VAPPEND 2009-12-26 11:36:10 +00:00
subr_autoconf.c
subr_blist.c
subr_bufring.c
subr_bus.c Spelling nit 2010-02-07 18:00:13 +00:00
subr_clock.c
subr_devstat.c Update d_mmap() to accept vm_ooffset_t and vm_memattr_t. 2009-12-29 21:51:28 +00:00
subr_disk.c
subr_eventhandler.c Split eventhandler_register() into an internal part and a wrapper function 2010-03-19 19:51:03 +00:00
subr_fattime.c
subr_firmware.c Bump up the firmware_table from 30 to 50. bwn needs more than 30, it 2010-03-07 22:37:35 +00:00
subr_hash.c Decompose the most lousy named file in sys/kern; kern_subr.c. 2010-02-21 19:53:33 +00:00
subr_hints.c
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c Make /dev/klog and kern.msgbuf* MPSAFE. 2009-11-03 21:06:19 +00:00
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Document the VM detection type and sysctl a bit better. 2010-03-02 23:57:42 +00:00
subr_pcpu.c
subr_power.c
subr_prf.c Make /dev/klog and kern.msgbuf* MPSAFE. 2009-11-03 21:06:19 +00:00
subr_prof.c
subr_rman.c
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sglist.c
subr_sleepqueue.c Introduce the new kernel thread called "deadlock resolver". 2010-01-09 01:46:38 +00:00
subr_smp.c
subr_stack.c
subr_taskqueue.c - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and 2009-10-23 15:14:54 +00:00
subr_trap.c Current pselect(3) is implemented in usermode and thus vulnerable to 2009-10-27 10:55:34 +00:00
subr_turnstile.c Introduce the new kernel thread called "deadlock resolver". 2010-01-09 01:46:38 +00:00
subr_uio.c Decompose the most lousy named file in sys/kern; kern_subr.c. 2010-02-21 19:53:33 +00:00
subr_unit.c
subr_witness.c SLIP is gone; remove its mutex from witness. 2009-12-29 08:45:27 +00:00
sys_generic.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
sys_pipe.c
sys_process.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
sys_socket.c
syscalls.c Regenerate 2009-10-27 11:01:15 +00:00
syscalls.master Remove unused LIBCOMPAT keyword from syscalls.master. 2010-02-08 10:02:01 +00:00
systrace_args.c Regenerate 2009-10-27 11:01:15 +00:00
sysv_ipc.c Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to 2010-03-19 11:01:51 +00:00
sysv_msg.c Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding 2010-03-19 11:04:42 +00:00
sysv_sem.c Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding 2010-03-19 11:04:42 +00:00
sysv_shm.c Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding 2010-03-19 11:04:42 +00:00
tty_compat.c Make TIOCSTI work again. 2010-01-04 20:59:52 +00:00
tty_info.c
tty_inq.c Remove statistics from the TTY queues. 2010-02-07 15:42:15 +00:00
tty_outq.c Remove statistics from the TTY queues. 2010-02-07 15:42:15 +00:00
tty_pts.c Remove the 1000 pseudo terminal limit from pts(4). 2010-01-13 21:22:23 +00:00
tty_tty.c
tty_ttydisc.c
tty.c Make TIOCSTI work again. 2010-01-04 20:59:52 +00:00
uipc_accf.c (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument. 2009-12-28 22:56:30 +00:00
uipc_cow.c
uipc_debug.c
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c
uipc_mqueue.c Implement compat32 shims for mqueuefs. 2010-03-19 11:10:24 +00:00
uipc_sem.c Implement compat32 shims for ksem syscalls. 2010-03-19 11:08:43 +00:00
uipc_shm.c
uipc_sockbuf.c
uipc_socket.c Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
uipc_syscalls.c Properly handle compat32 calls to sctp generic sendmsd/recvmsg functions that 2010-03-19 10:46:54 +00:00
uipc_usrreq.c
vfs_acl.c Add change that was somehow missed in r192586. It could manifest by 2009-12-03 13:29:24 +00:00
vfs_aio.c Convert aio syscall registration to SYSCALL_INIT_HELPER. 2010-03-19 11:11:34 +00:00
vfs_bio.c
vfs_cache.c
vfs_cluster.c
vfs_default.c Use vput() instead of VOP_UNLOCK()+vrele(). The comment here is out-dated, 2010-02-18 22:14:44 +00:00
vfs_export.c
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c Only audit pathnames in namei(9) if copying the directory string completes 2010-02-02 23:10:27 +00:00
vfs_mount.c - Reduce scope of vnode lock. vfs_mount_alloc() doesn't need vnode to be 2010-02-18 22:22:45 +00:00
vfs_subr.c Add new function vunref(9) that decrements vnode use count (and hold 2010-01-17 21:24:27 +00:00
vfs_syscalls.c Fix a comment nit. 2010-03-11 13:16:06 +00:00
vfs_vnops.c Don't add VAPPEND if the file is not being opened for writing. Note that this 2009-12-08 20:47:10 +00:00
vnode_if.src