bugfixes for semantic checking; thread implementation pushed the compiler
This commit is contained in:
parent
3260702a60
commit
5008b44467
8 changed files with 153 additions and 125 deletions
|
|
@ -532,7 +532,7 @@ when not defined(useNimRtl):
|
|||
assert(not isAllocatedPtr(allocator, x))
|
||||
|
||||
proc alloc(size: int): pointer =
|
||||
when hasThreadSupport and hasSharedHeap: AquireSys(HeapLock)
|
||||
when hasThreadSupport and hasSharedHeap: AcquireSys(HeapLock)
|
||||
result = unlockedAlloc(size)
|
||||
when hasThreadSupport and hasSharedHeap: ReleaseSys(HeapLock)
|
||||
|
||||
|
|
@ -541,7 +541,7 @@ when not defined(useNimRtl):
|
|||
zeroMem(result, size)
|
||||
|
||||
proc dealloc(p: pointer) =
|
||||
when hasThreadSupport and hasSharedHeap: AquireSys(HeapLock)
|
||||
when hasThreadSupport and hasSharedHeap: AcquireSys(HeapLock)
|
||||
unlockedDealloc(p)
|
||||
when hasThreadSupport and hasSharedHeap: ReleaseSys(HeapLock)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue