Atomic operations on i386/amd64

Ville-Pertti Keinonen will+freebsd-current at will.iki.fi
Fri Aug 6 01:30:07 PDT 2004


Bruce M Simpson wrote:

>Have a look at Linux. They ended up doing a runtime self-modifying kernel
>hack so they could ship generic kernels which used the appropriate locking
>instructions on each x86 family CPU.
>  
>
The idea of using self-modification to select locking modes (although 
for optional preemption, SMP and debugging rather than CPU model) is 
also described in a DEC Technical Journal article:

http://research.compaq.com/wrl/DECarchives/DTJ/DTJF03/DTJF03SC.TXT

I'm not sure whether the Linux implementation uses the same technique.



More information about the freebsd-current mailing list