]> err.no Git - linux-2.6/blobdiff - include/linux/pid.h
driver core: add init_name to struct device
[linux-2.6] / include / linux / pid.h
index ff1b2a5814d487afb592fd3a81618cf0c5813d5a..d7e98ff8021eb3bfc38e4c851b425c7eac5c097f 100644 (file)
@@ -107,7 +107,7 @@ extern struct pid_namespace init_pid_ns;
  * find_pid_ns() finds the pid in the namespace specified
  * find_vpid() finr the pid by its virtual id, i.e. in the current namespace
  *
- * see also find_task_by_pid() set in include/linux/sched.h
+ * see also find_task_by_vpid() set in include/linux/sched.h
  */
 extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
 extern struct pid *find_vpid(int nr);
@@ -161,4 +161,13 @@ pid_t pid_vnr(struct pid *pid);
                        }                                               \
        } while (0)
 
+#define do_each_pid_thread(pid, type, task)                            \
+       do_each_pid_task(pid, type, task) {                             \
+               struct task_struct *tg___ = task;                       \
+               do {
+
+#define while_each_pid_thread(pid, type, task)                         \
+               } while_each_thread(tg___, task);                       \
+               task = tg___;                                           \
+       } while_each_pid_task(pid, type, task)
 #endif /* _LINUX_PID_H */