summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2015-10-08 05:27:45 +0000
committered <ed@FreeBSD.org>2015-10-08 05:27:45 +0000
commitd29789315a01da50c6d660f2a64572817e7051dc (patch)
treef2b24bbc55e49827cb32fbf2423faf244f2c3e56 /sys/compat
parente7165de993627ae4de362b63641325ac81172afa (diff)
downloadFreeBSD-src-d29789315a01da50c6d660f2a64572817e7051dc.zip
FreeBSD-src-d29789315a01da50c6d660f2a64572817e7051dc.tar.gz
Properly format pointer size independent CloudABI system calls.
CloudABI has approximately 50 system calls that do not depend on the pointer size of the system. As the ABI is pretty compact, it takes little effort to each truss(8) the formatting rules for these system calls. Start off by formatting pointer size independent system calls. Changes: - Make it possible to include the CloudABI system call definitions in FreeBSD userspace builds. Add ${root}/sys to the truss(8) Makefile so we can pull in <compat/cloudabi/cloudabi_syscalldefs.h>. - Refactoring: patch up amd64-cloudabi64.c to use the CLOUDABI_* constants instead of rolling our own table. - Add table entries for all of the system calls. - Add new generic formatting types (UInt, IntArray) that we'll be using to format unsigned integers and arrays of integers. - Add CloudABI specific formatting types. Approved by: jhb Differential Revision: https://reviews.freebsd.org/D3836
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/cloudabi/cloudabi_syscalldefs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/cloudabi/cloudabi_syscalldefs.h b/sys/compat/cloudabi/cloudabi_syscalldefs.h
index 64b7ea9..fc86eff 100644
--- a/sys/compat/cloudabi/cloudabi_syscalldefs.h
+++ b/sys/compat/cloudabi/cloudabi_syscalldefs.h
@@ -28,12 +28,19 @@
#ifndef _CLOUDABI_SYSCALLDEFS_H_
#define _CLOUDABI_SYSCALLDEFS_H_
+#ifdef _KERNEL
#include <sys/types.h>
#include <sys/stdint.h>
#define alignas _Alignas
#define alignof _Alignof
#define static_assert _Static_assert
+#else
+#include <assert.h>
+#include <stdalign.h>
+#include <stddef.h>
+#include <stdint.h>
+#endif
/* Import machine-independent CloudABI definitions. */
#include <contrib/cloudabi/syscalldefs_mi.h>
OpenPOWER on IntegriCloud