-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't pass the state and process as an argument
The compiler generated code no longer passes the runtime state and the current process as hidden arguments. Instead, the state is stored in a global variable when the program starts up. For the current process we change the stack layout to the following: ╭───────────────────╮ │ Private page │ ├───────────────────┤ │ Guard page │ ├───────────────────┤ │ Stack data │ ↑ Stack grows towards the guard ╰───────────────────╯ The private page stores extra data, such as a pointer to the process that owns the stack and the epoch at which it started running. This entire chunk of data is then aligned to its size. This makes it possible to get a pointer to the private data page by applying a bitmask to the stack pointer. The bitmask depends on the stack size, which is runtime configurable and depends on the page size, and is loaded into a global variable at startup. This entire approach removes the need for more expensive thread-local operations, which we can't use anyway due to Rust's "thread_local" attribute not being stable (and likely not becoming stable for another few years). This fixes #617. Changelog: changed
- Loading branch information
1 parent
01bd04e
commit a3613d6
Showing
19 changed files
with
490 additions
and
306 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
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.