kernel/debug: Introduce arch_debug_snooze() and make use of it.
The idea is to add a facility that will use less CPU than the loops we currently use. The default implementation just calls spin(), which is rdtsc+pause. This already may save some power compared to what we previously did, which was to re-check serial ports, PS/2, etc. every single loop in the debugger, broken up only by "pause". Change-Id: Ie421adae5c25ad6ae0c266d1d28c2ea7b81ae465 Reviewed-on: https://review.haiku-os.org/c/haiku/+/9603 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
6de89c6cdf
commit
2082e1b86e
@@ -53,6 +53,8 @@ status_t arch_get_debug_variable(const char* variableName, uint64* value);
|
||||
|
||||
ssize_t arch_debug_gdb_get_registers(char* buffer, size_t bufferSize);
|
||||
|
||||
void arch_debug_snooze(bigtime_t duration);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user