Quantcast
Channel: Intel® Cilk™ Plus
Viewing all articles
Browse latest Browse all 77

How is the user worker thread returned when returning from cilk runtime?

$
0
0

Hi

In the Binary Interface Specification, it says when the last user thread calls __cilkrts_leave_frame() with a __cilkrts_stack_frame which has CILK_FRAME_LAST set in the flags field, the runtime will suspend all of the worker threads it created."

I have a question about when the stack frame set as CILK_FRAME_LAST gets stolen by the system worker.

If it is possible, the user worker does not have a stack frame set as CILK_FRAME_LAST, and the stack frame stolen to the system worker will be changed to CILK_FRAME_STOLEN. Then, calling __cilkrts_c_return_from_initial() on the user worker is not possible because it does not have CILK_FRAME_LAST frame any more.

How does cilk runtime ensure the user worker thread keeps the stack frame set as CILK_FRAME_LAST and returns from that frame when _cilkrts_leave_frame() is called and exits the Cilk runtime?

Thank you,

Suyeon


Viewing all articles
Browse latest Browse all 77

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>