diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-06-08 00:19:33 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-06-08 00:19:33 +0200 |
commit | be3a5a6dc372870c9c6cb3b039228fab89db07b5 (patch) | |
tree | 5db24a811edae74d7f071ec694a3e8ad20c1caf2 /sys/src/9/port/allocb.c | |
parent | 9ee3095553844b91e92f69efb44335c850f05c65 (diff) |
kernel: remove Block refcounting (thanks erik)
Diffstat (limited to 'sys/src/9/port/allocb.c')
-rw-r--r-- | sys/src/9/port/allocb.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/src/9/port/allocb.c b/sys/src/9/port/allocb.c index 3466840f2..816dab837 100644 --- a/sys/src/9/port/allocb.c +++ b/sys/src/9/port/allocb.c @@ -30,8 +30,6 @@ _allocb(int size) b->list = nil; b->free = 0; b->flag = 0; - b->ref = 0; - _xinc(&b->ref); /* align start of data portion by rounding up */ addr = (uintptr)b; @@ -123,16 +121,10 @@ void freeb(Block *b) { void *dead = (void*)Bdead; - long ref; - if(b == nil || (ref = _xdec(&b->ref)) > 0) + if(b == nil) return; - if(ref < 0){ - dumpstack(); - panic("freeb: ref %ld; caller pc %#p", ref, getcallerpc(&b)); - } - /* * drivers which perform non cache coherent DMA manage their own buffer * pool of uncached buffers and provide their own free routine. |