Lines Matching defs:atom
522 struct sched_atom *atom)
526 switch (atom->type) {
528 burn_nsecs(sched, atom->duration);
531 if (atom->wait_sem)
532 ret = sem_wait(atom->wait_sem);
536 if (atom->wait_sem)
537 ret = sem_post(atom->wait_sem);
1065 struct work_atom *atom = zalloc(sizeof(*atom));
1066 if (!atom) {
1071 atom->sched_out_time = timestamp;
1074 atom->state = THREAD_WAIT_CPU;
1075 atom->wake_up_time = atom->sched_out_time;
1078 list_add_tail(&atom->list, &atoms->work_list);
1086 struct work_atom *atom;
1090 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1092 atom->runtime += delta;
1099 struct work_atom *atom;
1105 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1107 if (atom->state != THREAD_WAIT_CPU)
1110 if (timestamp < atom->wake_up_time) {
1111 atom->state = THREAD_IGNORE;
1115 atom->state = THREAD_SCHED_IN;
1116 atom->sched_in_time = timestamp;
1118 delta = atom->sched_in_time - atom->wake_up_time;
1122 atoms->max_lat_start = atom->wake_up_time;
1185 * add in an initial atom in runnable state:
1240 struct work_atom *atom;
1263 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1276 if (sched->profile_cpu == -1 && atom->state != THREAD_SLEEPING)
1280 if (atom->sched_out_time > timestamp) {
1285 atom->state = THREAD_WAIT_CPU;
1286 atom->wake_up_time = timestamp;
1302 struct work_atom *atom;
1331 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1332 atom->sched_in_time = atom->sched_out_time = atom->wake_up_time = timestamp;
1336 if (atom->sched_out_time > timestamp)