[M3devel] Atomic

Jay K jay.krell at cornell.edu
Wed Dec 23 23:50:52 CET 2009


Can/should we have something like AtomicWordPair or AtomicWordArray2?

 

TYPE WordPair = RECORD a,b: Word.T END;

or TYPE WordArray2 = ARRAY[0..1] of Word.T;

 

Because modern x86 and very modern AMD64 can support Atomic.CompareExchange(WordPair).

 

I kind of think there should also be AtomicShort or AtomicInt16 for completeness.

I realize WideChar covers it, but then, char==boolean also, right?

I forget what BYTESIZE(BOOLEAN) is actually. The obvious candidates are 1 and BYTESIZE(INTEGER) and 4 ("int").

 

For that matter..there aren't clearly 32bit operations on 64bit platforms (depending upon boolean).

Which all goes to my earlier repeated point.. Atomic8, Atomic16, Atomic32, Atomic64, Atomic128, AtomicInt = Atomic32 or Atomic64, AtomicLongInt = Atomic64, AtomicWideChar = Atomic16, AtomicBool = Atomic8 or AtomicInt...

 

 - Jay


 
> Date: Wed, 23 Dec 2009 23:39:13 +0000
> To: m3commit at elegosoft.com
> From: hosking at elego.de
> Subject: [M3commit] CVS Update: cm3
> 
> CVSROOT: /usr/cvs
> Changes by: hosking at birch. 09/12/23 23:39:13
> 
> Added files:
> cm3/m3-libs/m3core/src/atomic/: Atomic.ig AtomicAddress.i3 
> AtomicBoolean.i3 AtomicChar.i3 
> AtomicInteger.i3 
> AtomicLongint.i3 AtomicRefany.i3 
> AtomicWideChar.i3 AtomicWord.i3 
> 
> Log message:
> Working up the Atomic interface. Comments welcome.
> No implementation yet, so don't try using these... you'll get linkage errors.
> But they do compile. ;-)
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091223/cea794a1/attachment-0001.html>


More information about the M3devel mailing list