The Pedigree Project 0.1
BufferMonitors.h
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted.
6 */
7
8#ifndef KERNEL_UTILITIES_BUFFERMONITORS_H
9#define KERNEL_UTILITIES_BUFFERMONITORS_H
10
11#include "pedigree/kernel/compiler.h"
12#include "pedigree/kernel/utilities/List.h"
13
14class Event;
15class Semaphore;
16class Thread;
17
22class EXPORTED_PUBLIC BufferMonitors {
23 public:
26
28 bool add(Thread* thread, Event* event);
29 void add(Semaphore* semaphore);
30
32 void notify();
33
35 void clear();
36
37 void cull(Thread* thread);
38 void cull(Semaphore* semaphore);
39 void cull(Event* event);
40
41 private:
42 NOT_COPYABLE_OR_ASSIGNABLE(BufferMonitors);
43
44 struct MonitorTarget;
45 List<MonitorTarget*> m_Targets;
46};
47
48#endif // KERNEL_UTILITIES_BUFFERMONITORS_H
Definition Event.h:49
Definition List.h:61