aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/thread.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-16 21:31:21 +0000
committerrsc <devnull@localhost>2005-01-16 21:31:21 +0000
commit0b561695d60ce777fbfb332a436c2a51702fae23 (patch)
treee8de952e49f7eccc25115a41be534a925db0e716 /src/libthread/thread.c
parentb50e9caf31a0d1346bf782c6b4e32f90fd707223 (diff)
downloadplan9port-0b561695d60ce777fbfb332a436c2a51702fae23.tar.gz
plan9port-0b561695d60ce777fbfb332a436c2a51702fae23.tar.bz2
plan9port-0b561695d60ce777fbfb332a436c2a51702fae23.zip
useful warning comment
Diffstat (limited to 'src/libthread/thread.c')
-rw-r--r--src/libthread/thread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index d79bd1a9..6c31cb76 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -510,6 +510,15 @@ static void
threadmainstart(void *v)
{
USED(v);
+
+ /*
+ * N.B. This call to proc() is a program's first call (indirectly) to a
+ * pthreads function while executing on a non-pthreads-allocated
+ * stack. If the pthreads implementation is using the stack pointer
+ * to locate the per-thread data, then this call will blow up.
+ * This means the pthread implementation is not suitable for
+ * running under libthread. Time to write your own. Sorry.
+ */
threadmainproc = proc();
threadmain(threadargc, threadargv);
}