aboutsummaryrefslogtreecommitdiff
path: root/arch/um/sys-x86_64/util/mk_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/sys-x86_64/util/mk_thread.c')
-rw-r--r--arch/um/sys-x86_64/util/mk_thread.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/um/sys-x86_64/util/mk_thread.c b/arch/um/sys-x86_64/util/mk_thread.c
new file mode 100644
index 00000000000..15517396e9c
--- /dev/null
+++ b/arch/um/sys-x86_64/util/mk_thread.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <kernel-offsets.h>
+
+int main(int argc, char **argv)
+{
+ printf("/*\n");
+ printf(" * Generated by mk_thread\n");
+ printf(" */\n");
+ printf("\n");
+ printf("#ifndef __UM_THREAD_H\n");
+ printf("#define __UM_THREAD_H\n");
+ printf("\n");
+#ifdef TASK_EXTERN_PID
+ printf("#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[%d]))\n",
+ TASK_EXTERN_PID);
+#endif
+ printf("\n");
+ printf("#endif\n");
+ return(0);
+}