rtdm: Add padding to rtser_config
The following changes since commit 6b1a185b460765c933b17932d77be6967d2e42dc:
Philippe Gerum (1):
nucleus: fix locking in shared heap deletion
are available in the git repository at:
git://git.xenomai.org/xenomai-jki.git for-upstream
Jan Kiszka (1):
rtdm: Add padding to rtser_config
include/rtdm/rtserial.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
---
rtdm: Add padding to rtser_config
The current layout of rtser_config is unfortunate as it may result in different layout depending on the compiler alignment setting. Namely, rx_timeout may be aligned on 8-byte boundaries in user land while it may not be aligned in the kernel, or vice versa.
Avoid this ambiguity by adding a reserved padding field. Bump profile revision number due to ABI breakage.
--- include/rtdm/rtserial.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
include/rtdm/rtserial.h +4 -2
@@ -29,7 +29,7 @@* Feel free to comment on this profile via the Xenomai mailing list * ([email protected]) or directly to the author ([email protected]). * -* @b Profile @b Revision: 2 +* @b Profile @b Revision: 3 * @n * @n * @par Device Characteristics
@@ -79,7 +79,7 @@#include <rtdm/rtdm.h> -#define RTSER_PROFILE_VER 2 +#define RTSER_PROFILE_VER 3/*! * @anchor RTSER_DEF_BAUD @name RTSER_DEF_BAUD
@@ -263,6 +263,8 @@ typedef struct rtser_config {/** reception FIFO interrupt threshold, see @ref RTSER_FIFO_xxx */ int fifo_depth; +int reserved; +/** reception timeout, see @ref RTSER_TIMEOUT_xxx for special * values */ nanosecs_rel_t rx_timeout;
Signature · 1 line
1.6.0.2
Quoted 18 lines · Jan Kiszka
The following changes since commit
6b1a185b460765c933b17932d77be6967d2e42dc:
Philippe Gerum (1):
nucleus: fix locking in shared heap deletionare available in the git repository at:
git://git.xenomai.org/xenomai-jki.gitfor-upstreamJan Kiszka (1):
rtdm: Add padding tortser_configinclude/rtdm/rtserial.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)---
rtdm: Add padding to
rtser_config
Quoted 7 lines
The current layout of
rtser_configis unfortunate as it may result in different layout depending on the compiler alignment setting. Namely,rx_timeoutmay be aligned on 8-byte boundaries in user land while it may not be aligned in the kernel, or vice versa.Avoid this ambiguity by adding a reserved padding field. Bump profile revision number due to ABI breakage.
Sorry, forgot to state explicitly: This is obviously no material for 2.4 as it breaks the ABI also for those users that didn't suffer from it so far (mostly x86). So please revert the corresponding commit.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux