]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/sched.h
Merge tag 'docs-4.13' of git://git.lwn.net/linux
[karo-tx-linux.git] / include / linux / sched.h
index 1f0f427e0292f4ad1a7549bfc9d396353c7f97dd..9c4ca7433d9d6d89aa6bad857b5299ae1bbe5577 100644 (file)
@@ -1281,6 +1281,16 @@ extern struct pid *cad_pid;
 #define tsk_used_math(p)                       ((p)->flags & PF_USED_MATH)
 #define used_math()                            tsk_used_math(current)
 
+static inline bool is_percpu_thread(void)
+{
+#ifdef CONFIG_SMP
+       return (current->flags & PF_NO_SETAFFINITY) &&
+               (current->nr_cpus_allowed  == 1);
+#else
+       return true;
+#endif
+}
+
 /* Per-process atomic flags. */
 #define PFA_NO_NEW_PRIVS               0       /* May not gain new privileges. */
 #define PFA_SPREAD_PAGE                        1       /* Spread page cache over cpuset */