We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b977f03 commit f96f41aCopy full SHA for f96f41a
arch/s390/include/asm/processor.h
@@ -59,6 +59,22 @@ static __always_inline bool test_cpu_flag(int flag)
59
return S390_lowcore.cpu_flags & (1UL << flag);
60
}
61
62
+static __always_inline bool test_and_set_cpu_flag(int flag)
63
+{
64
+ if (test_cpu_flag(flag))
65
+ return true;
66
+ set_cpu_flag(flag);
67
+ return false;
68
+}
69
+
70
+static __always_inline bool test_and_clear_cpu_flag(int flag)
71
72
+ if (!test_cpu_flag(flag))
73
74
+ clear_cpu_flag(flag);
75
76
77
78
/*
79
* Test CIF flag of another CPU. The caller needs to ensure that
80
* CPU hotplug can not happen, e.g. by disabling preemption.
0 commit comments