diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2017-04-13 04:57:10 +0800 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-04-12 22:57:10 +0200 |
commit | e512358bc96b7be58bf4f2d5a2c5de75f119138a (patch) | |
tree | 6e850d378e87e93d441237042eb63f5f139f82ee /lib/system/syslocks.nim | |
parent | 926563f0e6c4fe13b8f88f58ac33ccd7826692f4 (diff) | |
download | Nim-e512358bc96b7be58bf4f2d5a2c5de75f119138a.tar.gz |
Linux abi take 3 (#5692)
* avoid generating object fields for imported types * fix some abi/type issues for linux_amd64
Diffstat (limited to 'lib/system/syslocks.nim')
-rw-r--r-- | lib/system/syslocks.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/system/syslocks.nim b/lib/system/syslocks.nim index 9d056611f..fb354880f 100644 --- a/lib/system/syslocks.nim +++ b/lib/system/syslocks.nim @@ -102,12 +102,21 @@ else: SysLock {.importc: "pthread_mutex_t", pure, final, header: """#include <sys/types.h> #include <pthread.h>""".} = object + when defined(linux) and defined(amd64): + abi: array[40 div sizeof(clong), clong] + SysLockAttr {.importc: "pthread_mutexattr_t", pure, final header: """#include <sys/types.h> #include <pthread.h>""".} = object + when defined(linux) and defined(amd64): + abi: array[4 div sizeof(cint), cint] # actually a cint + SysCond {.importc: "pthread_cond_t", pure, final, header: """#include <sys/types.h> #include <pthread.h>""".} = object + when defined(linux) and defined(amd64): + abi: array[48 div sizeof(clonglong), clonglong] + SysLockType = distinct cint proc initSysLock(L: var SysLock, attr: ptr SysLockAttr = nil) {. |