signal handling, add prototype for pthreadinit
diff --git a/src/libthread/pthread.c b/src/libthread/pthread.c
index 77f97a4..8ca8f8f 100644
--- a/src/libthread/pthread.c
+++ b/src/libthread/pthread.c
@@ -101,7 +101,7 @@
 }
 
 void
-pthreadinit(void)
+_pthreadinit(void)
 {
 	pthread_key_create(&prockey, 0);
 }
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index 6989518..9a42b9e 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -190,7 +190,7 @@
 
 	p = v;
 	setproc(p);
-	print("s %p %d\n", p, gettid());
+	// print("s %p %d\n", p, gettid());
 	p->tid = pthread_self();
 	pthread_detach(p->tid);
 	lock(&p->lock);
@@ -503,6 +503,13 @@
 	threadmain(threadargc, threadargv);
 }
 
+extern Jmp *(*_notejmpbuf)(void);
+static Jmp*
+threadnotejmp(void)
+{
+	return &proc()->sigjmp;
+}
+
 int
 main(int argc, char **argv)
 {
@@ -524,8 +531,9 @@
 	_wunlock = threadwunlock;
 	_rsleep = threadrsleep;
 	_rwakeup = threadrwakeup;
+	_notejmpbuf = threadnotejmp;
 
-	pthreadinit();
+	_pthreadinit();
 	p = procalloc();
 	if(mainstacksize == 0)
 		mainstacksize = 65536;
diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h
index 9f70b0e..fb7e4c3 100644
--- a/src/libthread/threadimpl.h
+++ b/src/libthread/threadimpl.h
@@ -4,6 +4,12 @@
 typedef struct Proc Proc;
 typedef struct _Procrendez _Procrendez;
 
+typedef struct Jmp Jmp;
+struct Jmp
+{
+	p9jmp_buf b;
+};
+
 enum
 {
 	STACK = 8192
@@ -54,6 +60,7 @@
 	_Procrendez	runrend;
 	Context	schedcontext;
 	void		*udata;
+	Jmp		sigjmp;
 };
 
 extern Proc *xxx;
@@ -67,4 +74,4 @@
 extern void _threadsetproc(Proc*);
 extern int _threadlock(Lock*, int, ulong);
 extern void _threadunlock(Lock*, ulong);
-
+extern void _pthreadinit(void);