From a6a11437a390fb7e95fe995214d82bf5dbfe1eaf Mon Sep 17 00:00:00 2001 From: Miguel Date: Tue, 9 Oct 2018 10:31:33 +0200 Subject: something wrnog with our pipes --- fs/fd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fs/fd.c') diff --git a/fs/fd.c b/fs/fd.c index 2964883..7ba7142 100644 --- a/fs/fd.c +++ b/fs/fd.c @@ -133,7 +133,7 @@ void pipe_r_close(uint8_t *data) { uint8_t *mem=data+sizeof(ringbuffer); *mem-=1; - klog("closing read end of pipe, ref count=%d",*mem); + klog("closing read end of pipe at 0x%08x, ref count=%d",mem,*mem); /* if(*mem==0) // TODO : check other end too! and close on w_close { @@ -149,14 +149,14 @@ void pipe_w_close(uint8_t *data) uint8_t *mem=data+sizeof(ringbuffer); mem+=4; *mem-=1; - klog("closing write end of pipe, ref count=%d",*mem); + klog("closing write end of pipe at 0x%08x, ref count=%d",mem,*mem); } static fd pipe_r_dupl(fd *f) { uint8_t *mem=f->data+sizeof(ringbuffer); *mem+=1; - klog("duplicating read end of pipe, ref count=%d",*mem); + klog("duplicating read end of pipe at 0x%08x, ref count=%d",mem,*mem); return *f; } @@ -165,7 +165,7 @@ static fd pipe_w_dupl(fd *f) uint8_t *mem=f->data+sizeof(ringbuffer); mem+=4; *mem+=1; - klog("duplicating write end of pipe, ref count=%d",*mem); + klog("duplicating write end of pipe at 0x%08x, ref count=%d",mem,*mem); return *f; } @@ -209,7 +209,6 @@ bool pipe_eof(uint8_t *data) uint8_t *mem=data+sizeof(ringbuffer); mem+=4; - //we assume EOF if there is no data anymore AND no writers! return (!ringbuffer_has(data))&&(*mem==0); } -- cgit v1.2.3