1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/sys/kern
Poul-Henning Kamp b39be1b35c Add two new functions to convert FAT filesystem format timestamps
to and from struct timespec, to replace the crummy conversion
function which have been copy&pasted into three different
filesystems already.

Apart from general crummyness as indicated by code like:

	for (year = 1970;; year++) {
		inc = year & 0x03 ? 365 : 366;
		if (days < inc)
			break;
		days -= inc;
	}

They also contain specialized crummyness which tries to compensate
for the general crummyness by caching recent conversion results,
with no regard for locking or consistency.

These replacement functions are smaller, O(1) and handle the Y2.1K
leap-year correctly.

Ideally, these functions should live in a module of their own,
which the three offending filesystems would depend on, but the
size is 877 bytes of code (on i386), so that would be false
economy.
2006-10-22 18:19:08 +00:00
..
bus_if.m - Revert making bus_generic_add_child() the default for BUS_ADD_CHILD(). 2006-09-11 22:20:37 +00:00
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
init_sysent.c Regenerate. 2006-10-17 02:28:58 +00:00
kern_acct.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_acl.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_alq.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_clock.c
kern_condvar.c
kern_conf.c Fix the race between devfs_fp_check and devfs_reclaim. Derefence the 2006-10-20 07:59:50 +00:00
kern_context.c
kern_cpu.c
kern_descrip.c return EBADF instead of successfully attaching (and then panicing) when 2006-09-24 02:29:53 +00:00
kern_environment.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_event.c remove unnecessary NULL check... 2006-09-25 01:29:48 +00:00
kern_exec.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_exit.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_fork.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_idle.c
kern_intr.c kern_intr.c: 2006-10-18 04:48:09 +00:00
kern_jail.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_kse.c
kern_kthread.c
kern_ktr.c Remove slightly oddly placed suser() call from the KTR/ALQ setup sysctl: 2006-09-09 16:09:01 +00:00
kern_ktrace.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_linker.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_lock.c If the buffer lock has waiters after the buffer has changed identity then 2006-10-02 02:06:27 +00:00
kern_lockf.c
kern_mac.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_malloc.c Remove old kern.malloc sysctl, which generated a text representation of 2006-07-23 19:55:41 +00:00
kern_mbuf.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_mib.c
kern_module.c Address a problem I missed in removing Giant from the kernel linker. Not 2006-06-26 18:34:45 +00:00
kern_mtxpool.c
kern_mutex.c - When spinning on a spin lock, if the debugger is active or we are in a 2006-08-15 18:26:12 +00:00
kern_ntptime.c
kern_physio.c
kern_pmc.c
kern_poll.c
kern_proc.c Remove duplicated $FreeBSD$. 2006-09-30 16:33:29 +00:00
kern_prot.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_resource.c Replace system call thr_getscheduler, thr_setscheduler, thr_setschedparam 2006-09-21 04:18:46 +00:00
kern_rwlock.c Adjust td_locks for non-spin mutexes, rwlocks, and sx locks so that it is 2006-07-27 21:45:55 +00:00
kern_sema.c
kern_shutdown.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_sig.c Use macro TAILQ_FOREACH_SAFE instead of expanding it. 2006-10-22 00:09:41 +00:00
kern_subr.c Reduce the scope of the page queues lock in vm_pgmoveco() now that 2006-08-12 19:47:49 +00:00
kern_switch.c
kern_sx.c Add a new 'show sleepchain' ddb command similar to 'show lockchain' except 2006-08-15 18:29:01 +00:00
kern_synch.c
kern_syscalls.c Make system call modules a bit more robust: 2006-08-01 16:32:20 +00:00
kern_sysctl.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_tc.c Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
kern_thr.c Add compatible code to let 32bit libthr work on 64bit kernel. 2006-09-22 15:04:28 +00:00
kern_thread.c This is initial version of POSIX priority mutex support, a new userland 2006-08-28 04:24:51 +00:00
kern_time.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
kern_timeout.c Improve ktr(4) logging for callout(9) subsystem. Log all inserts and 2006-10-11 14:57:03 +00:00
kern_umtx.c o Add keyword volatile for user mutex owner field. 2006-10-17 02:24:47 +00:00
kern_uuid.c Separate functions with a newline. 2006-07-17 21:00:42 +00:00
kern_xxx.c
ksched.c Return priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for 2006-07-12 05:54:17 +00:00
link_elf_obj.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
link_elf.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
linker_if.m
Make.tags.inc
Makefile Add support for the generated file systrace_args.c. 2006-08-05 19:25:14 +00:00
makesyscalls.sh Add a new set of macros <prefix>_AUE_<syscallname> to sysproto.h that 2006-08-15 17:09:32 +00:00
md4c.c
md5c.c
p1003_1b.c Backout the feature which can change thread's scheduling option, I really 2006-07-13 06:41:26 +00:00
posix4_mib.c
sched_4bsd.c Add user priority loaning code to support priority propagation for 2006-08-25 06:12:53 +00:00
sched_core.c Add user priority loaning code to support priority propagation for 2006-08-25 06:12:53 +00:00
sched_ule.c Add user priority loaning code to support priority propagation for 2006-08-25 06:12:53 +00:00
serdev_if.m
subr_acl_posix1e.c Update and reformat comments for POSIX.1e ACL utility routines. 2006-07-23 19:35:10 +00:00
subr_autoconf.c Add a mutex to protect the list of interrupt config hooks. We do assume 2006-07-19 18:53:56 +00:00
subr_blist.c
subr_bus.c Add a default method for BUS_ADD_CHILD() that just calls 2006-09-11 19:41:31 +00:00
subr_clist.c
subr_clock.c Use utc_offset() where applicable, and hide the internals of it 2006-10-02 18:23:37 +00:00
subr_devstat.c
subr_disk.c
subr_eventhandler.c
subr_fattime.c Add two new functions to convert FAT filesystem format timestamps 2006-10-22 18:19:08 +00:00
subr_firmware.c
subr_hints.c Use a sleep mutex instead of an sx lock for the kernel environment. This 2006-07-09 21:42:58 +00:00
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c
subr_power.c
subr_prf.c Declare security and security.bsd sysctl hierarchies in sysctl.h along 2006-09-17 20:00:36 +00:00
subr_prof.c
subr_rman.c - Fix rman_manage_region() to be a lot more intelligent. It now checks 2006-09-11 19:31:52 +00:00
subr_rtc.c Use utc_offset() where applicable, and hide the internals of it 2006-10-02 18:23:37 +00:00
subr_sbuf.c
subr_scanf.c
subr_sleepqueue.c
subr_smp.c
subr_stack.c
subr_taskqueue.c
subr_trap.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
subr_turnstile.c Add a new 'show sleepchain' ddb command similar to 'show lockchain' except 2006-08-15 18:29:01 +00:00
subr_unit.c
subr_witness.c Introduce a spinlock for synchronizing access to the video output hardware 2006-09-13 15:48:15 +00:00
sys_generic.c Prevent IOC_IN with zero size argument (this is only supported 2006-10-14 19:01:55 +00:00
sys_pipe.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
sys_process.c Close a race condition where num can be larger than tmp, giving the user 2006-10-14 10:30:14 +00:00
sys_socket.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
syscalls.c Regenerate. 2006-10-17 02:28:58 +00:00
syscalls.master o Add keyword volatile for user mutex owner field. 2006-10-17 02:24:47 +00:00
systrace_args.c Regenerate. 2006-10-17 02:28:58 +00:00
sysv_ipc.c
sysv_msg.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
sysv_sem.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
sysv_shm.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
tty_compat.c
tty_conf.c
tty_cons.c
tty_pts.c Free tty struct after last close. This should fix the pty-leak by numbers. 2006-09-29 09:53:19 +00:00
tty_pty.c Back out part of rev. 1.149. While adding a workaround in ptcopen() to 2006-10-04 05:43:39 +00:00
tty_subr.c
tty_tty.c Use ctty instead of just returning. ctty just has a simple open that 2006-09-27 16:41:15 +00:00
tty.c Any call of tty_close() with a tty refcount of <= 1 is wrong and we will 2006-09-30 08:11:51 +00:00
uipc_accf.c
uipc_cow.c
uipc_domain.c soreceive_generic(), and sopoll_generic(). Add new functions sosend(), 2006-07-24 15:20:08 +00:00
uipc_mbuf2.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
uipc_mbuf.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
uipc_mqueue.c Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag. 2006-09-26 04:12:49 +00:00
uipc_sem.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
uipc_sockbuf.c Use sysctl_handle_long() instead of duplicating it's logic for 2006-09-06 21:59:36 +00:00
uipc_socket2.c Change two XXX's to two notes: the fact that SOCK_LOCK(so) == 2006-08-02 16:23:52 +00:00
uipc_socket.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
uipc_syscalls.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
uipc_usrreq.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_acl.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_aio.c MFP4 (with some minor changes): 2006-10-15 14:22:14 +00:00
vfs_bio.c Replace PG_BUSY with VPO_BUSY. In other words, changes to the page's 2006-10-22 04:28:14 +00:00
vfs_cache.c
vfs_cluster.c Replace PG_BUSY with VPO_BUSY. In other words, changes to the page's 2006-10-22 04:28:14 +00:00
vfs_default.c Don't try to obtain a reference to a nonexisting (NULL) mount structure in 2006-09-20 00:27:02 +00:00
vfs_export.c Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag. 2006-09-26 04:12:49 +00:00
vfs_extattr.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_hash.c
vfs_init.c Remove duplicate security checks already performed in kern_kldload(). 2006-06-26 18:33:32 +00:00
vfs_lookup.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_mount.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_subr.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_syscalls.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vfs_vnops.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
vnode_if.src