mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:05:07 +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:
parent
26bb3e1acf
commit
08e4a1a4dc
20 changed files with 108 additions and 115 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue