kernel: add function to query the current preempt count

This commit is contained in:
2023-05-01 08:26:41 +01:00
parent 194efd4b6b
commit 40762ffb95
2 changed files with 15 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ enum cpu_flags {
struct cpu_data {
enum cpu_flags c_flags;
unsigned int c_id;
unsigned int c_preempt_count;
int c_preempt_count;
struct runqueue c_rq;
struct queue c_timers;
@@ -46,6 +46,7 @@ static inline cycles_t cycles_diff(cycles_t then, cycles_t now)
extern void preempt_disable(void);
extern void preempt_enable(void);
extern int preempt_count(void);
extern unsigned int cpu_get_highest_available(void);