aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux32/linux.h
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2014-09-18 08:36:45 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2014-09-18 08:36:45 +0000
commit0a041f3b473b7155dcf80be6906550ea46d9b0e7 (patch)
tree61eb5bb3f31f81fe5a1bfacf9258573e6ba1c63a /sys/amd64/linux32/linux.h
parent5d99eb5926d63948e4cacd8898ba9de34bf7e0b1 (diff)
downloadsrc-0a041f3b473b7155dcf80be6906550ea46d9b0e7.tar.gz
src-0a041f3b473b7155dcf80be6906550ea46d9b0e7.zip
Implement most of timer_{create,settime,gettime,getoverrun,delete}
for amd64/linux32. Fix the entirely bogus (untested) version from r161310 for i386/linux using the same shared code in compat/linux. It is unclear to me if we could support more clock mappings but the current set allows me to successfully run commercial 32bit linux software under linuxolator on amd64. Reviewed by: jhb Differential Revision: D784 MFC after: 3 days Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=271743
Diffstat (limited to 'sys/amd64/linux32/linux.h')
-rw-r--r--sys/amd64/linux32/linux.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 7b52a64cf0eb..39c17c8d2135 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -61,6 +61,11 @@ MALLOC_DECLARE(M_LINUX);
#define PTRIN(v) (void *)(uintptr_t)(v)
#define PTROUT(v) (l_uintptr_t)(uintptr_t)(v)
+#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0)
+#define CP2(src,dst,sfld,dfld) do { (dst).dfld = (src).sfld; } while (0)
+#define PTRIN_CP(src,dst,fld) \
+ do { (dst).fld = PTRIN((src).fld); } while (0)
+
/*
* Provide a separate set of types for the Linux types.
*/