From 32aaaff486690446452fe92273ea43d557b6f059 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 13 Sep 2009 22:11:41 +0000 Subject: 2009-09-13 Joel Sherrill * score/inline/rtems/score/coremsg.inl: Fix compilation issue when notifications are not enabled. --- cpukit/score/inline/rtems/score/coremsg.inl | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'cpukit/score/inline/rtems/score/coremsg.inl') diff --git a/cpukit/score/inline/rtems/score/coremsg.inl b/cpukit/score/inline/rtems/score/coremsg.inl index dd53865aa7..5ec313af9a 100644 --- a/cpukit/score/inline/rtems/score/coremsg.inl +++ b/cpukit/score/inline/rtems/score/coremsg.inl @@ -154,7 +154,9 @@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_message_priority ( int priority ) { - the_message->priority = priority; + #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) + the_message->priority = priority; + #endif } /** @@ -234,22 +236,26 @@ RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_null ( return (the_message_queue->notify_handler != NULL); } #endif - + /** * This routine initializes the notification information for * @a the_message_queue. */ -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Notify_Handler the_handler, - void *the_argument -) -{ #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) - the_message_queue->notify_handler = the_handler; - the_message_queue->notify_argument = the_argument; + RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify ( + CORE_message_queue_Control *the_message_queue, + CORE_message_queue_Notify_Handler the_handler, + void *the_argument + ) + { + the_message_queue->notify_handler = the_handler; + the_message_queue->notify_argument = the_argument; + } +#else + /* turn it into nothing if not enabled */ + #define _CORE_message_queue_Set_notify( \ + the_message_queue, the_handler, the_argument ) #endif -} /**@}*/ -- cgit v1.2.3