summaryrefslogtreecommitdiffstats
path: root/sys/arch/sparc64/include/lock.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Kill SPINLOCK_SPIN_HOOK, use CPU_BUSY_CYCLE() instead.mpi2017-05-291-46/+1
| | | | ok visa@, kettenis@
* Move SPINLOCK_SPIN_HOOK to the header used by other archs in order tompi2017-05-271-3/+61
| | | | | | prepare the terrain for MI locks. ok kettenis@
* make the rwlock implementation MI.dlg2015-02-111-5/+1
| | | | | | | | | | | each arch used to have to provide an rw_cas operation, but now we have the rwlock code build its own version. on smp machines it uses atomic_cas_ulong. on uniproc machines it avoids interlocked instructions by using straight loads and stores. this is safe because rwlocks are only used from process context and processes are currently not preemptible in our kernel. so alpha/ppc/etc might get a benefit. ok miod@ kettenis@ deraadt@
* move sparc64 behind the MI atomic api.dlg2014-01-301-4/+3
| | | | | | | | | | | | | | | this basically replaces sparc64_cas and sparc64_casx with atomic_cas_uint and atomic_cas_ulong respectively. it then builds atomic_add and atomic_sub out of those. this avoids the gcc atomic builtins that the MI atomic_foo api uses by default, so we dont get the extra membars that the builtins do but the atomic_foo api doesnt promise. it also fixes up the code that used to use sparc64_{cas,casx} to use the atomic_cas api instead. use of the sparc64 membar() macros are left untouched for now. ok kettenis@
* remove unused cpu_lock code (where it is truly unused). it is nottedu2013-05-211-47/+1
| | | | part of the future we have planned. middling ok from a few
* Per recommandation in the the sparc docs, use unlocked reads whenguenther2011-07-021-17/+20
| | | | | | spinning on a contended lock. ok kettenis@
* Normalize sentinel. Use _MACHINE_*_H_ and _<ARCH>_*_H_ properly and consitently.pirofti2011-03-231-4/+4
| | | | Discussed and okay drahn@. Okay deraadt@.
* Fix inline assembler to make it acceptable to gcc4. Based on a diff fromkettenis2010-04-271-3/+3
| | | | guenther@ for sparc, pointed out to me by miod@.
* Implement rw_cas correctly, unlike previous revision where I was obviouslymiod2008-05-021-2/+2
| | | | on drugs; ok kettenis@
* Implement an MP-safe rw_cas() based upon the casx instruction; ok kettenis@miod2008-01-011-1/+4
|
* Sprinkle a few holy membars around memory writes.miod2007-11-051-1/+6
| | | | ok kettenis@
* Provide <machine/lock.h> on all platforms, so that MI code may #include itmiod2007-05-011-0/+48
unconditionnaly.