xen/rcu: fix types

Adjust some types: int -> bool, int -> unsigned int. Also fix a couple of
typos plus trailing white space.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger@xenproject.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Roger Pau Monne committed 2026-09-10 11:54:12 +02:00
1 parent 2f73bc7c06
commit fff00f1826
2 files changed
+10 -10

No files matched your search

+6 -6
View File
@@ -509,18 +509,18 @@ static int __rcu_pending(struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
return 0;
}
int rcu_pending(int cpu)
bool rcu_pending(unsigned int cpu)
{
return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
return !!__rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
}
/*
* Check to see if any future RCU-related work will need to be done
* by the current CPU, even if none need be done immediately, returning
* 1 if so. This function is part of the RCU implementation; it is -not-
* true if so. This function is part of the RCU implementation; it is -not-
* an exported member of the RCU API.
*/
int rcu_needs_cpu(int cpu)
bool rcu_needs_cpu(unsigned int cpu)
{
struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
@@ -529,7 +529,7 @@ int rcu_needs_cpu(int cpu)
/*
* Timer for making sure the CPU where a callback is queued does
* periodically poke rcu_pedning(), so that it will invoke the callback
* periodically poke rcu_pending(), so that it will invoke the callback
* not too late after the end of the grace period.
*/
static void rcu_idle_timer_start(void)
@@ -588,7 +588,7 @@ static void cf_check rcu_idle_timer_handler(void* data)
IDLE_TIMER_PERIOD_MIN);
}
void rcu_check_callbacks(int cpu)
void rcu_check_callbacks(unsigned int cpu)
{
struct rcu_data *rdp = &this_cpu(rcu_data);
+4 -4
View File
@@ -77,8 +77,8 @@ struct rcu_head {
} while (0)
int rcu_pending(int cpu);
int rcu_needs_cpu(int cpu);
bool rcu_pending(unsigned int cpu);
bool rcu_needs_cpu(unsigned int cpu);
/*
* Dummy lock type for passing to rcu_read_{lock,unlock}. Currently exists
@@ -168,10 +168,10 @@ static inline void rcu_read_unlock(rcu_read_lock_t *lock)
#define rcu_assign_pointer(p, v) ({ smp_wmb(); (p) = (v); })
void rcu_init(void);
void rcu_check_callbacks(int cpu);
void rcu_check_callbacks(unsigned int cpu);
/* Exported interfaces */
void call_rcu(struct rcu_head *head,
void call_rcu(struct rcu_head *head,
void (*func)(struct rcu_head *head));
void rcu_barrier(void);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.