* score/include/rtems/score/basedefs.h: Typo.
	* score/src/mpci.c, rtems/src/eventmp.c, rtems/src/msgmp.c,
	rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/semmp.c,
	rtems/src/signalmp.c, rtems/src/taskmp.c: Use RTEMS_STATIC_ASSERT() to
	ensure that the packet size is small enough.
This commit is contained in:
Sebastian Huber
2011-09-09 10:57:58 +00:00
parent f604a94280
commit d689de0b3c
10 changed files with 52 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
2011-09-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/include/rtems/score/basedefs.h: Typo.
* score/src/mpci.c, rtems/src/eventmp.c, rtems/src/msgmp.c,
rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/semmp.c,
rtems/src/signalmp.c, rtems/src/taskmp.c: Use RTEMS_STATIC_ASSERT() to
ensure that the packet size is small enough.
2011-09-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/monitor/mon-monitor.c: Removed "exit" and "quit" commands to

View File

@@ -26,6 +26,11 @@
#include <rtems/score/thread.h>
#include <rtems/rtems/support.h>
RTEMS_STATIC_ASSERT(
sizeof(Event_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
Event_MP_Packet
);
/*
* _Event_MP_Send_process_packet
*

View File

@@ -27,6 +27,14 @@
#include <rtems/score/watchdog.h>
#include <rtems/rtems/support.h>
#define MESSAGE_QUEUE_MP_PACKET_SIZE \
offsetof(Message_queue_MP_Packet, Buffer.buffer)
RTEMS_STATIC_ASSERT(
MESSAGE_QUEUE_MP_PACKET_SIZE <= MP_PACKET_MINIMUM_PACKET_SIZE,
Message_queue_MP_Packet
);
/*
* _Message_queue_MP_Send_process_packet
*

View File

@@ -26,6 +26,11 @@
#include <rtems/score/thread.h>
#include <rtems/rtems/support.h>
RTEMS_STATIC_ASSERT(
sizeof(Partition_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
Partition_MP_Packet
);
/*
* _Partition_MP_Send_process_packet
*

View File

@@ -26,6 +26,11 @@
#include <rtems/score/thread.h>
#include <rtems/rtems/support.h>
RTEMS_STATIC_ASSERT(
sizeof(Region_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
Region_MP_Packet
);
/*
* _Region_MP_Send_process_packet
*

View File

@@ -27,6 +27,11 @@
#include <rtems/score/watchdog.h>
#include <rtems/rtems/support.h>
RTEMS_STATIC_ASSERT(
sizeof(Semaphore_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
Semaphore_MP_Packet
);
/*
* _Semaphore_MP_Send_process_packet
*

View File

@@ -28,6 +28,11 @@
#include <rtems/score/watchdog.h>
#include <rtems/rtems/support.h>
RTEMS_STATIC_ASSERT(
sizeof(Signal_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
Signal_MP_Packet
);
/*
* _Signal_MP_Send_process_packet
*

View File

@@ -27,6 +27,11 @@
#include <rtems/score/watchdog.h>
#include <rtems/rtems/support.h>
RTEMS_STATIC_ASSERT(
sizeof(RTEMS_tasks_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
RTEMS_tasks_MP_Packet
);
/*
* _RTEMS_tasks_MP_Send_process_packet
*

View File

@@ -166,7 +166,7 @@
#endif
#define RTEMS_STATIC_ASSERT(cond, msg) \
typedef int rtems_static_assert ## msg [(cond) ? 1 : -1]
typedef int rtems_static_assert_ ## msg [(cond) ? 1 : -1]
#ifndef ASM
#ifdef RTEMS_DEPRECATED_TYPES

View File

@@ -34,6 +34,11 @@
#include <rtems/score/coresem.h>
#include <rtems/config.h>
RTEMS_STATIC_ASSERT(
sizeof(MPCI_Internal_packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
MPCI_Internal_packet
);
/**
* This is the core semaphore which the MPCI Receive Server blocks on.
*/