Lines Matching refs:seq
395 struct lock_seq_stat *seq;
397 list_for_each_entry(seq, &ts->seq_list, list) {
398 if (seq->addr == addr)
399 return seq;
402 seq = zalloc(sizeof(struct lock_seq_stat));
403 if (!seq)
405 seq->state = SEQ_STATE_UNINITIALIZED;
406 seq->addr = addr;
408 list_add(&seq->list, &ts->seq_list);
409 return seq;
436 struct lock_seq_stat *seq;
443 seq = get_seq(ts, acquire_event->addr);
445 switch (seq->state) {
449 seq->state = SEQ_STATE_ACQUIRING;
455 seq->state = SEQ_STATE_READ_ACQUIRED;
456 seq->read_count = 1;
462 seq->read_count++;
476 list_del(&seq->list);
477 free(seq);
486 seq->prev_event_time = timestamp;
500 struct lock_seq_stat *seq;
508 seq = get_seq(ts, acquired_event->addr);
510 switch (seq->state) {
517 contended_term = timestamp - seq->prev_event_time;
530 list_del(&seq->list);
531 free(seq);
540 seq->state = SEQ_STATE_ACQUIRED;
542 seq->prev_event_time = timestamp;
556 struct lock_seq_stat *seq;
563 seq = get_seq(ts, contended_event->addr);
565 switch (seq->state) {
578 list_del(&seq->list);
579 free(seq);
587 seq->state = SEQ_STATE_CONTENDED;
589 seq->prev_event_time = timestamp;
603 struct lock_seq_stat *seq;
610 seq = get_seq(ts, release_event->addr);
612 switch (seq->state) {
619 seq->read_count--;
620 BUG_ON(seq->read_count < 0);
621 if (!seq->read_count) {
641 list_del(&seq->list);
642 free(seq);