1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00
freebsd/sys/alpha/include
John Baldwin c6a37e8413 Divorce critical sections from spinlocks. Critical sections as denoted by
critical_enter() and critical_exit() are now solely a mechanism for
deferring kernel preemptions.  They no longer have any affect on
interrupts.  This means that standalone critical sections are now very
cheap as they are simply unlocked integer increments and decrements for the
common case.

Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter()
and spinlock_exit().  This KPI is responsible for providing whatever MD
guarantees are needed to ensure that a thread holding a spin lock won't
be preempted by any other code that will try to lock the same lock.  For
now all archs continue to block interrupts in a "spinlock section" as they
did formerly in all critical sections.  Note that I've also taken this
opportunity to push a few things into MD code rather than MI.  For example,
critical_fork_exit() no longer exists.  Instead, MD code ensures that new
threads have the correct state when they are created.  Also, we no longer
try to fixup the idlethreads for APs in MI code.  Instead, each arch sets
the initial curthread and adjusts the state of the idle thread it borrows
in order to perform the initial context switch.

This change is largely a big NOP, but the cleaner separation it provides
will allow for more efficient alternative locking schemes in other parts
of the kernel (bare critical sections rather than per-CPU spin mutexes
for per-CPU data for example).

Reviewed by:	grehan, cognet, arch@, others
Tested on:	i386, alpha, sparc64, powerpc, arm, possibly more
2005-04-04 21:53:56 +00:00
..
pc These appear to be unused in our tree, so remove them. 2005-01-05 20:50:31 +00:00
_inttypes.h
_limits.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
_stdint.h
_types.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
alpha_cpu.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
asm.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
atomic.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
bootinfo.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
bus_dma.h Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
bus_memio.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
bus_pio.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
bus.h Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
bwx.h
chipset.h
clock.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
clockvar.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
cpu.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
cpuconf.h add cpu_idle support for 21066A based lca systems 2005-01-31 23:07:42 +00:00
cpufunc.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
db_machdep.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
elf.h
endian.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
exec.h Use a common multi-inclusion protection, and add such a 2005-02-19 21:16:48 +00:00
float.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
floatingpoint.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
fpu.h
frame.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
gdb_machdep.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
ieee.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
ieeefp.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
in_cksum.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
inst.h
intr.h
intrcnt.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
ioctl_bt848.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
ioctl_meteor.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
kdb.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
limits.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
md_var.h
memdev.h Remove extraneous ';'. 2004-08-01 18:51:44 +00:00
mutex.h
pal.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
param.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
pcb.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
pcpu.h - Add a new MD per-CPU field for Alpha 'pal_id' which is the PAL ID 2004-11-05 19:16:44 +00:00
pmap.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
proc.h Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00
profile.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
prom.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
pte.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
ptrace.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
reg.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
reloc.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
resource.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
rpb.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
runq.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
setjmp.h
sf_buf.h
sgmap.h
sigframe.h
signal.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
smp.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
stdarg.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
swiz.h
sysarch.h
ucontext.h
varargs.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
vmparam.h Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00