omap: remove Block refcounting
This commit is contained in:
parent
be3a5a6dc3
commit
3d20da3f8b
1 changed files with 1 additions and 9 deletions
|
@ -33,8 +33,6 @@ _ucallocb(int size)
|
||||||
b->list = nil;
|
b->list = nil;
|
||||||
b->free = 0;
|
b->free = 0;
|
||||||
b->flag = 0;
|
b->flag = 0;
|
||||||
b->ref = 0;
|
|
||||||
_xinc(&b->ref);
|
|
||||||
|
|
||||||
/* align start of data portion by rounding up */
|
/* align start of data portion by rounding up */
|
||||||
addr = (ulong)b;
|
addr = (ulong)b;
|
||||||
|
@ -117,16 +115,10 @@ void
|
||||||
ucfreeb(Block *b)
|
ucfreeb(Block *b)
|
||||||
{
|
{
|
||||||
void *dead = (void*)Bdead;
|
void *dead = (void*)Bdead;
|
||||||
long ref;
|
|
||||||
|
|
||||||
if(b == nil || (ref = _xdec(&b->ref)) > 0)
|
if(b == nil)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(ref < 0){
|
|
||||||
dumpstack();
|
|
||||||
panic("ucfreeb: ref %ld; caller pc %#p", ref, getcallerpc(&b));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* drivers which perform non cache coherent DMA manage their own buffer
|
* drivers which perform non cache coherent DMA manage their own buffer
|
||||||
* pool of uncached buffers and provide their own free routine.
|
* pool of uncached buffers and provide their own free routine.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue