summaryrefslogtreecommitdiff
path: root/fs/fd.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-09 10:31:33 +0200
committerMiguel <m.i@gmx.at>2018-10-09 10:31:33 +0200
commita6a11437a390fb7e95fe995214d82bf5dbfe1eaf (patch)
tree2e45b4c1cee8a1ecb70cd773185154448e7f7ab0 /fs/fd.c
parentfe8180d88540bfa96595dcc58290de5425e534e3 (diff)
something wrnog with our pipes
Diffstat (limited to 'fs/fd.c')
-rw-r--r--fs/fd.c9
1 files changed, 4 insertions, 5 deletions
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);
}