Thread (30 messages) 30 messages, 8 authors, 2021-06-18

Re: [PATCH 4/6] sched: Add get_current_state()

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2021-06-02 14:01:37
Also in: cgroups, dm-devel, kvm, linux-block, linux-fsdevel, linux-mm, linux-pm, linux-usb, lkml, netdev, rcu

----- On Jun 2, 2021, at 9:12 AM, Peter Zijlstra peterz@infradead.org wrote:
Remove yet another few p->state accesses.
[...]
quoted hunk ↗ jump to hunk
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -212,6 +212,8 @@ struct task_group;
#endif

+#define get_current_state()	READ_ONCE(current->state)
Why use a macro rather than a static inline here ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help