[RFC][patch 09/21] PID Virtualization: define vpid_to_pid functions

From: Hubertus Franke
Date: Thu Dec 15 2005 - 09:38:26 EST


Introduce the reverse conversion functions namely from the
user virtual pid to the kernel pid.
Again, we only specify the API here, will utilize the API
at the appropriate locations in subsequent patches and finally
will provide a real implementation for the virtualization
behind these functions together with the pid_to_vpid conversion.
Any pid passed through the syscall interface from userspace
is virtual and therefore must pass through this conversion
before it can be used as a kernel pid.

Signed-off-by: Hubertus Franke <frankeh@xxxxxxxxxxxxxx>
--

include/linux/sched.h | 10 ++++++++++
1 files changed, 10 insertions(+)

Index: linux-2.6.15-rc1/include/linux/sched.h
===================================================================
--- linux-2.6.15-rc1.orig/include/linux/sched.h 2005-11-30 18:08:03.000000000 -0500
+++ linux-2.6.15-rc1/include/linux/sched.h 2005-11-30 18:08:04.000000000 -0500
@@ -879,6 +879,16 @@ static inline pid_t pgid_to_vpgid(pid_t
return pid;
}

+static inline pid_t vpid_to_pid(pid_t pid)
+{
+ return pid;
+}
+
+static inline pid_t vpgid_to_pgid(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/