Lines Matching refs:counter
133 int counter; /* size of data in buffer, or flag */ member
322 bfs[0].counter = BF_ALLOC; /* pass out the first buffer */ in rw_init()
324 bfs[1].counter = BF_FREE; in rw_init()
347 bfs[current].counter = BF_FREE; /* free old one */ in readit()
351 if(b->counter == BF_FREE) /* if it's empty */ in readit()
355 return b->counter; in readit()
372 if(b->counter != BF_FREE) /* nop if not free */ in read_ahead()
387 b->counter = (int)copy_n; in read_ahead()
416 b->counter = (int)(p - dp->th_data); in read_ahead()
425 bfs[current].counter = ct; /* set size of data to write */ in writeit()
427 if(bfs[current].counter != BF_FREE) /* if not free */ in writeit()
429 bfs[current].counter = BF_ALLOC; /* mark as alloc'd */ in writeit()
451 if(b->counter < -1) /* anything to flush? */ in write_behind()
468 count = b->counter; /* remember byte count */ in write_behind()
469 b->counter = BF_FREE; /* reset flag */ in write_behind()