[M3devel] atomics questions

Tony Hosking hosking at cs.purdue.edu
Fri Feb 12 15:42:04 CET 2010


No, the values must have the same BITSIZE or you get an error.

Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484




On 12 Feb 2010, at 03:45, Jay K wrote:

> loophole allows for union, right?
> I know there is widechar, point was, if some hypothetical platform without atomic widechar.
>  
>  - Jay
> 
>  
> From: hosking at cs.purdue.edu
> Date: Thu, 11 Feb 2010 11:53:24 -0500
> To: jay.krell at cornell.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] atomics questions
> 
> On 11 Feb 2010, at 07:11, Jay K wrote:
> 
> What if some atomic operations aren't available?
>  
>  
> If none are available, then they can all fallback to one giant lock.
>  
> 
> Correct.
> 
>  
> But what if some are and some aren't?
> 
> 
> 
> A lock per type?
> 
> Yes.  Definitely.  No unions in M3.
> 
>  
> That fails with like
>  union {
>   short s[2];
>   int i;
> } u;
>  
>  
> and platform has atomic int but not atomic short.
> 
> We do have atomic WIDECHARl
> 
>  
>  
>  - Jay
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100212/7b973327/attachment-0002.html>


More information about the M3devel mailing list