Remove references to pthread_mutex_timedlock().

The pthread_mutex_timedlock() function is not supported on a number
of architectures and is not actually used by the library or compiler,
but prevents C++ compilation on systems that do not support it when
threads are enabled.
This commit is contained in:
Reimer Behrends
2014-11-06 02:23:40 +01:00
parent ead00d2328
commit c43e7c4ff6

View File

@@ -116,16 +116,6 @@ else:
proc pthread_cancel(a1: TSysThread): cint {.
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
TThreadVarSlot {.importc: "pthread_key_t", pure, final,
header: "<sys/types.h>".} = object