MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / remove_current

Method remove_current

thread/thread.cpp:654–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652#endif
653 }
654 Switch remove_current(states new_state) const {
655 assert(!current->single());
656 auto from = current;
657 auto to = from->remove_from_list();
658 set_current(to);
659 prefetch_context(from, to);
660 from->state = new_state;
661 to->state = states::RUNNING;
662 return {from, to};
663 }
664 Switch _do_goto(thread* to) const {
665 auto from = current;
666 prefetch_context(from, to);

Callers 2

dieMethod · 0.80
prepare_usleepFunction · 0.80

Calls 2

singleMethod · 0.45
remove_from_listMethod · 0.45

Tested by

no test coverage detected