freebsd-src/sys/kern
Tom Rhodes a122cca953 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
 - in_cksum.[ch]:
   * use a generic C version instead of the assembly version in the !gcc
     case (ASM code breaks with the optimizations icc does)
     -> no bad checksums with an icc compiled kernel
     Help from:		andre, grehan, das
     Stolen from: 	alpha version via ppc version
     The entire checksum code should IMHO be replaced with the DragonFly
     version (because it isn't guaranteed future revisions of gcc will
     include similar optimizations) as in:
        ---snip---
          Revision  Changes    Path
          1.12      +1 -0      src/sys/conf/files.i386
          1.4       +142 -558  src/sys/i386/i386/in_cksum.c
          1.5       +33 -69    src/sys/i386/include/in_cksum.h
          1.5       +2 -0      src/sys/netinet/igmp.c
          1.6       +0 -1      src/sys/netinet/in.h
          1.6       +2 -0      src/sys/netinet/ip_icmp.c

          1.4       +3 -4      src/contrib/ipfilter/ip_compat.h
          1.3       +1 -2      src/sbin/natd/icmp.c
          1.4       +0 -1      src/sbin/natd/natd.c
          1.48      +1 -0      src/sys/conf/files
          1.2       +0 -1      src/sys/conf/files.amd64
          1.13      +0 -1      src/sys/conf/files.i386
          1.5       +0 -1      src/sys/conf/files.pc98
          1.7       +1 -1      src/sys/contrib/ipfilter/netinet/fil.c
          1.10      +2 -3      src/sys/contrib/ipfilter/netinet/ip_compat.h
          1.10      +1 -1      src/sys/contrib/ipfilter/netinet/ip_fil.c
          1.7       +1 -1      src/sys/dev/netif/txp/if_txp.c
          1.7       +1 -1      src/sys/net/ip_mroute/ip_mroute.c
          1.7       +1 -2      src/sys/net/ipfw/ip_fw2.c
          1.6       +1 -2      src/sys/netinet/igmp.c
          1.4       +158 -116  src/sys/netinet/in_cksum.c
          1.6       +1 -1      src/sys/netinet/ip_gre.c
          1.7       +1 -2      src/sys/netinet/ip_icmp.c
          1.10      +1 -1      src/sys/netinet/ip_input.c
          1.10      +1 -2      src/sys/netinet/ip_output.c
          1.13      +1 -2      src/sys/netinet/tcp_input.c
          1.9       +1 -2      src/sys/netinet/tcp_output.c
          1.10      +1 -1      src/sys/netinet/tcp_subr.c
          1.10      +1 -1      src/sys/netinet/tcp_syncache.c
          1.9       +1 -2      src/sys/netinet/udp_usrreq.c

          1.5       +1 -2      src/sys/netinet6/ipsec.c
          1.5       +1 -2      src/sys/netproto/ipsec/ipsec.c
          1.5       +1 -1      src/sys/netproto/ipsec/ipsec_input.c
          1.4       +1 -2      src/sys/netproto/ipsec/ipsec_output.c

          and finally remove
            sys/i386/i386        in_cksum.c
            sys/i386/include     in_cksum.h
        ---snip---
 - endian.h:
   * DTRT in C++ mode
 - quad.h:
   * we don't use gcc v1 anymore, remove support for it
   Suggested by:	bde (long ago)
 - assym.h:
   * avoid zero-length arrays (remove dependency on a gcc specific
     feature)
     This change changes the contents of the object file, but as it's
     only used to generate some values for a header, and the generator
     knows how to handle this, there's no impact in the gcc case.
   Explained by:	bde
   Submitted by:	Marius Strobl <marius@alchemy.franken.de>
 - aicasm.c:
   * minor change to teach it about the way icc spells "-nostdinc"
   Not approved by:	gibbs (no reply to my mail)
 - bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	-arch
Submitted by:	netchild
2004-03-12 21:45:33 +00:00
..
bus_if.m Introduce BUS_CONFIG_INTR(). The method allows devices to tell parents 2003-09-10 21:37:10 +00:00
clock_if.m
device_if.m
genassym.sh
imgact_aout.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
imgact_elf.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
imgact_elf32.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
imgact_elf64.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
imgact_gzip.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
imgact_shell.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
inflate.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
init_main.c Loudly announce WITNESS and DIAGNOSTIC options and warn about reduced 2004-02-29 16:56:54 +00:00
init_sysent.c Regen after adding ksem_timedwait(). 2004-02-03 05:11:31 +00:00
kern_acct.c Fixed some style bugs (mainly misplaced comments, and totally disordered 2004-03-04 09:47:09 +00:00
kern_acl.c Update my personal copyrights and NETA copyrights in the kernel 2004-02-22 00:33:12 +00:00
kern_alq.c Allow MAC policies to block/revoke kern_alq write access to a file. 2003-10-25 16:10:41 +00:00
kern_clock.c Make sure to disable the watchdog if we cannot honour the timeout. 2004-02-28 22:01:19 +00:00
kern_condvar.c - Remove old sleep queues. 2004-03-12 19:06:18 +00:00
kern_conf.c Correctly account for extra bits in unit numbers when looking for 2004-03-11 14:11:02 +00:00
kern_context.c Change the clear_ret argument of get_mcontext() to be a flags argument. 2003-11-09 20:31:04 +00:00
kern_descrip.c Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
kern_environment.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
kern_event.c Make sure to wake up any select waiters when closing a kqueue (also, not 2004-02-20 04:00:48 +00:00
kern_exec.c Do what the execve(2) manpage says and enforce what a Strictly 2004-03-12 21:06:20 +00:00
kern_exit.c - Push down Giant in exit() and wait(). 2004-03-05 22:39:53 +00:00
kern_fork.c make sure we had the filedesc lock when calling fdinit when RFCFDG is set 2004-03-10 00:27:36 +00:00
kern_idle.c Always set a process' state to normal when it is fully constructed in 2004-02-05 21:01:37 +00:00
kern_intr.c kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
kern_jail.c Rework jail_attach(2) so that an already jailed process cannot hop 2004-02-19 21:03:20 +00:00
kern_kse.c Check for TDF_SINTR before calling sleepq_abort() as there is a narrow 2004-03-01 23:07:58 +00:00
kern_kthread.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
kern_ktr.c Update the license on this file to be a bit more sane. 2003-09-10 01:09:32 +00:00
kern_ktrace.c Replace the ktrace queue's semaphore with a condition variable instead as 2004-02-26 19:30:22 +00:00
kern_linker.c Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
kern_lock.c Add pid to the info printed in lockmgr_printinfo. This makes VFS 2004-01-06 04:34:13 +00:00
kern_lockf.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
kern_mac.c Update my personal copyrights and NETA copyrights in the kernel 2004-02-22 00:33:12 +00:00
kern_malloc.c Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To 2004-01-27 15:59:38 +00:00
kern_mib.c Change all SYSCTLS which are readonly and have a related TUNABLE 2003-10-21 18:28:36 +00:00
kern_module.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
kern_mtxpool.c Rearrange the SYSINIT order to call lockmgr_init() earlier so that 2003-07-16 01:00:39 +00:00
kern_mutex.c Add a reset sysctl for mutex profiling: zeros all of the mutex 2004-01-28 22:11:53 +00:00
kern_ntptime.c Deal with MOD_FREQUENCY before MOD_OFFSET because the latter is the 2004-01-24 21:48:43 +00:00
kern_physio.c Send B_PHYS out to pasture, it no longer serves any function. 2003-11-15 09:28:09 +00:00
kern_poll.c - Add a flags parameter to mi_switch. The value of flags may be SW_VOL or 2004-01-25 03:54:52 +00:00
kern_proc.c Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
kern_prot.c Don't grab Giant in crfree(), since prison_free() no longer requires it. 2004-01-23 21:07:52 +00:00
kern_resource.c Argh! Fix a bogon. lim_cur() was returning the hard (max) limit rather 2004-02-11 18:04:13 +00:00
kern_sema.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
kern_shutdown.c - Add a flags parameter to mi_switch. The value of flags may be SW_VOL or 2004-01-25 03:54:52 +00:00
kern_sig.c - Push down Giant in exit() and wait(). 2004-03-05 22:39:53 +00:00
kern_subr.c Rename iov_to_uio to uiofromiov to be more consistent with other 2004-02-04 08:43:21 +00:00
kern_switch.c - style fixes to the critical_exit() KASSERT(). 2004-02-02 08:13:27 +00:00
kern_sx.c Fix _sx_assert() to panic() rather than printf() when an assertion fails 2004-02-27 16:13:44 +00:00
kern_synch.c - Remove old sleep queues. 2004-03-12 19:06:18 +00:00
kern_syscalls.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
kern_sysctl.c Undo the merger of mlock()/vslock and munlock()/vsunlock() and the 2004-03-05 22:03:11 +00:00
kern_tc.c Just because the timecounter reads the same value on two samples 2004-03-04 14:14:23 +00:00
kern_thr.c Update powerpc to use the (old thread,new thread) calling convention 2003-08-14 03:56:24 +00:00
kern_thread.c Check for TDF_SINTR before calling sleepq_abort() as there is a narrow 2004-03-01 23:07:58 +00:00
kern_time.c constify the second args to timevaladd() and timevalsub(). 2003-10-26 02:19:00 +00:00
kern_timeout.c Make the DIAGNOSTIC code which complains about long {call|time}out(9) 2003-12-07 20:03:28 +00:00
kern_umtx.c Return EINVAL if the contested bit is not set on the umtx passed to 2003-09-07 11:14:52 +00:00
kern_uuid.c Fix generation of random multicast MAC address. 2004-01-22 13:34:11 +00:00
kern_xxx.c Correct mostly harmless off-by-one error in getdomainname(). 2003-09-13 17:12:22 +00:00
ksched.c sched_setscheduler: Return EINVAL when a invalid policy is specified, 2003-09-13 18:46:24 +00:00
link_elf.c Add the mlockall() and munlockall() system calls. 2003-08-11 07:14:08 +00:00
link_elf_obj.c Add the mlockall() and munlockall() system calls. 2003-08-11 07:14:08 +00:00
linker_if.m The method link_preload_finish is not static. 2003-09-20 17:39:32 +00:00
Make.tags.inc Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
Makefile Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
makesyscalls.sh Remove the namespace column from the syscalls tables. We don't actually 2003-12-23 03:50:43 +00:00
md4c.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
md5c.c Revert stuff which accidentally ended up in the previous commit. 2003-07-22 10:36:36 +00:00
p1003_1b.c Use __FBSDID(). 2003-06-11 06:34:30 +00:00
posix4_mib.c Use __FBSDID(). 2003-06-11 06:34:30 +00:00
sched_4bsd.c The roundrobin callout from sched_4bsd is MPSAFE, so set up the 2004-03-05 19:27:04 +00:00
sched_ule.c Switch the sleep/wakeup and condition variable implementations to use the 2004-02-27 18:52:44 +00:00
subr_acl_posix1e.c Update my personal copyrights and NETA copyrights in the kernel 2004-02-22 00:33:12 +00:00
subr_autoconf.c Revert stuff which accidentally ended up in the previous commit. 2003-07-22 10:36:36 +00:00
subr_blist.c Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon's 2003-08-12 23:24:05 +00:00
subr_bus.c Whitespace cleanup 2004-02-24 19:31:30 +00:00
subr_clist.c Revert stuff which accidentally ended up in the previous commit. 2003-07-22 10:36:36 +00:00
subr_clock.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_devstat.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
subr_disk.c Report bio_pblkbo instead of bio_blkno. 2003-10-18 17:27:10 +00:00
subr_eventhandler.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_hints.c Add a resource_disabled() helper function that returns true (non-zero) if 2003-07-02 16:01:38 +00:00
subr_kobj.c * Add multiple inheritance to kobj. Each class can have zero or more base 2003-10-16 09:16:28 +00:00
subr_log.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
subr_mbpool.c Pass MTX_DEF as the last argument to mtx_init() instead of 0. This 2003-12-07 21:53:41 +00:00
subr_mbuf.c Track current and peak sfbuf usage, export the values via sysctl. 2003-12-27 07:52:47 +00:00
subr_mchain.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_module.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_msgbuf.c Put the message about msgbuf cksum mismatch under bootverbose and tell 2003-09-05 11:12:00 +00:00
subr_param.c More pipe changes: 2003-08-11 05:51:51 +00:00
subr_pcpu.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_power.c Move the kernel power change printf under bootverbose since the 2004-01-02 18:24:13 +00:00
subr_prf.c Add support for 'h' and 'hh' modifiers for printf(9). 2004-02-19 05:29:39 +00:00
subr_prof.c These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
subr_rman.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_rtc.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_sbuf.c Mechanical whistespace cleanup. 2004-02-17 10:21:03 +00:00
subr_scanf.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
subr_sleepqueue.c - Remove old sleep queues. 2004-03-12 19:06:18 +00:00
subr_smp.c This is a temporary fix to solve a regression issue on sparc64 that 2004-03-12 20:35:21 +00:00
subr_taskqueue.c Tidy up the thread taskqueue implementation and close a lost wakeup race. 2004-02-19 22:03:52 +00:00
subr_trap.c Put "failed to set signal flags properly for ast()" check under 2004-03-05 17:35:28 +00:00
subr_turnstile.c Fixup a comment. 2004-03-12 19:05:46 +00:00
subr_witness.c Add an implementation of a generic sleep queue abstraction that is used 2004-02-27 18:33:09 +00:00
sys_generic.c Switch the sleep/wakeup and condition variable implementations to use the 2004-02-27 18:52:44 +00:00
sys_pipe.c Assert pipe mutex in pipeselwakeup(), as we manipulate pipe_state 2004-02-26 00:18:22 +00:00
sys_process.c When reparenting a process in the PT_DETACH code, only set p_sigparent 2004-02-19 10:39:42 +00:00
sys_socket.c Initialize struct fileops with C99 sparse initialization. 2003-06-18 18:16:40 +00:00
syscalls.c Regen after adding ksem_timedwait(). 2004-02-03 05:11:31 +00:00
syscalls.master Add ksem_timedwait() to complement ksem_wait(). 2004-02-03 05:08:32 +00:00
sysv_ipc.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
sysv_msg.c Slight whitespace consistency improvement: 2003-11-07 04:47:14 +00:00
sysv_sem.c Reduce the overhead of semop() by using the kernel stack instead of 2003-12-19 13:07:17 +00:00
sysv_shm.c Correct a reference counting bug in shmat(2). If vm_map_find(9) 2004-02-05 18:00:35 +00:00
tty.c Device megapatch 3/6: 2004-02-21 20:41:11 +00:00
tty_compat.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
tty_conf.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
tty_cons.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
tty_pty.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
tty_subr.c Revert stuff which accidentally ended up in the previous commit. 2003-07-22 10:36:36 +00:00
tty_tty.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
uipc_accf.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
uipc_cow.c Handle sf_buf_alloc() returning null. This can happen if the 2004-01-17 21:16:51 +00:00
uipc_domain.c move domain list mutex initialization to earlier in the boot sequence so 2003-09-02 20:59:23 +00:00
uipc_jumbo.c Lock the vm object when removing a page. 2003-06-11 21:23:04 +00:00
uipc_mbuf.c Style fixes: don't indent variable names. 2004-02-05 08:29:27 +00:00
uipc_mbuf2.c m_tag fixups in preparation for heavier use: 2004-01-02 17:27:39 +00:00
uipc_proto.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
uipc_sem.c Add ksem_timedwait() to complement ksem_wait(). 2004-02-03 05:08:32 +00:00
uipc_sockbuf.c Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
uipc_socket.c Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
uipc_socket2.c Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
uipc_syscalls.c Remove unneeded label 'done2' from socket(). We now grab Giant 2004-03-04 01:57:48 +00:00
uipc_usrreq.c Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
vfs_acl.c Update my personal copyrights and NETA copyrights in the kernel 2004-02-22 00:33:12 +00:00
vfs_aio.c Send B_PHYS out to pasture, it no longer serves any function. 2003-11-15 09:28:09 +00:00
vfs_bio.c Replace a manual check of a VMIO candidate with vn_canvmio(). This 2004-03-12 12:02:12 +00:00
vfs_cache.c - Apply a big giant lock around the namecache. This has been sitting in 2003-10-05 07:13:50 +00:00
vfs_cluster.c Update the statfs structure with 64-bit fields to allow 2003-11-12 08:01:40 +00:00
vfs_default.c Remove mntvnode_mtx and replace it with per-mountpoint mutex. 2003-11-05 04:30:08 +00:00
vfs_export.c Guard against MLEN growing larger than a uint8_t due to MSIZE grwoing to a 2003-07-26 07:23:24 +00:00
vfs_extattr.c Add two new sysctls: 2004-03-08 20:37:25 +00:00
vfs_init.c Remove opv_desc_vector from vfs_add_vnodeops, since it is defined 2004-02-15 17:27:33 +00:00
vfs_lookup.c Use __FBSDID(). 2003-06-11 00:56:59 +00:00
vfs_mount.c Remove unused mnt_reservedvnlist field. 2004-03-11 16:59:57 +00:00
vfs_subr.c Properly vector all bwrite() and BUF_WRITE() calls through the same path 2004-03-11 18:02:36 +00:00
vfs_syscalls.c Add two new sysctls: 2004-03-08 20:37:25 +00:00
vfs_vnops.c v_vxproc was a bogus name for a thread (pointer). 2003-12-28 09:12:56 +00:00
vnode_if.src Rename VOP_RMEXTATTR() to VOP_DELETEEXTATTR() for consistency with the 2003-07-28 18:53:29 +00:00