Home | History | Annotate | Download | only in tests

Lines Matching defs:in

23 has built-in functions for atomic memory access.
35 /* Counting semaphore representing the number of data items in the buffer. */
40 int in;
43 /* Mutex that protects 'in'. */
98 b->in = 0;
127 int in;
131 in = fetch_and_add(&b->in, 1);
132 if (in >= BUFFER_MAX)
134 fetch_and_add(&b->in, -BUFFER_MAX);
135 in -= BUFFER_MAX;
137 b->buffer[in] = *d;
142 printf("sent %d to buffer[%d]\n", *d, in);