Lines Matching refs:counter
82 int counter; /* size of data in buffer, or flag */ member
113 bfs[0].counter = BF_ALLOC; /* pass out the first buffer */ in rw_init()
115 bfs[1].counter = BF_FREE; in rw_init()
130 bfs[current].counter = BF_FREE; /* free old one */ in readit()
134 if (b->counter == BF_FREE) /* if it's empty */ in readit()
137 return (b->counter); in readit()
154 if (b->counter != BF_FREE) /* nop if not free */ in read_ahead()
161 b->counter = fread(dp->th_data, sizeof (char), blocksize, in read_ahead()
164 b->counter = -1; in read_ahead()
186 b->counter = (int)(p - dp->th_data); in read_ahead()
197 bfs[current].counter = ct; /* set size of data to write */ in writeit()
199 if (bfs[current].counter != BF_FREE) /* if not free */ in writeit()
202 bfs[current].counter = BF_ALLOC; /* mark as alloc'd */ in writeit()
225 if (b->counter < -1) /* anything to flush? */ in write_behind()
228 count = b->counter; /* remember byte count */ in write_behind()
229 b->counter = BF_FREE; /* reset flag */ in write_behind()