Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71172
b: refs/heads/master
c: 1bfbc60
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Walker authored and Linus Torvalds committed Oct 18, 2007
1 parent 3fe3575 commit d666486
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dedf8b79ec06e91fa87f6cba99e6e61b4140ceca
refs/heads/master: 1bfbc608ba05951678eedc246c9baf62367764a0
6 changes: 3 additions & 3 deletions trunk/kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void relay_reset(struct rchan *chan)
if (!chan)
return;

if (chan->is_global && chan->buf[0]) {
if (chan->is_global && chan->buf[0]) {
__relay_reset(chan->buf[0], 0);
return;
}
Expand Down Expand Up @@ -850,13 +850,13 @@ static int relay_file_read_avail(struct rchan_buf *buf, size_t read_pos)
buf->subbufs_consumed = consumed;
buf->bytes_consumed = 0;
}

produced = (produced % n_subbufs) * subbuf_size + buf->offset;
consumed = (consumed % n_subbufs) * subbuf_size + buf->bytes_consumed;

if (consumed > produced)
produced += n_subbufs * subbuf_size;

if (consumed == produced)
return 0;

Expand Down

0 comments on commit d666486

Please sign in to comment.