From 5e9b32b439627068a0292370fe595220dbfc95a0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 26 Sep 1995 19:27:15 +0000 Subject: posix support initially added --- c/src/exec/score/macros/coremsg.inl | 22 ++++++++++++++++++++++ c/src/exec/score/macros/heap.inl | 2 +- c/src/exec/score/macros/priority.inl | 2 +- c/src/exec/score/macros/rtems/score/coremsg.inl | 22 ++++++++++++++++++++++ c/src/exec/score/macros/rtems/score/heap.inl | 2 +- c/src/exec/score/macros/rtems/score/priority.inl | 2 +- c/src/exec/score/macros/rtems/score/tqdata.inl | 9 +++++++++ c/src/exec/score/macros/rtems/score/watchdog.inl | 2 +- c/src/exec/score/macros/tqdata.inl | 9 +++++++++ c/src/exec/score/macros/watchdog.inl | 2 +- 10 files changed, 68 insertions(+), 6 deletions(-) (limited to 'c/src/exec/score/macros') diff --git a/c/src/exec/score/macros/coremsg.inl b/c/src/exec/score/macros/coremsg.inl index 877d737afd..d69c599d9f 100644 --- a/c/src/exec/score/macros/coremsg.inl +++ b/c/src/exec/score/macros/coremsg.inl @@ -117,5 +117,27 @@ _id, _api_message_queue_mp_support ) \ #define _CORE_message_queue_Is_null( _the_message_queue ) \ ( (_the_message_queue) == NULL ) +/*PAGE + * + * _CORE_message_queue_Is_notify_enabled + * + */ + +#define _CORE_message_queue_Is_notify_enabled( _the_message_queue ) \ + ( (_the_message_queue)->notify_handler != NULL ) + +/*PAGE + * + * _CORE_message_queue_Set_notify + * + */ + +#define _CORE_message_queue_Set_notify( \ + _the_message_queue, _the_handler, _the_argument ) \ + do { \ + (_the_message_queue->notify_handler = (_the_handler); \ + (_the_message_queue->notify_argument = (_the_argument); \ + } while ( 0 ) + #endif /* end of include file */ diff --git a/c/src/exec/score/macros/heap.inl b/c/src/exec/score/macros/heap.inl index f04d69cdb6..47df055100 100644 --- a/c/src/exec/score/macros/heap.inl +++ b/c/src/exec/score/macros/heap.inl @@ -17,7 +17,7 @@ #ifndef __HEAP_inl #define __HEAP_inl -#include +#include /*PAGE * diff --git a/c/src/exec/score/macros/priority.inl b/c/src/exec/score/macros/priority.inl index d78e2a0628..3db8aee4fa 100644 --- a/c/src/exec/score/macros/priority.inl +++ b/c/src/exec/score/macros/priority.inl @@ -17,7 +17,7 @@ #ifndef __PRIORITY_inl #define __PRIORITY_inl -#include +#include /*PAGE * diff --git a/c/src/exec/score/macros/rtems/score/coremsg.inl b/c/src/exec/score/macros/rtems/score/coremsg.inl index 877d737afd..d69c599d9f 100644 --- a/c/src/exec/score/macros/rtems/score/coremsg.inl +++ b/c/src/exec/score/macros/rtems/score/coremsg.inl @@ -117,5 +117,27 @@ _id, _api_message_queue_mp_support ) \ #define _CORE_message_queue_Is_null( _the_message_queue ) \ ( (_the_message_queue) == NULL ) +/*PAGE + * + * _CORE_message_queue_Is_notify_enabled + * + */ + +#define _CORE_message_queue_Is_notify_enabled( _the_message_queue ) \ + ( (_the_message_queue)->notify_handler != NULL ) + +/*PAGE + * + * _CORE_message_queue_Set_notify + * + */ + +#define _CORE_message_queue_Set_notify( \ + _the_message_queue, _the_handler, _the_argument ) \ + do { \ + (_the_message_queue->notify_handler = (_the_handler); \ + (_the_message_queue->notify_argument = (_the_argument); \ + } while ( 0 ) + #endif /* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/heap.inl b/c/src/exec/score/macros/rtems/score/heap.inl index f04d69cdb6..47df055100 100644 --- a/c/src/exec/score/macros/rtems/score/heap.inl +++ b/c/src/exec/score/macros/rtems/score/heap.inl @@ -17,7 +17,7 @@ #ifndef __HEAP_inl #define __HEAP_inl -#include +#include /*PAGE * diff --git a/c/src/exec/score/macros/rtems/score/priority.inl b/c/src/exec/score/macros/rtems/score/priority.inl index d78e2a0628..3db8aee4fa 100644 --- a/c/src/exec/score/macros/rtems/score/priority.inl +++ b/c/src/exec/score/macros/rtems/score/priority.inl @@ -17,7 +17,7 @@ #ifndef __PRIORITY_inl #define __PRIORITY_inl -#include +#include /*PAGE * diff --git a/c/src/exec/score/macros/rtems/score/tqdata.inl b/c/src/exec/score/macros/rtems/score/tqdata.inl index 5f657c1a94..c0d7ee8e5e 100644 --- a/c/src/exec/score/macros/rtems/score/tqdata.inl +++ b/c/src/exec/score/macros/rtems/score/tqdata.inl @@ -35,5 +35,14 @@ #define _Thread_queue_Is_reverse_search( _the_priority ) \ ( (_the_priority) & 0x20 ) +/*PAGE + * + * _Thread_queue_Get_number_waiting + * + */ + +#define _Thread_queue_Get_number_waiting( _the_thread_queue ) \ + ( (_the_thread_queue)->count ) + #endif /* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/watchdog.inl b/c/src/exec/score/macros/rtems/score/watchdog.inl index 15023722c6..a8a061b144 100644 --- a/c/src/exec/score/macros/rtems/score/watchdog.inl +++ b/c/src/exec/score/macros/rtems/score/watchdog.inl @@ -17,7 +17,7 @@ #ifndef __WATCHDOG_inl #define __WATCHDOG_inl -#include +#include /*PAGE * diff --git a/c/src/exec/score/macros/tqdata.inl b/c/src/exec/score/macros/tqdata.inl index 5f657c1a94..c0d7ee8e5e 100644 --- a/c/src/exec/score/macros/tqdata.inl +++ b/c/src/exec/score/macros/tqdata.inl @@ -35,5 +35,14 @@ #define _Thread_queue_Is_reverse_search( _the_priority ) \ ( (_the_priority) & 0x20 ) +/*PAGE + * + * _Thread_queue_Get_number_waiting + * + */ + +#define _Thread_queue_Get_number_waiting( _the_thread_queue ) \ + ( (_the_thread_queue)->count ) + #endif /* end of include file */ diff --git a/c/src/exec/score/macros/watchdog.inl b/c/src/exec/score/macros/watchdog.inl index 15023722c6..a8a061b144 100644 --- a/c/src/exec/score/macros/watchdog.inl +++ b/c/src/exec/score/macros/watchdog.inl @@ -17,7 +17,7 @@ #ifndef __WATCHDOG_inl #define __WATCHDOG_inl -#include +#include /*PAGE * -- cgit v1.2.3