1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

WindowServer: Move the CPU monitor thingy to its own class.

This commit is contained in:
Andreas Kling 2019-04-14 04:33:43 +02:00
parent f1b58d8d8c
commit c2093ad994
6 changed files with 106 additions and 83 deletions

View file

@ -1,7 +1,7 @@
#pragma once
#include "Assertions.h"
#include "Types.h"
#include <AK/Assertions.h>
#include <AK/Types.h>
namespace AK {
@ -19,15 +19,6 @@ public:
int capacity() const { return Capacity; }
void dump() const
{
kprintf("CircularQueue<%zu>:\n", Capacity);
kprintf(" size: %zu\n", m_size);
for (int i = 0; i < Capacity; ++i) {
kprintf(" [%zu] %d %c\n", i, m_elements[i], i == m_head ? '*' : ' ');
}
}
void enqueue(const T& t)
{
m_elements[(m_head + m_size) % Capacity] = t;