defines the structure of the global variable in the root-set table. Inherits from root_set_base.
More...
#include <global-root.hpp>
defines the structure of the global variable in the root-set table. Inherits from root_set_base.
◆ global_root()
| global_root::global_root |
( |
header * |
var_ptr | ) |
|
creates the instance of the global variable
- Parameters
-
| var_ptr | - pointer to a header of the global variable on the heap |
◆ accept()
accepts the gc visitor.
- Parameters
-
| visitor | - reference to a gc visitor. Calls marking on the gc visitor for global variable element. |
Implements root_set_base.
◆ get_global_variable_unlocked()
| header * global_root::get_global_variable_unlocked |
( |
| ) |
|
|
privatenoexcept |
getter for the variable.
- Warning
- must be called when lock is held already.
- Returns
- pointer to a header of the variable.
◆ set_global_variable()
| void global_root::set_global_variable |
( |
header * |
var_ptr | ) |
|
|
noexcept |
setter for the global variable.
- Parameters
-
| var_ptr | - pointer to the header of the global variable on the heap |
◆ garbage_collector
allowing gc to access getter for the variable.
◆ global_mutex
| std::mutex global_root::global_mutex |
|
mutableprivate |
used for global variable synchronization.
◆ global_variable_ptr
| header* global_root::global_variable_ptr |
|
private |
pointer to a header of the variable on the heap
The documentation for this class was generated from the following files: