Lines Matching defs:shbuf
90 struct shbuf_ds *shbuf;
189 shmdt(G.shbuf);
209 G.shbuf = shmat(G.shmid, NULL, 0);
210 if (!G.shbuf) {
214 memset(G.shbuf, 0, G.shm_size);
215 G.shbuf->size = G.shm_size - offsetof(struct shbuf_ds, data) - 1;
216 /*G.shbuf->tail = 0;*/
242 * tail's max value is (shbuf->size - 1)
247 old_tail = G.shbuf->tail;
249 if (new_tail < G.shbuf->size) {
251 memcpy(G.shbuf->data + old_tail, msg, len);
252 G.shbuf->tail = new_tail;
255 int k = G.shbuf->size - old_tail;
257 memcpy(G.shbuf->data + old_tail, msg, k);
260 G.shbuf->tail = 0;
267 printf("tail:%d\n", G.shbuf->tail);
283 if ((option_mask32 & OPT_circularlog) && G.shbuf) {