-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track the task executed by a thread with the thread-local storage.
When the thread's local handle is NULL, this indicates the thread is not active in any task but is instead in the implicit global task. - Store a suspended task at a taskwait with new scoped annotations. - On task-enter, set the active task to the new task. - On task-leave, clear the active task. - On task-synchronise, set/clear the active task as appropriate. When a task encounters a task scheduling point, assume it is suspended and store the handle in a scope surrounding the task scheduling point. Immediately clear the thread's active task i.e. effectively switch back to the implicit task before (possibly) then switching to another task. - Assert that only the main thread touches the root/phase tasks, but doesn't actually track them (to remain consistent with the idea that NULL means a thread is in the implicit global task). - Do not track whether a thread immediately resumes the same task after a task scheduling point, since I don't need this at this time.
- Loading branch information
Showing
3 changed files
with
218 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.