summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-01-29 18:41:30 +0000
committerjhb <jhb@FreeBSD.org>2013-01-29 18:41:30 +0000
commit2617d9f095bb1dfa934ef021a7237482304fcdb9 (patch)
tree5dd2d56667d33c443b367a39778b39489a36e09c /sys/compat/linux/linux_misc.h
parentc007da37d332cc74b36ba78883813ce297764683 (diff)
downloadFreeBSD-src-2617d9f095bb1dfa934ef021a7237482304fcdb9.zip
FreeBSD-src-2617d9f095bb1dfa934ef021a7237482304fcdb9.tar.gz
Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h
by moving bits that are MI out into headers in compat/linux. Reviewed by: Chagin Dmitry dmitry | gmail MFC after: 2 weeks
Diffstat (limited to 'sys/compat/linux/linux_misc.h')
-rw-r--r--sys/compat/linux/linux_misc.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h
index b771825..154d78f 100644
--- a/sys/compat/linux/linux_misc.h
+++ b/sys/compat/linux/linux_misc.h
@@ -31,6 +31,14 @@
#ifndef _LINUX_MISC_H_
#define _LINUX_MISC_H_
+/*
+ * Miscellaneous
+ */
+#define LINUX_NAME_MAX 255
+#define LINUX_MAX_UTSNAME 65
+
+#define LINUX_CTL_MAXNAME 10
+
/* defines for prctl */
#define LINUX_PR_SET_PDEATHSIG 1 /* Second arg is a signal. */
#define LINUX_PR_GET_PDEATHSIG 2 /*
@@ -67,11 +75,51 @@ extern const char *linux_platform;
#define __LINUX_NPXCW__ 0x37f
#endif
+#define LINUX_CLONE_VM 0x00000100
+#define LINUX_CLONE_FS 0x00000200
+#define LINUX_CLONE_FILES 0x00000400
+#define LINUX_CLONE_SIGHAND 0x00000800
+#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */
+#define LINUX_CLONE_VFORK 0x00004000
+#define LINUX_CLONE_PARENT 0x00008000
+#define LINUX_CLONE_THREAD 0x00010000
+#define LINUX_CLONE_SETTLS 0x00080000
+#define LINUX_CLONE_PARENT_SETTID 0x00100000
+#define LINUX_CLONE_CHILD_CLEARTID 0x00200000
+#define LINUX_CLONE_CHILD_SETTID 0x01000000
+
+#define LINUX_THREADING_FLAGS \
+ (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \
+ LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
+
+/* Scheduling policies */
+#define LINUX_SCHED_OTHER 0
+#define LINUX_SCHED_FIFO 1
+#define LINUX_SCHED_RR 2
+
+struct l_new_utsname {
+ char sysname[LINUX_MAX_UTSNAME];
+ char nodename[LINUX_MAX_UTSNAME];
+ char release[LINUX_MAX_UTSNAME];
+ char version[LINUX_MAX_UTSNAME];
+ char machine[LINUX_MAX_UTSNAME];
+ char domainname[LINUX_MAX_UTSNAME];
+};
+
+#define LINUX_CLOCK_REALTIME 0
+#define LINUX_CLOCK_MONOTONIC 1
+#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
+#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
+#define LINUX_CLOCK_REALTIME_HR 4
+#define LINUX_CLOCK_MONOTONIC_HR 5
+
extern int stclohz;
#define __WCLONE 0x80000000
int linux_common_wait(struct thread *td, int pid, int *status,
int options, struct rusage *ru);
+int linux_set_upcall_kse(struct thread *td, register_t stack);
+int linux_set_cloned_tls(struct thread *td, void *desc);
#endif /* _LINUX_MISC_H_ */
OpenPOWER on IntegriCloud