1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

Revert "Kernel: Switch singletons to use new Singleton class"

This reverts commit f48feae0b2.
This commit is contained in:
Andreas Kling 2020-08-22 17:53:34 +02:00
parent 0addcb45b8
commit 2fd9e72264
44 changed files with 146 additions and 184 deletions

View file

@ -25,16 +25,16 @@
*/
#include <Kernel/Process.h>
#include <Kernel/Singleton.h>
#include <Kernel/SharedBuffer.h>
namespace Kernel {
static auto s_map = make_singleton<Lockable<HashMap<int, NonnullOwnPtr<SharedBuffer>>>>();
Lockable<HashMap<int, NonnullOwnPtr<SharedBuffer>>>& shared_buffers()
{
return *s_map;
static Lockable<HashMap<int, NonnullOwnPtr<SharedBuffer>>>* map;
if (!map)
map = new Lockable<HashMap<int, NonnullOwnPtr<SharedBuffer>>>;
return *map;
}
void SharedBuffer::sanity_check(const char* what)