Commit Graph

7 Commits

Author SHA1 Message Date
cognet
c2900a7a3b We have an asm version of bcmp(), so we could use it as well. 2005-04-12 22:46:09 +00:00
cognet
07598426f2 Get more love from GEOM on arm. 2005-04-07 22:06:56 +00:00
jhb
41cadaa11e 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
cognet
d64d5a2922 Add arm/mem.c. 2004-11-22 22:20:50 +00:00
cognet
d7cb4c8beb Remove libkern/mem* 2004-05-14 23:42:54 +00:00
cognet
64a760cc35 Remove libkern/bzero.S and libkern/memset.S. 2004-05-14 23:31:36 +00:00
cognet
e4128057bf Add config magic for arm. 2004-05-14 11:49:40 +00:00