Lines Matching refs:delay
86 static void print_phil_state(int id, const char *fmt, int32_t delay) in print_phil_state() argument
106 if (delay) { in print_phil_state()
107 printk(fmt, delay < 1000 ? " " : "", delay); in print_phil_state()
118 int32_t delay; in get_random_delay() local
129 delay = (uptime / 100 * (id + 1)) & 0x1f; in get_random_delay()
132 ms = (delay + 1) * period_in_ms; in get_random_delay()
159 int32_t delay; in philosopher() local
166 delay = get_random_delay(my_id, 25); in philosopher()
167 print_phil_state(my_id, " EATING [ %s%d ms ] ", delay); in philosopher()
168 usleep(delay * USEC_PER_MSEC); in philosopher()
174 delay = get_random_delay(my_id, 25); in philosopher()
175 print_phil_state(my_id, " THINKING [ %s%d ms ] ", delay); in philosopher()
176 usleep(delay * USEC_PER_MSEC); in philosopher()