andreasmattsson
09/21/2017, 7:40 AMval longVar = nativeHeap.alloc<LongVar>().apply { value = 1234 }
val thread = nativeHeap.alloc<pthread_tVar>()
pthread_create(
thread.ptr,
null,
staticCFunction { inPtr: COpaquePointer? ->
println("staticCFunction")
println("inPtr: $inPtr")
null as COpaquePointer?
},
longVar.ptr
)
The first println succeeds, but it appears that as soon as I try to do anything whatsoever with inPtr I get a Segmentation fault?