mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-12 05:55:37 +00:00
virtio: remove bitfield in Index template
Eliminates note of GCC about bitfield as parameter semantic change. Ref #4344
This commit is contained in:
parent
609af0037f
commit
6dbdb966fc
@ -48,13 +48,17 @@ class Vmm::Virtio_split_queue
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
unsigned _idx : LOG2;
|
uint16_t _idx;
|
||||||
|
|
||||||
|
static_assert((sizeof(uint16_t)*8) >= LOG2);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Index(unsigned idx = 0) : _idx(idx % (1 << LOG2)) {}
|
Index(unsigned idx = 0) : _idx(idx % (1 << LOG2)) {}
|
||||||
|
|
||||||
void inc() { _idx++; }
|
void inc() {
|
||||||
|
_idx = ((_idx + 1) % (1 << LOG2)); }
|
||||||
|
|
||||||
unsigned idx() const { return _idx; }
|
unsigned idx() const { return _idx; }
|
||||||
|
|
||||||
bool operator != (Index const & o) const {
|
bool operator != (Index const & o) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user