summaryrefslogtreecommitdiff
path: root/middleware/multicore/open-amp/rpmsg/rpmsg_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/multicore/open-amp/rpmsg/rpmsg_core.h')
-rw-r--r--middleware/multicore/open-amp/rpmsg/rpmsg_core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/middleware/multicore/open-amp/rpmsg/rpmsg_core.h b/middleware/multicore/open-amp/rpmsg/rpmsg_core.h
index e70fd5c..10f4d44 100644
--- a/middleware/multicore/open-amp/rpmsg/rpmsg_core.h
+++ b/middleware/multicore/open-amp/rpmsg/rpmsg_core.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2014, Mentor Graphics Corporation
* All rights reserved.
+ * Copyright (c) 2015 Freescale Semiconductor, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -31,6 +32,7 @@
#ifndef _RPMSG_CORE_H_
#define _RPMSG_CORE_H_
+#include <stddef.h>
#include "../porting/env/env.h"
#include "../virtio/virtio.h"
#include "../common/hil/hil.h"
@@ -78,6 +80,9 @@
#define RPMSG_ERR_DEV_ID (RPMSG_ERRORS_BASE - 7)
#define RPMSG_ERR_DEV_ADDR (RPMSG_ERRORS_BASE - 8)
+/* Zero-Copy extension macros */
+#define RPMSG_HDR_FROM_BUF(buf) (struct rpmsg_hdr *)((char*)buf - \
+ offsetof(struct rpmsg_hdr, data))
struct rpmsg_channel;
typedef void (*rpmsg_rx_cb_t)(struct rpmsg_channel *, void *, int, void *, unsigned long);
typedef void (*rpmsg_chnl_cb_t)(struct rpmsg_channel *rp_chl);