Changeset 64189a70 in rtems
- Timestamp:
- 01/28/21 10:29:12 (17 months ago)
- Branches:
- master
- Children:
- 450c170
- Parents:
- dc2a6987
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/28/21 10:29:12)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (02/01/21 05:22:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/src/coremsgsubmit.c
rdc2a6987 r64189a70 100 100 } 101 101 102 #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) 102 #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) 103 _CORE_message_queue_Release( the_message_queue, queue_context ); 104 return STATUS_TOO_MANY; 105 #else 106 /* 107 * No message buffers were available so we may need to return an 108 * overflow error or block the sender until the message is placed 109 * on the queue. 110 */ 111 if ( !wait ) { 103 112 _CORE_message_queue_Release( the_message_queue, queue_context ); 104 113 return STATUS_TOO_MANY; 105 #else 106 /* 107 * No message buffers were available so we may need to return an 108 * overflow error or block the sender until the message is placed 109 * on the queue. 110 */ 111 if ( !wait ) { 112 _CORE_message_queue_Release( the_message_queue, queue_context ); 113 return STATUS_TOO_MANY; 114 } 114 } 115 115 116 117 118 119 120 121 122 123 116 /* 117 * Do NOT block on a send if the caller is in an ISR. It is 118 * deadly to block in an ISR. 119 */ 120 if ( _ISR_Is_in_progress() ) { 121 _CORE_message_queue_Release( the_message_queue, queue_context ); 122 return STATUS_MESSAGE_QUEUE_WAIT_IN_ISR; 123 } 124 124 125 126 127 128 129 130 131 132 133 125 /* 126 * WARNING!! executing should NOT be used prior to this point. 127 * Thus the unusual choice to open a new scope and declare 128 * it as a variable. Doing this emphasizes how dangerous it 129 * would be to use this variable prior to here. 130 */ 131 executing->Wait.return_argument_second.immutable_object = buffer; 132 executing->Wait.option = (uint32_t) size; 133 executing->Wait.count = submit_type; 134 134 135 136 137 138 139 140 141 142 143 144 145 146 135 _Thread_queue_Context_set_thread_state( 136 queue_context, 137 STATES_WAITING_FOR_MESSAGE 138 ); 139 _Thread_queue_Enqueue( 140 &the_message_queue->Wait_queue.Queue, 141 the_message_queue->operations, 142 executing, 143 queue_context 144 ); 145 return _Thread_Wait_get_status( executing ); 146 #endif 147 147 }
Note: See TracChangeset
for help on using the changeset viewer.