using rtems_message_queue_send in interrupt context

suvrat gupta suvrat at
Tue Jul 31 19:55:05 UTC 2001

RTEMS documentation says that its okay to use rtems_message_queue_send in
interrupt context.
The file coremsgsubmit.c seem to have a problem:
void _CORE_message_queue_Submit(
  CORE_message_queue_Control                *the_message_queue,
  void                                      *buffer,
  unsigned32                                 size,
  Objects_Id                                 id,
  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
  CORE_message_queue_Submit_types            submit_type,
  boolean                                    wait,
  Watchdog_Interval                          timeout
  ISR_Level                            level;
  CORE_message_queue_Buffer_control   *the_message;
  Thread_Control                      *the_thread;
  Thread_Control                      *executing;

  _Thread_Executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;

What does _Thread_Executing points to when this function is called form an
interrupt context?
If this point to the task which was interrupted when an interrupt occurred
then we will update the return value for that task too!
According to us you cannot use send to message queue function in both task and
interrupt context at the same time.
Am I missing something here? Is this a known problem? Or do I have old
documentation.I am working on 4.5.0

More information about the users mailing list