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 fc8dffd commit 62ec05dCopy full SHA for 62ec05d
include/linux/sched.h
@@ -1265,6 +1265,16 @@ extern struct pid *cad_pid;
1265
#define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
1266
#define used_math() tsk_used_math(current)
1267
1268
+static inline bool is_percpu_thread(void)
1269
+{
1270
+#ifdef CONFIG_SMP
1271
+ return (current->flags & PF_NO_SETAFFINITY) &&
1272
+ (current->nr_cpus_allowed == 1);
1273
+#else
1274
+ return true;
1275
+#endif
1276
+}
1277
+
1278
/* Per-process atomic flags. */
1279
#define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */
1280
#define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */
0 commit comments