mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
Everywhere: Hook up remaining debug macros to Debug.h.
This commit is contained in:
parent
da69de1f1b
commit
eea72b9b5c
63 changed files with 458 additions and 287 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Atomic.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <Kernel/API/Syscall.h>
|
||||
#include <limits.h>
|
||||
|
@ -130,7 +131,7 @@ int pthread_create(pthread_t* thread, pthread_attr_t* attributes, void* (*start_
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_create: Creating thread with attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
used_attributes,
|
||||
(PTHREAD_CREATE_JOINABLE == used_attributes->m_detach_state) ? "joinable" : "detached",
|
||||
|
@ -254,7 +255,7 @@ int pthread_attr_init(pthread_attr_t* attributes)
|
|||
auto* impl = new PthreadAttrImpl {};
|
||||
*attributes = impl;
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_attr_init: New thread attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
impl,
|
||||
(PTHREAD_CREATE_JOINABLE == impl->m_detach_state) ? "joinable" : "detached",
|
||||
|
@ -297,7 +298,7 @@ int pthread_attr_setdetachstate(pthread_attr_t* attributes, int detach_state)
|
|||
|
||||
attributes_impl->m_detach_state = detach_state;
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_attr_setdetachstate: Thread attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
attributes_impl,
|
||||
(PTHREAD_CREATE_JOINABLE == attributes_impl->m_detach_state) ? "joinable" : "detached",
|
||||
|
@ -341,7 +342,7 @@ int pthread_attr_setguardsize(pthread_attr_t* attributes, size_t guard_size)
|
|||
attributes_impl->m_guard_page_size = actual_guard_size;
|
||||
attributes_impl->m_reported_guard_page_size = guard_size; // POSIX, why?
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_attr_setguardsize: Thread attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
attributes_impl,
|
||||
(PTHREAD_CREATE_JOINABLE == attributes_impl->m_detach_state) ? "joinable" : "detached",
|
||||
|
@ -376,7 +377,7 @@ int pthread_attr_setschedparam(pthread_attr_t* attributes, const struct sched_pa
|
|||
|
||||
attributes_impl->m_schedule_priority = p_sched_param->sched_priority;
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_attr_setschedparam: Thread attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
attributes_impl,
|
||||
(PTHREAD_CREATE_JOINABLE == attributes_impl->m_detach_state) ? "joinable" : "detached",
|
||||
|
@ -421,7 +422,7 @@ int pthread_attr_setstack(pthread_attr_t* attributes, void* p_stack, size_t stac
|
|||
attributes_impl->m_stack_size = stack_size;
|
||||
attributes_impl->m_stack_location = p_stack;
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_attr_setstack: Thread attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
attributes_impl,
|
||||
(PTHREAD_CREATE_JOINABLE == attributes_impl->m_detach_state) ? "joinable" : "detached",
|
||||
|
@ -457,7 +458,7 @@ int pthread_attr_setstacksize(pthread_attr_t* attributes, size_t stack_size)
|
|||
|
||||
attributes_impl->m_stack_size = stack_size;
|
||||
|
||||
#ifdef PTHREAD_DEBUG
|
||||
#if PTHREAD_DEBUG
|
||||
dbgprintf("pthread_attr_setstacksize: Thread attributes at %p, detach state %s, priority %d, guard page size %d, stack size %d, stack location %p\n",
|
||||
attributes_impl,
|
||||
(PTHREAD_CREATE_JOINABLE == attributes_impl->m_detach_state) ? "joinable" : "detached",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue