diff options
Diffstat (limited to 'vendor/modernc.org/libc/pthread.go')
| -rw-r--r-- | vendor/modernc.org/libc/pthread.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/modernc.org/libc/pthread.go b/vendor/modernc.org/libc/pthread.go index 3d8bc0b84..538766b2d 100644 --- a/vendor/modernc.org/libc/pthread.go +++ b/vendor/modernc.org/libc/pthread.go @@ -42,6 +42,7 @@ type TLS struct { jumpBuffers []uintptr lastError uint32 pthreadData + sp int stack stackHeader ID int32 @@ -67,6 +68,11 @@ func newTLS(detached bool) *TLS { return t } +// StackSlots reports the number of tls stack slots currently in use. +func (tls *TLS) StackSlots() int { + return tls.sp +} + func (t *TLS) alloca(n size_t) (r uintptr) { r = Xmalloc(t, n) t.allocas = append(t.allocas, r) @@ -183,7 +189,7 @@ func Xpthread_attr_setstacksize(t *TLS, attr uintptr, stackSize types.Size_t) in if __ccgo_strace { trc("t=%v attr=%v stackSize=%v, (%v:)", t, attr, stackSize, origin(2)) } - panic(todo("")) + return 0 } // Go side data of pthread_cond_t. |
