RFC [patch 19/34] PID Virtualization Define pid_to_vpid functions

From: Serge Hallyn
Date: Tue Jan 17 2006 - 09:55:37 EST


In this patch we introduce convertion functions to
translate pids into virtual pids. These are just the APIs
not the implementation yet.
Subsequent patches will utilize these internal functions
to rewrite the task virtual pid/ppid/tgid access functions
such that finally we only have to rewrite these virtual
conversion functions to actually obtain the pid virtualization.

Signed-off-by: Hubertus Franke <frankeh@xxxxxxxxxxxxxx>
---
sched.h | 14 ++++++++++++++
1 files changed, 14 insertions(+)

Index: linux-2.6.15/include/linux/sched.h
===================================================================
--- linux-2.6.15.orig/include/linux/sched.h 2006-01-17 08:37:03.000000000 -0500
+++ linux-2.6.15/include/linux/sched.h 2006-01-17 08:37:05.000000000 -0500
@@ -865,6 +865,20 @@
}

/**
+ * pid domain translation functions:
+ * - from kernel to user pid domain
+ */
+static inline pid_t pid_to_vpid(pid_t pid)
+{
+ return pid;
+}
+
+static inline pid_t pgid_to_vpgid(pid_t pid)
+{
+ return pid;
+}
+
+/**
* pid_alive - check that a task structure is not stale
* @p: Task structure to be checked.
*

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/