mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
AK+Everywhere: Replace __builtin bit functions
In order to reduce our reliance on __builtin_{ffs, clz, ctz, popcount},
this commit removes all calls to these functions and replaces them with
the equivalent functions in AK/BuiltinWrappers.h.
This commit is contained in:
committed by
Andreas Kling
parent
26bb3e1acf
commit
08e4a1a4dc
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/BuiltinWrappers.h>
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/FileSystem/OpenFileDescription.h>
|
||||
#include <Kernel/Net/Socket.h>
|
||||
@@ -473,7 +474,7 @@ bool Thread::SignalBlocker::check_pending_signals(bool from_add_blocker)
|
||||
if (m_did_unblock)
|
||||
return false;
|
||||
|
||||
auto matching_pending_signal = __builtin_ffsl(thread().pending_signals() & m_pending_set);
|
||||
auto matching_pending_signal = bit_scan_forward(thread().pending_signals() & m_pending_set);
|
||||
if (matching_pending_signal == 0)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user