Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #64 from dsimcha/master
Browse files Browse the repository at this point in the history
core.atomic.isFloatingPoint should be private
  • Loading branch information
complexmath committed Aug 31, 2011
2 parents b4a3ec7 + 2415332 commit 3440de4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/core/atomic.d
Expand Up @@ -338,7 +338,7 @@ else version( AsmX86_32 )


HeadUnshared!(T) atomicLoad(msync ms = msync.seq, T)( ref const shared T val )
if(!isFloatingPoint!(T))
if(!__traits(isFloating, T))
{
static if( T.sizeof == byte.sizeof )
{
Expand Down Expand Up @@ -749,7 +749,7 @@ else version( AsmX86_64 )


HeadUnshared!(T) atomicLoad(msync ms = msync.seq, T)( ref const shared T val )
if(!isFloatingPoint!(T)) {
if(!__traits(isFloating, T)) {
static if( T.sizeof == byte.sizeof )
{
//////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -975,17 +975,12 @@ else version( AsmX86_64 )
}
}

template isFloatingPoint(T)
{
enum isFloatingPoint = __traits(isFloating, T);
}

// This is an ABI adapter that works on all architectures. It type puns
// floats and doubles to ints and longs, atomically loads them, then puns
// them back. This is necessary so that they get returned in floating
// point instead of integer registers.
HeadUnshared!(T) atomicLoad(msync ms = msync.seq, T)( ref const shared T val )
if(isFloatingPoint!(T))
if(__traits(isFloating, T))
{
static if(T.sizeof == int.sizeof)
{
Expand Down

0 comments on commit 3440de4

Please sign in to comment.