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 #297 from redstar/threadimport
Browse files Browse the repository at this point in the history
Move place of 'import core.sys.posix.sys.mman'.
  • Loading branch information
andralex committed Sep 30, 2012
2 parents e16ce9e + 306fe9a commit 54751e3
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/core/thread.d
Expand Up @@ -3924,23 +3924,26 @@ private:
// global context list.
Thread.remove( m_ctxt );

import core.sys.posix.sys.mman; // munmap

static if( __traits( compiles, VirtualAlloc ) )
{
VirtualFree( m_pmem, 0, MEM_RELEASE );
}
else static if( __traits( compiles, mmap ) )
{
munmap( m_pmem, m_size );
}
else static if( __traits( compiles, valloc ) )
{
free( m_pmem );
}
else static if( __traits( compiles, malloc ) )
else
{
free( m_pmem );
import core.sys.posix.sys.mman; // munmap

static if( __traits( compiles, mmap ) )
{
munmap( m_pmem, m_size );
}
else static if( __traits( compiles, valloc ) )
{
free( m_pmem );
}
else static if( __traits( compiles, malloc ) )
{
free( m_pmem );
}
}
m_pmem = null;
m_ctxt = null;
Expand Down

0 comments on commit 54751e3

Please sign in to comment.