aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2015-10-08 05:27:45 +0000
committerEd Schouten <ed@FreeBSD.org>2015-10-08 05:27:45 +0000
commit808d980506900560b111cdd31494e1e634b3153d (patch)
treef2b24bbc55e49827cb32fbf2423faf244f2c3e56 /sys/compat
parentc151731fbf8ec10d15e4344adc629c25111580e8 (diff)
downloadsrc-808d980506900560b111cdd31494e1e634b3153d.tar.gz
src-808d980506900560b111cdd31494e1e634b3153d.zip
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
Notes
Notes: svn path=/head/; revision=289004
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 64b7ea9495fa..fc86effee050 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>