summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2014-09-23 07:50:04 +0000
committerbz <bz@FreeBSD.org>2014-09-23 07:50:04 +0000
commitcbd13542a75955c4a6540a62f351cae6693f5495 (patch)
tree89964ddeb9656610ec43f402508d0ccf8e508b99 /sys/i386/linux/linux.h
parent1dbb0a190712aa6823848586eff5dee25488ec87 (diff)
downloadFreeBSD-src-cbd13542a75955c4a6540a62f351cae6693f5495.zip
FreeBSD-src-cbd13542a75955c4a6540a62f351cae6693f5495.tar.gz
MFC r271743:
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 Sponsored by: DARPA, AFRL Approved by: re (gjb)
Diffstat (limited to 'sys/i386/linux/linux.h')
-rw-r--r--sys/i386/linux/linux.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 87d419f..27eff32 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -54,6 +54,11 @@ MALLOC_DECLARE(M_LINUX);
#define PTRIN(v) (void *)(v)
#define PTROUT(v) (l_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.
*/
OpenPOWER on IntegriCloud