mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
base: extend Vcpu_state for base-hw x86 virtualization
Changes are preliminary and will most certainly be removed when fully enabling the virtualization feature on base-hw. Ref #4826
This commit is contained in:
parent
1e3836f8b5
commit
b277b84e19
@ -2,11 +2,12 @@
|
||||
* \brief Virtual CPU context for x86
|
||||
* \author Alexander Boettcher
|
||||
* \author Christian Helmuth
|
||||
* \author Benjamin Lamowski
|
||||
* \date 2018-10-09
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Genode Labs GmbH
|
||||
* Copyright (C) 2018-2023 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
@ -81,6 +82,26 @@ class Genode::Vcpu_state
|
||||
_charged = true;
|
||||
_value = value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Charge without changing value
|
||||
*
|
||||
* \noapi
|
||||
*/
|
||||
void set_charged() { _charged = true; }
|
||||
|
||||
/*
|
||||
* Update value if not yet charged
|
||||
*
|
||||
* \noapi
|
||||
*/
|
||||
void update(T const &value)
|
||||
{
|
||||
if (!_charged) {
|
||||
_value = value;
|
||||
_charged = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct Range
|
||||
|
Loading…
x
Reference in New Issue
Block a user