From 803406d07ce95189b08a16c7f51e2bf91f9c0c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Tue, 30 Jul 2019 17:24:42 +0200 Subject: [PATCH] fix #11854 (#11857) --- lib/system/threadlocalstorage.nim | 6 +++--- lib/system/threads.nim | 2 +- tests/concepts/texplain.nim | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/system/threadlocalstorage.nim b/lib/system/threadlocalstorage.nim index d384b954b0348..d2a4d00d43664 100644 --- a/lib/system/threadlocalstorage.nim +++ b/lib/system/threadlocalstorage.nim @@ -144,12 +144,12 @@ else: tv_sec: Time tv_nsec: clong - proc pthread_attr_init(a1: var PthreadAttr) {. + proc pthread_attr_init(a1: var Pthread_attr) {. importc, header: pthreadh.} - proc pthread_attr_setstacksize(a1: var PthreadAttr, a2: int) {. + proc pthread_attr_setstacksize(a1: var Pthread_attr, a2: int) {. importc, header: pthreadh.} - proc pthread_create(a1: var SysThread, a2: var PthreadAttr, + proc pthread_create(a1: var SysThread, a2: var Pthread_attr, a3: proc (x: pointer): pointer {.noconv.}, a4: pointer): cint {.importc: "pthread_create", header: pthreadh.} diff --git a/lib/system/threads.nim b/lib/system/threads.nim index 050950121cbc5..682f2cf80895f 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -309,7 +309,7 @@ else: when TArg isnot void: t.data = param t.dataFn = tp when hasSharedHeap: t.core.stackSize = ThreadStackSize - var a {.noinit.}: PthreadAttr + var a {.noinit.}: Pthread_attr pthread_attr_init(a) pthread_attr_setstacksize(a, ThreadStackSize) if pthread_create(t.sys, a, threadProcWrapper[TArg], addr(t)) != 0: diff --git a/tests/concepts/texplain.nim b/tests/concepts/texplain.nim index f3d70320f195c..2b19c8b4d9222 100644 --- a/tests/concepts/texplain.nim +++ b/tests/concepts/texplain.nim @@ -1,7 +1,6 @@ discard """ cmd: "nim c --verbosity:0 --colors:off $file" nimout: ''' -Hint: texplain [Processing] texplain.nim(158, 10) Hint: Non-matching candidates for e(y) proc e(i: int): int first type mismatch at position: 1 @@ -117,6 +116,7 @@ expression: f(y)''' + # line 120 HERE type