summaryrefslogtreecommitdiff
path: root/sys/src/9/port/debugalloc.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@rei2.9hal>2012-02-06 05:28:57 +0100
committercinap_lenrek <cinap_lenrek@rei2.9hal>2012-02-06 05:28:57 +0100
commit5acde1e791e879cc24dc4fe8738994ea3a4bb9ba (patch)
treeb147efa4ce3f9846e688eb611347eb43766d47ab /sys/src/9/port/debugalloc.c
parent1a450db960aa3c542c84a5fff0f66c5ce95c853f (diff)
make smalloc() uninterruptable as most callers cant handle it anyway
Diffstat (limited to 'sys/src/9/port/debugalloc.c')
-rw-r--r--sys/src/9/port/debugalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/9/port/debugalloc.c b/sys/src/9/port/debugalloc.c
index e6a97e048..48f9f7126 100644
--- a/sys/src/9/port/debugalloc.c
+++ b/sys/src/9/port/debugalloc.c
@@ -440,7 +440,10 @@ smalloc(ulong size)
remember(getcallerpc(&size), v);
if(v != nil)
break;
- tsleep(&up->sleep, return0, 0, 100);
+ if(!waserror()){
+ tsleep(&up->sleep, return0, 0, 100);
+ poperror();
+ }
}
memset(v, 0, size);
return v;