1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:17:42 +00:00

Everywhere: Hook up remaining debug macros to Debug.h.

This commit is contained in:
asynts 2021-01-24 15:28:26 +01:00 committed by Andreas Kling
parent da69de1f1b
commit eea72b9b5c
63 changed files with 458 additions and 287 deletions

View file

@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Debug.h>
#include <AK/HashTable.h>
#include <AK/Singleton.h>
#include <AK/StdLibExtras.h>
@ -114,12 +115,12 @@ void FIFO::attach(Direction direction)
{
if (direction == Direction::Reader) {
++m_readers;
#ifdef FIFO_DEBUG
#if FIFO_DEBUG
klog() << "open reader (" << m_readers << ")";
#endif
} else if (direction == Direction::Writer) {
++m_writers;
#ifdef FIFO_DEBUG
#if FIFO_DEBUG
klog() << "open writer (" << m_writers << ")";
#endif
}
@ -130,13 +131,13 @@ void FIFO::attach(Direction direction)
void FIFO::detach(Direction direction)
{
if (direction == Direction::Reader) {
#ifdef FIFO_DEBUG
#if FIFO_DEBUG
klog() << "close reader (" << m_readers << " - 1)";
#endif
ASSERT(m_readers);
--m_readers;
} else if (direction == Direction::Writer) {
#ifdef FIFO_DEBUG
#if FIFO_DEBUG
klog() << "close writer (" << m_writers << " - 1)";
#endif
ASSERT(m_writers);