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

Method prefetch_context

thread/thread.cpp:642–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640 plock->foreground_unlock();
641 }
642 static void prefetch_context(thread* from, thread* to)
643 {
644#ifdef CONTEXT_PREFETCHING
645 const int CACHE_LINE_SIZE = 64;
646 auto f = *from->stack.pointer_ref();
647 __builtin_prefetch(f, 1);
648 // __builtin_prefetch((char*)f + CACHE_LINE_SIZE, 1);
649 auto t = *to->stack.pointer_ref();
650 __builtin_prefetch(t, 0);
651 // __builtin_prefetch((char*)t + CACHE_LINE_SIZE, 0);
652#endif
653 }
654 Switch remove_current(states new_state) const {
655 assert(!current->single());
656 auto from = current;

Callers

nothing calls this directly

Calls 1

pointer_refMethod · 0.80

Tested by

no test coverage detected