mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -176,7 +176,7 @@ int pthread_detach(pthread_t thread)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_sigmask.html
|
||||
int pthread_sigmask(int how, const sigset_t* set, sigset_t* old_set)
|
||||
int pthread_sigmask(int how, sigset_t const* set, sigset_t* old_set)
|
||||
{
|
||||
if (sigprocmask(how, set, old_set))
|
||||
return errno;
|
||||
|
@ -184,7 +184,7 @@ int pthread_sigmask(int how, const sigset_t* set, sigset_t* old_set)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_init.html
|
||||
int pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t* attributes)
|
||||
int pthread_mutex_init(pthread_mutex_t* mutex, pthread_mutexattr_t const* attributes)
|
||||
{
|
||||
return __pthread_mutex_init(mutex, attributes);
|
||||
}
|
||||
|
@ -269,9 +269,9 @@ int pthread_attr_destroy(pthread_attr_t* attributes)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getdetachstate.html
|
||||
int pthread_attr_getdetachstate(const pthread_attr_t* attributes, int* p_detach_state)
|
||||
int pthread_attr_getdetachstate(pthread_attr_t const* attributes, int* p_detach_state)
|
||||
{
|
||||
auto* attributes_impl = *(reinterpret_cast<const PthreadAttrImpl* const*>(attributes));
|
||||
auto* attributes_impl = *(reinterpret_cast<PthreadAttrImpl const* const*>(attributes));
|
||||
|
||||
if (!attributes_impl || !p_detach_state)
|
||||
return EINVAL;
|
||||
|
@ -305,9 +305,9 @@ int pthread_attr_setdetachstate(pthread_attr_t* attributes, int detach_state)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getguardsize.html
|
||||
int pthread_attr_getguardsize(const pthread_attr_t* attributes, size_t* p_guard_size)
|
||||
int pthread_attr_getguardsize(pthread_attr_t const* attributes, size_t* p_guard_size)
|
||||
{
|
||||
auto* attributes_impl = *(reinterpret_cast<const PthreadAttrImpl* const*>(attributes));
|
||||
auto* attributes_impl = *(reinterpret_cast<PthreadAttrImpl const* const*>(attributes));
|
||||
|
||||
if (!attributes_impl || !p_guard_size)
|
||||
return EINVAL;
|
||||
|
@ -349,9 +349,9 @@ int pthread_attr_setguardsize(pthread_attr_t* attributes, size_t guard_size)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getschedparam.html
|
||||
int pthread_attr_getschedparam(const pthread_attr_t* attributes, struct sched_param* p_sched_param)
|
||||
int pthread_attr_getschedparam(pthread_attr_t const* attributes, struct sched_param* p_sched_param)
|
||||
{
|
||||
auto* attributes_impl = *(reinterpret_cast<const PthreadAttrImpl* const*>(attributes));
|
||||
auto* attributes_impl = *(reinterpret_cast<PthreadAttrImpl const* const*>(attributes));
|
||||
|
||||
if (!attributes_impl || !p_sched_param)
|
||||
return EINVAL;
|
||||
|
@ -384,9 +384,9 @@ int pthread_attr_setschedparam(pthread_attr_t* attributes, const struct sched_pa
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getstack.html
|
||||
int pthread_attr_getstack(const pthread_attr_t* attributes, void** p_stack_ptr, size_t* p_stack_size)
|
||||
int pthread_attr_getstack(pthread_attr_t const* attributes, void** p_stack_ptr, size_t* p_stack_size)
|
||||
{
|
||||
auto* attributes_impl = *(reinterpret_cast<const PthreadAttrImpl* const*>(attributes));
|
||||
auto* attributes_impl = *(reinterpret_cast<PthreadAttrImpl const* const*>(attributes));
|
||||
|
||||
if (!attributes_impl || !p_stack_ptr || !p_stack_size)
|
||||
return EINVAL;
|
||||
|
@ -429,9 +429,9 @@ int pthread_attr_setstack(pthread_attr_t* attributes, void* p_stack, size_t stac
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getstacksize.html
|
||||
int pthread_attr_getstacksize(const pthread_attr_t* attributes, size_t* p_stack_size)
|
||||
int pthread_attr_getstacksize(pthread_attr_t const* attributes, size_t* p_stack_size)
|
||||
{
|
||||
auto* attributes_impl = *(reinterpret_cast<const PthreadAttrImpl* const*>(attributes));
|
||||
auto* attributes_impl = *(reinterpret_cast<PthreadAttrImpl const* const*>(attributes));
|
||||
|
||||
if (!attributes_impl || !p_stack_size)
|
||||
return EINVAL;
|
||||
|
@ -465,7 +465,7 @@ int pthread_attr_setstacksize(pthread_attr_t* attributes, size_t stack_size)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getscope.html
|
||||
int pthread_attr_getscope([[maybe_unused]] const pthread_attr_t* attributes, [[maybe_unused]] int* contention_scope)
|
||||
int pthread_attr_getscope([[maybe_unused]] pthread_attr_t const* attributes, [[maybe_unused]] int* contention_scope)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -514,12 +514,12 @@ void* pthread_getspecific(pthread_key_t key)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_setspecific.html
|
||||
int pthread_setspecific(pthread_key_t key, const void* value)
|
||||
int pthread_setspecific(pthread_key_t key, void const* value)
|
||||
{
|
||||
return __pthread_setspecific(key, value);
|
||||
}
|
||||
|
||||
int pthread_setname_np(pthread_t thread, const char* name)
|
||||
int pthread_setname_np(pthread_t thread, char const* name)
|
||||
{
|
||||
if (!name)
|
||||
return EFAULT;
|
||||
|
@ -577,7 +577,7 @@ int pthread_spin_init(pthread_spinlock_t* lock, [[maybe_unused]] int shared)
|
|||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_spin_lock.html
|
||||
int pthread_spin_lock(pthread_spinlock_t* lock)
|
||||
{
|
||||
const auto desired = gettid();
|
||||
auto const desired = gettid();
|
||||
while (true) {
|
||||
auto current = AK::atomic_load(&lock->m_lock);
|
||||
|
||||
|
@ -647,7 +647,7 @@ constexpr static u32 writer_wake_mask = 1 << 31;
|
|||
constexpr static u32 writer_locked_mask = 1 << 17;
|
||||
constexpr static u32 writer_intent_mask = 1 << 16;
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_rwlock_init.html
|
||||
int pthread_rwlock_init(pthread_rwlock_t* __restrict lockp, const pthread_rwlockattr_t* __restrict attr)
|
||||
int pthread_rwlock_init(pthread_rwlock_t* __restrict lockp, pthread_rwlockattr_t const* __restrict attr)
|
||||
{
|
||||
// Just ignore the attributes. use defaults for now.
|
||||
(void)attr;
|
||||
|
@ -868,7 +868,7 @@ int pthread_rwlockattr_destroy(pthread_rwlockattr_t*)
|
|||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_rwlockattr_getpshared.html
|
||||
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t* __restrict, int* __restrict)
|
||||
int pthread_rwlockattr_getpshared(pthread_rwlockattr_t const* __restrict, int* __restrict)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue