Lines Matching refs:delay
100 static void print_phil_state(int id, const char *fmt, int32_t delay) in print_phil_state() argument
111 if (delay) { in print_phil_state()
112 printk(fmt, delay < 1000 ? " " : "", delay); in print_phil_state()
127 int32_t delay = (k_uptime_get_32()/100 * (id + 1)) & 0x1f; in get_random_delay() local
130 int32_t ms = (delay + 1) * period_in_ms; in get_random_delay()
160 int32_t delay; in philosopher() local
167 delay = get_random_delay(my_id, 25); in philosopher()
168 print_phil_state(my_id, " EATING [ %s%d ms ] ", delay); in philosopher()
169 k_msleep(delay); in philosopher()
175 delay = get_random_delay(my_id, 25); in philosopher()
176 print_phil_state(my_id, " THINKING [ %s%d ms ] ", delay); in philosopher()
177 k_msleep(delay); in philosopher()