]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: move psinfo to its own header file
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 23 Jan 2013 09:47:21 +0000 (04:47 -0500)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:41:40 +0000 (22:41 +0100)
The psinfo structure definition and related function prototypes have been moved
to their own header file to avoiding including dtrace_os.h in sched.h.  This is
also one step closer to providing the psinfo as a more generic piece of info,
rather than it being dtrace specific.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
include/linux/dtrace_os.h
include/linux/dtrace_psinfo.h [new file with mode: 0644]
include/linux/sched.h

index 070899f02004becf26269cf33ebefbcbbb148d49..c0d0ed33fa3bb50c3453a88eee3cb89550a55fe7 100644 (file)
@@ -1,27 +1,10 @@
-/* Copyright (C) 2011 Oracle Corporation */
+/* Copyright (C) 2011, 2012, 2013 Oracle Corporation */
 
 #ifndef _DTRACE_OS_H_
 #define _DTRACE_OS_H_
 
-#define PR_PSARGS_SZ           80
-
-typedef struct dtrace_psinfo {
-       union {
-               unsigned long argc;
-               struct dtrace_psinfo *next;
-       };
-       char **argv;
-       char **envp;
-       char psargs[PR_PSARGS_SZ];
-} dtrace_psinfo_t;
-
-#ifndef COMPILE_OFFSETS
-
 #include <asm/asm-offsets.h>
 
-extern dtrace_psinfo_t *dtrace_psinfo_alloc(struct task_struct *);
-extern void dtrace_psinfo_free(dtrace_psinfo_t *);
-
 typedef uint32_t dtrace_id_t;
 
 #define DTRACE_IDNONE 0
@@ -98,6 +81,4 @@ typedef void          *(fbt_provide_fn)(struct module *, char *, uint8_t,
 
 extern void dtrace_fbt_init(fbt_provide_fn);
 
-#endif /* COMPILE_OFFSETS */
-
 #endif /* _DTRACE_OS_H_ */
diff --git a/include/linux/dtrace_psinfo.h b/include/linux/dtrace_psinfo.h
new file mode 100644 (file)
index 0000000..7c6c6c1
--- /dev/null
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011, 2012, 2013 Oracle, Inc. */
+
+#ifndef _DTRACE_PSINFO_H_
+#define _DTRACE_PSINFO_H_
+
+#define PR_PSARGS_SZ           80
+
+typedef struct dtrace_psinfo {
+       union {
+               unsigned long argc;
+               struct dtrace_psinfo *next;
+       };
+       char **argv;
+       char **envp;
+       char psargs[PR_PSARGS_SZ];
+} dtrace_psinfo_t;
+
+extern dtrace_psinfo_t *dtrace_psinfo_alloc(struct task_struct *);
+extern void dtrace_psinfo_free(dtrace_psinfo_t *);
+
+#endif /* _DTRACE_PSINFO_H_ */
index 51e211a70201de268aa350adafed0c566e2372d6..2b89630bbfc4932f8cab71c986ec24e2a5b07ee1 100644 (file)
@@ -58,7 +58,7 @@ struct sched_param {
 #include <linux/uidgid.h>
 #include <linux/gfp.h>
 #include <linux/magic.h>
-#include <linux/dtrace_os.h>
+#include <linux/dtrace_psinfo.h>
 
 #include <asm/processor.h>