lkml.org 
[lkml]   [2006]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRFC [patch 22/34] PID Virtualization define vpid_to_pid functions
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@watson.ibm.com>
---
sched.h | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: linux-2.6.15/include/linux/sched.h
===================================================================
--- linux-2.6.15.orig/include/linux/sched.h 2006-01-17 08:37:05.000000000 -0500
+++ linux-2.6.15/include/linux/sched.h 2006-01-17 08:37:06.000000000 -0500
@@ -878,6 +878,16 @@
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-17 15:58    [from the cache]
©2003-2011 Jasper Spaans