mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-09 17:12:58 +00:00
2001-08-09 Joel Sherrill <joel@OARcorp.com>
* src/snd_mbx.c, src/tsnd_mbf.c: Unblocking message queue operations should NOT use _Thread_Executing for return status since it is permissible to invoke message send operations from an ISR. This was reported by Suvrat Gupta <suvrat@utstar.com>.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2001-08-09 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/snd_mbx.c, src/tsnd_mbf.c: Unblocking message queue operations
|
||||||
|
should NOT use _Thread_Executing for return status since it is
|
||||||
|
permissible to invoke message send operations from an ISR. This was
|
||||||
|
reported by Suvrat Gupta <suvrat@utstar.com>.
|
||||||
|
|
||||||
2001-04-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2001-04-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* configure.in: Add [-ansi -fasm] to RTEMS_PROG_CC_FOR_TARGET.
|
* configure.in: Add [-ansi -fasm] to RTEMS_PROG_CC_FOR_TARGET.
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ ER snd_msg(
|
|||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
unsigned32 message_priority;
|
unsigned32 message_priority;
|
||||||
void *message_contents;
|
void *message_contents;
|
||||||
|
CORE_message_queue_Status msg_status;
|
||||||
|
|
||||||
if ( !pk_msg )
|
if ( !pk_msg )
|
||||||
return E_PAR;
|
return E_PAR;
|
||||||
@@ -50,7 +51,7 @@ ER snd_msg(
|
|||||||
message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;
|
message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;
|
||||||
|
|
||||||
message_contents = pk_msg;
|
message_contents = pk_msg;
|
||||||
_CORE_message_queue_Submit(
|
msg_status = _CORE_message_queue_Submit(
|
||||||
&the_mailbox->message_queue,
|
&the_mailbox->message_queue,
|
||||||
&message_contents,
|
&message_contents,
|
||||||
sizeof(T_MSG *),
|
sizeof(T_MSG *),
|
||||||
@@ -64,8 +65,6 @@ ER snd_msg(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_ITRON_return_errorno(
|
_ITRON_return_errorno(
|
||||||
_ITRON_Mailbox_Translate_core_message_queue_return_code(
|
_ITRON_Mailbox_Translate_core_message_queue_return_code( msg_status )
|
||||||
_Thread_Executing->Wait.return_code
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ ER tsnd_mbf(
|
|||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
Watchdog_Interval interval;
|
Watchdog_Interval interval;
|
||||||
boolean wait;
|
boolean wait;
|
||||||
|
CORE_message_queue_Status msg_status;
|
||||||
|
|
||||||
if (msgsz <= 0 || !msg)
|
if (msgsz <= 0 || !msg)
|
||||||
return E_PAR;
|
return E_PAR;
|
||||||
@@ -61,7 +62,7 @@ ER tsnd_mbf(
|
|||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
/* XXX Submit needs to take into account blocking */
|
/* XXX Submit needs to take into account blocking */
|
||||||
_CORE_message_queue_Submit(
|
msg_status = _CORE_message_queue_Submit(
|
||||||
&the_message_buffer->message_queue,
|
&the_message_buffer->message_queue,
|
||||||
msg,
|
msg,
|
||||||
msgsz,
|
msgsz,
|
||||||
@@ -73,7 +74,7 @@ ER tsnd_mbf(
|
|||||||
);
|
);
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
|
return _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
|
||||||
_Thread_Executing->Wait.return_code
|
msg_status
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2001-08-09 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/snd_mbx.c, src/tsnd_mbf.c: Unblocking message queue operations
|
||||||
|
should NOT use _Thread_Executing for return status since it is
|
||||||
|
permissible to invoke message send operations from an ISR. This was
|
||||||
|
reported by Suvrat Gupta <suvrat@utstar.com>.
|
||||||
|
|
||||||
2001-04-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2001-04-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* configure.in: Add [-ansi -fasm] to RTEMS_PROG_CC_FOR_TARGET.
|
* configure.in: Add [-ansi -fasm] to RTEMS_PROG_CC_FOR_TARGET.
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ ER snd_msg(
|
|||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
unsigned32 message_priority;
|
unsigned32 message_priority;
|
||||||
void *message_contents;
|
void *message_contents;
|
||||||
|
CORE_message_queue_Status msg_status;
|
||||||
|
|
||||||
if ( !pk_msg )
|
if ( !pk_msg )
|
||||||
return E_PAR;
|
return E_PAR;
|
||||||
@@ -50,7 +51,7 @@ ER snd_msg(
|
|||||||
message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;
|
message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;
|
||||||
|
|
||||||
message_contents = pk_msg;
|
message_contents = pk_msg;
|
||||||
_CORE_message_queue_Submit(
|
msg_status = _CORE_message_queue_Submit(
|
||||||
&the_mailbox->message_queue,
|
&the_mailbox->message_queue,
|
||||||
&message_contents,
|
&message_contents,
|
||||||
sizeof(T_MSG *),
|
sizeof(T_MSG *),
|
||||||
@@ -64,8 +65,6 @@ ER snd_msg(
|
|||||||
}
|
}
|
||||||
|
|
||||||
_ITRON_return_errorno(
|
_ITRON_return_errorno(
|
||||||
_ITRON_Mailbox_Translate_core_message_queue_return_code(
|
_ITRON_Mailbox_Translate_core_message_queue_return_code( msg_status )
|
||||||
_Thread_Executing->Wait.return_code
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ ER tsnd_mbf(
|
|||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
Watchdog_Interval interval;
|
Watchdog_Interval interval;
|
||||||
boolean wait;
|
boolean wait;
|
||||||
|
CORE_message_queue_Status msg_status;
|
||||||
|
|
||||||
if (msgsz <= 0 || !msg)
|
if (msgsz <= 0 || !msg)
|
||||||
return E_PAR;
|
return E_PAR;
|
||||||
@@ -61,7 +62,7 @@ ER tsnd_mbf(
|
|||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
/* XXX Submit needs to take into account blocking */
|
/* XXX Submit needs to take into account blocking */
|
||||||
_CORE_message_queue_Submit(
|
msg_status = _CORE_message_queue_Submit(
|
||||||
&the_message_buffer->message_queue,
|
&the_message_buffer->message_queue,
|
||||||
msg,
|
msg,
|
||||||
msgsz,
|
msgsz,
|
||||||
@@ -73,7 +74,7 @@ ER tsnd_mbf(
|
|||||||
);
|
);
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
|
return _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
|
||||||
_Thread_Executing->Wait.return_code
|
msg_status
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user