Merge branch 'devel' of https://github.com/Araq/Nimrod into devel

This commit is contained in:
Araq 2014-11-10 01:33:35 +01:00
commit 9df3d9c4d3
2 changed files with 1 additions and 12 deletions

View file

@ -1061,8 +1061,7 @@ proc genMainProc(m: BModule) =
gBreakpoints.app(m.genFilenames) gBreakpoints.app(m.genFilenames)
let initStackBottomCall = let initStackBottomCall =
if emulatedThreadVars() or if platform.targetOS == osStandalone: "".toRope
platform.targetOS == osStandalone: "".toRope
else: ropecg(m, "\t#initStackBottomWith((void *)&inner);$N") else: ropecg(m, "\t#initStackBottomWith((void *)&inner);$N")
inc(m.labels) inc(m.labels)
appcg(m, m.s[cfsProcs], PreMainBody, [ appcg(m, m.s[cfsProcs], PreMainBody, [

View file

@ -116,16 +116,6 @@ else:
proc pthread_cancel(a1: TSysThread): cint {. proc pthread_cancel(a1: TSysThread): cint {.
importc: "pthread_cancel", header: "<pthread.h>".} importc: "pthread_cancel", header: "<pthread.h>".}
proc acquireSysTimeoutAux(L: var TSysLock, timeout: var Ttimespec): cint {.
importc: "pthread_mutex_timedlock", header: "<time.h>".}
proc acquireSysTimeout(L: var TSysLock, msTimeout: int) {.inline.} =
var a: Ttimespec
a.tv_sec = msTimeout div 1000
a.tv_nsec = (msTimeout mod 1000) * 1000
var res = acquireSysTimeoutAux(L, a)
if res != 0'i32: raise newException(EResourceExhausted, $strerror(res))
type type
TThreadVarSlot {.importc: "pthread_key_t", pure, final, TThreadVarSlot {.importc: "pthread_key_t", pure, final,
header: "<sys/types.h>".} = object header: "<sys/types.h>".} = object