Skip to content

Commit

Permalink
make global_t instances static
Browse files Browse the repository at this point in the history
These structures are mainly used for purpose of easier debugging.
That means - instead of adding each member separately "on the watch"
of the debugger, the whole structure is put on the watch.

Also, these structures shouldn't be accessible outside of the compilation
unit, therefore it makes sense to make them static. This has also benefit
of avoiding potential name conflicts.
  • Loading branch information
wbenny committed Jan 6, 2020
1 parent d2d1cab commit b76feb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hvpp/hvpp/hypervisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace hvpp::hypervisor
bool running;
};

global_t global;
static global_t global;

auto start(vmexit_handler& handler) noexcept -> error_code_t
{
Expand Down
2 changes: 1 addition & 1 deletion src/hvpp/hvpp/lib/mm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace mm
object_t<mtrr_descriptor_t> mtrr_descriptor;
};

global_t global;
static global_t global;

allocator_guard::allocator_guard() noexcept
: allocator_guard(global.custom_allocator)
Expand Down

0 comments on commit b76feb2

Please sign in to comment.