aboutsummaryrefslogtreecommitdiff
path: root/acid/port
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-02-11 02:14:59 +0000
committerrsc <devnull@localhost>2005-02-11 02:14:59 +0000
commitd89ce51a3b4be96d12066eadbcffc0587a2673a6 (patch)
tree4a6039fc6ee9b33c8b3079d0331b3dd8a71fa158 /acid/port
parented9fe82834e2546bff03bef38644de95ffbeaba0 (diff)
downloadplan9port-d89ce51a3b4be96d12066eadbcffc0587a2673a6.tar.gz
plan9port-d89ce51a3b4be96d12066eadbcffc0587a2673a6.tar.bz2
plan9port-d89ce51a3b4be96d12066eadbcffc0587a2673a6.zip
different pthread support
Diffstat (limited to 'acid/port')
-rw-r--r--acid/port13
1 files changed, 10 insertions, 3 deletions
diff --git a/acid/port b/acid/port
index 4e2741d1..171a6494 100644
--- a/acid/port
+++ b/acid/port
@@ -84,7 +84,7 @@ defn _stkign(frame)
// only print the last one.
defn _stk(regs, dolocals)
{
- local stk, pc, fn, callerpc, paramlist, locallist;
+ local stk, pc, fn, done, callerpc, paramlist, locallist;
stk = strace(regs);
if stkignore then {
@@ -93,7 +93,8 @@ defn _stk(regs, dolocals)
}
callerpc = 0;
- while stk do {
+ done = 0;
+ while stk && !done do {
frame = head stk;
stk = tail stk;
fn = frame[0];
@@ -111,9 +112,15 @@ defn _stk(regs, dolocals)
pfl(pc);
if dolocals then
locals(locallist);
+ if fn == var("threadmain") || fn == var("p9main") then
+ done=1;
+ if fn == var("threadstart") || fn == var("scheduler") then
+ done=1;
+ if callerpc == 0 then
+ done=1;
}
- if callerpc then {
+ if callerpc && !done then {
print(stkprefix, fmt(callerpc, 'a'), " ");
pfl(callerpc);
}