mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 01:04:38 +03:00
Kernel/aarch64: Add implementation of Processor::for_each
This commit is contained in:
parent
4927eb5396
commit
9ed04bdb33
Notes:
sideshowbarker
2024-07-17 00:23:42 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/9ed04bdb33 Pull-request: https://github.com/SerenityOS/serenity/pull/18354 Reviewed-by: https://github.com/nico ✅
@ -230,15 +230,20 @@ public:
|
||||
}
|
||||
|
||||
template<IteratorFunction<Processor&> Callback>
|
||||
static inline IterationDecision for_each(Callback)
|
||||
static inline IterationDecision for_each(Callback callback)
|
||||
{
|
||||
TODO_AARCH64();
|
||||
// FIXME: Once we support SMP for aarch64, make sure to call the callback for every processor.
|
||||
if (callback(*g_current_processor) == IterationDecision::Break)
|
||||
return IterationDecision::Break;
|
||||
return IterationDecision::Continue;
|
||||
}
|
||||
|
||||
template<VoidFunction<Processor&> Callback>
|
||||
static inline IterationDecision for_each(Callback)
|
||||
static inline IterationDecision for_each(Callback callback)
|
||||
{
|
||||
TODO_AARCH64();
|
||||
// FIXME: Once we support SMP for aarch64, make sure to call the callback for every processor.
|
||||
callback(*g_current_processor);
|
||||
return IterationDecision::Continue;
|
||||
}
|
||||
|
||||
static u32 count()
|
||||
|
Loading…
Reference in New Issue
Block a user