aboutsummaryrefslogtreecommitdiffstats
path: root/doc/various
diff options
context:
space:
mode:
authoredolomb <none@example.com>2017-09-22 14:27:32 +0000
committeredolomb <none@example.com>2017-09-22 14:27:32 +0000
commitd6f80d88f4399fd26ff71c2079ed5482eb9624c5 (patch)
tree2244365c459c80940a8b1c6f538e687f1de7d0a2 /doc/various
parent2c47e89a8866359d30c916cdb3a6ff12368ecf3f (diff)
downloadChibiOS-d6f80d88f4399fd26ff71c2079ed5482eb9624c5.tar.gz
ChibiOS-d6f80d88f4399fd26ff71c2079ed5482eb9624c5.tar.bz2
ChibiOS-d6f80d88f4399fd26ff71c2079ed5482eb9624c5.zip
Minor changes in XDMAC driver
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10683 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'doc/various')
0 files changed, 0 insertions, 0 deletions
/pre>
/*
 * Generate definitions needed by assembly language modules.
 * This code generates raw asm output which is post-processed
 * to extract and format the required data.
 */

#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/personality.h>
#include <linux/suspend.h>
#include <asm/ucontext.h>
#include "sigframe.h"
#include <asm/fixmap.h>
#include <asm/processor.h>
#include <asm/thread_info.h>
#include <asm/elf.h>

#define DEFINE(sym, val) \
        asm volatile("\n->" #sym " %0 " #val : : "i" (val))

#define BLANK() asm volatile("\n->" : : )

#define OFFSET(sym, str, mem) \
	DEFINE(sym, offsetof(struct str, mem));

void foo(void)
{
	OFFSET(SIGCONTEXT_eax, sigcontext, eax);
	OFFSET(SIGCONTEXT_ebx, sigcontext, ebx);
	OFFSET(SIGCONTEXT_ecx, sigcontext, ecx);
	OFFSET(SIGCONTEXT_edx, sigcontext, edx);
	OFFSET(SIGCONTEXT_esi, sigcontext, esi);