comp.lang.ada
 help / color / mirror / Atom feed
* Anyone have an IA-32 locked instruction library for GNAT?
@ 2007-09-03 15:51 Steve
  0 siblings, 0 replies; only message in thread
From: Steve @ 2007-09-03 15:51 UTC (permalink / raw)


The IA-32 processors (and derivatives) support locked forms of the 
instructions:
ADD,  ADC,  AND, BTC,  BTR, BTS, CMPXCHG, CMPXCH8B, DEC, INC, NEG, NOT, OR, 
SBB, SUB, XOR, XADD, and XCHG.

According to Intels' documentation, "In a multiprocessor environment, the 
LOCK# signal insures that the processor has exclusive use of any shared 
memory while the signal is asserted."

By any chance has anyone implemented the inline assembly functions for GNAT 
to make these functions available on IA-32 systems?

The same library shuld work on Linux and Windows.

With the new multi-core processors these instructions can be useful for very 
low overhead task safe access to shared resources.

Regards,
Steve
(The Duck)





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-03 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-03 15:51 Anyone have an IA-32 locked instruction library for GNAT? Steve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox