Changeset 5e96e917 in rtems
- Timestamp:
- 11/17/99 15:24:11 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 4ccd020
- Parents:
- c730be8f
- Files:
-
- 16 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/itron/include/itronsys/mbox.h
rc730be8f r5e96e917 22 22 ATR mbxatr; /* mailbox attributes */ 23 23 /* Following is implementation-dependent function */ 24 INT bufcnt; /* ring buffer size*/24 INT bufcnt; /* maximum number of messages to let pend */ 25 25 /* additional information may be included depending on the implementation */ 26 26 } T_CMBX; … … 39 39 * A region (header) reserved by the OS may be included first 40 40 * depending on the implementation. 41 * 42 * NOTE: The first two fields are RTEMS specific. 41 43 */ 44 45 INT msgpri; /* priority of each message */ 42 46 /* VB msgcont[]; XXX */ 43 47 unsigned8 msgcont[1]; … … 64 68 65 69 ER cre_mbx( 66 ID mbxid,67 T_CMBX *pk_cmbx70 ID mbxid, 71 T_CMBX *pk_cmbx 68 72 ); 69 73 … … 81 85 82 86 ER snd_msg( 83 ID mbxid,87 ID mbxid, 84 88 T_MSG *pk_msg 85 89 ); … … 91 95 ER rcv_msg( 92 96 T_MSG **ppk_msg, 93 ID mbxid97 ID mbxid 94 98 ); 95 99 … … 100 104 ER prcv_msg( 101 105 T_MSG **ppk_msg, 102 ID mbxid106 ID mbxid 103 107 ); 104 108 … … 109 113 ER trcv_msg( 110 114 T_MSG **ppk_msg, 111 ID mbxid,112 TMO tmout115 ID mbxid, 116 TMO tmout 113 117 ); 114 118 … … 119 123 ER ref_mbx( 120 124 T_RMBX *pk_rmbx, 121 ID mbxid125 ID mbxid 122 126 ); 123 127 -
c/src/exec/itron/include/rtems/itron/mbox.h
rc730be8f r5e96e917 15 15 16 16 #include <rtems/itron/object.h> 17 #include <rtems/score/coremsg.h> 17 18 18 19 /* … … 21 22 22 23 typedef struct { 23 ITRON_Objects_Control Object; 24 unsigned32 XXX_more_stuff_goes_here; 24 ITRON_Objects_Control Object; 25 unsigned32 count; 26 boolean do_message_priority; 27 CORE_message_queue_Control message_queue; 25 28 } ITRON_Mailbox_Control; 26 29 … … 45 48 46 49 /* 47 * XXX insert private stuff here 50 * _ITRON_Mailbox_Translate_core_message_queue_return_code 51 * 52 * DESCRIPTION: 53 * 54 * This routine translates a core message queue object status 55 * into the appropriate ITRON status code. 48 56 */ 57 58 ER _ITRON_Mailbox_Translate_core_message_queue_return_code( 59 CORE_message_queue_Status status 60 ); 49 61 50 62 #include <rtems/itron/mbox.inl> -
c/src/exec/itron/src/mbox.c
rc730be8f r5e96e917 13 13 #include <rtems/itron/mbox.h> 14 14 #include <rtems/itron/task.h> 15 16 /*17 * _ITRON_Mailbox_Translate_core_message_queue_return_code18 *19 * This routine translates a core message queue object status20 * into the appropriate ITRON status code.21 */22 23 ER _ITRON_Mailbox_Translate_core_message_queue_return_code(24 CORE_message_queue_Status status25 )26 {27 switch (status) {28 case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:29 return E_OK;30 case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:31 return E_TMOUT;32 case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:33 return E_PAR;34 case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:35 return E_TMOUT;36 case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:37 return E_TMOUT;38 default:39 return E_ID;40 }41 }42 15 43 16 /* … … 77 50 78 51 } 79 80 81 /*82 * cre_mbx - Create Mailbox83 *84 * Creates a Mailbox according to the following spec:85 *86 * ------Parameters-------------------------87 * ID mbxid MailboxID88 * T_CMBX *pk_cmbx Packet to Create Mailbox89 * -----------------------------------------90 * -*pk_cmbx members*-91 * VP exinf ExtendedInformation92 * ATR mbxatr MailboxAttributes93 * (the use of the following information94 * is implementation dependent)95 * INT bufcnt BufferMessageCount96 * (CPU and/or implementation-dependent information97 * may also be included)98 *99 * ----Return Parameters--------------------100 * ER ercd ErrorCode101 * -----------------------------------------102 *103 *104 * ----C Language Interface-----------------105 * ER ercd = cre_mbx ( ID mbxid, T_CMBX *pk_cmbx ) ;106 * -----------------------------------------107 *108 */109 110 ER cre_mbx(111 ID mbxid,112 T_CMBX *pk_cmbx113 )114 {115 register ITRON_Mailbox_Control *the_mailbox;116 CORE_message_queue_Attributes the_mailbox_attributes;117 118 if ( !pk_cmbx )119 return E_PAR;120 121 if ((pk_cmbx->mbxatr & (TA_TPRI | TA_MPRI)) != 0 )122 return E_RSATR;123 124 _Thread_Disable_dispatch(); /* protects object pointer */125 126 the_mailbox = _ITRON_Mailbox_Allocate( mbxid );127 if ( !the_mailbox ) {128 _Thread_Enable_dispatch();129 return _ITRON_Mailbox_Clarify_allocation_id_error( mbxid );130 }131 132 the_mailbox->count = pk_cmbx->bufcnt;133 if (pk_cmbx->mbxatr & TA_MPRI)134 the_mailbox->do_message_priority = TRUE;135 else136 the_mailbox->do_message_priority = FALSE;137 138 if (pk_cmbx->mbxatr & TA_TPRI)139 the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;140 else141 the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;142 143 if ( !_CORE_message_queue_Initialize(144 &the_mailbox->message_queue,145 OBJECTS_ITRON_MAILBOXES,146 &the_mailbox_attributes,147 the_mailbox->count,148 sizeof(T_MSG *),149 NULL ) ) { /* Multiprocessing not supported */150 _ITRON_Mailbox_Free(the_mailbox);151 _ITRON_return_errorno( E_OBJ );152 }153 154 _ITRON_Objects_Open( &_ITRON_Mailbox_Information, &the_mailbox->Object );155 156 /*157 * If multiprocessing were supported, this is where we would announce158 * the existence of the semaphore to the rest of the system.159 */160 161 #if defined(RTEMS_MULTIPROCESSING)162 #endif163 164 _ITRON_return_errorno( E_OK );165 }166 167 /*168 * del_mbx - Delete Mailbox169 *170 *171 * ------Parameters--------------172 * ID mbxid The Mailbox's ID173 * ------------------------------174 *175 * -----Return Parameters-------176 * ER ercd Itron Error Code177 * -----------------------------178 *179 * -----C Language Interface----180 * ER ercd = del_mbx(ID mbxid);181 * -----------------------------182 *183 */184 185 ER del_mbx(186 ID mbxid187 )188 {189 register ITRON_Mailbox_Control *the_mailbox;190 Objects_Locations location;191 192 the_mailbox= _ITRON_Mailbox_Get( mbxid, &location );193 switch ( location ) {194 case OBJECTS_ERROR:195 case OBJECTS_REMOTE:196 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );197 198 case OBJECTS_LOCAL:199 _Objects_Close( &_ITRON_Mailbox_Information, &the_mailbox->Object );200 201 _CORE_message_queue_Close(202 &the_mailbox->message_queue,203 NULL, /* Multiprocessing not supported */204 CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED205 );206 207 _ITRON_Mailbox_Free(the_mailbox);208 break;209 }210 211 _ITRON_return_errorno( E_OK );212 }213 214 215 /*216 * snd_msg - Send Message to Mailbox217 */218 219 ER snd_msg(220 ID mbxid,221 T_MSG *pk_msg222 )223 {224 register ITRON_Mailbox_Control *the_mailbox;225 Objects_Locations location;226 CORE_message_queue_Status status = E_OK;227 unsigned32 message_priority;228 void *message_contents;229 230 if ( !pk_msg )231 return E_PAR;232 233 the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );234 switch ( location ) {235 case OBJECTS_REMOTE:236 case OBJECTS_ERROR:237 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );238 239 case OBJECTS_LOCAL:240 if ( the_mailbox->do_message_priority )241 message_priority = pk_msg->msgpri;242 else243 message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;244 245 message_contents = pk_msg;246 status = _CORE_message_queue_Submit(247 &the_mailbox->message_queue,248 &message_contents,249 sizeof(T_MSG *),250 the_mailbox->Object.id,251 NULL, /* multiprocessing not supported */252 message_priority253 );254 break;255 }256 257 _ITRON_return_errorno(258 _ITRON_Mailbox_Translate_core_message_queue_return_code(status) );259 }260 261 /*262 * rcv_msg - Receive Message from Mailbox263 */264 265 ER rcv_msg(266 T_MSG **ppk_msg,267 ID mbxid268 )269 {270 return trcv_msg( ppk_msg, mbxid, TMO_FEVR );271 }272 273 /*274 * prcv_msg - Poll and Receive Message from Mailbox275 */276 277 ER prcv_msg(278 T_MSG **ppk_msg,279 ID mbxid280 )281 {282 return trcv_msg( ppk_msg, mbxid, TMO_POL );283 }284 285 /*286 * trcv_msg - Receive Message from Mailbox with Timeout287 */288 289 ER trcv_msg(290 T_MSG **ppk_msg,291 ID mbxid,292 TMO tmout293 )294 {295 register ITRON_Mailbox_Control *the_mailbox;296 Watchdog_Interval interval;297 boolean wait;298 Objects_Locations location;299 unsigned32 size;300 301 if (!ppk_msg)302 return E_PAR;303 304 interval = 0;305 if ( tmout == TMO_POL ) {306 wait = FALSE;307 } else {308 wait = TRUE;309 if ( tmout != TMO_FEVR )310 interval = TOD_MILLISECONDS_TO_TICKS(tmout);311 }312 313 if ( wait && _ITRON_Is_in_non_task_state() )314 return E_CTX;315 316 the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );317 switch ( location ) {318 case OBJECTS_REMOTE:319 case OBJECTS_ERROR:320 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );321 322 case OBJECTS_LOCAL:323 324 _CORE_message_queue_Seize(325 &the_mailbox->message_queue,326 the_mailbox->Object.id,327 ppk_msg,328 &size,329 wait,330 interval331 );332 break;333 }334 335 _ITRON_return_errorno(336 _ITRON_Mailbox_Translate_core_message_queue_return_code(337 _Thread_Executing->Wait.return_code ) );338 }339 340 /*341 * ref_mbx - Reference Mailbox Status342 */343 344 ER ref_mbx(345 T_RMBX *pk_rmbx,346 ID mbxid347 )348 {349 register ITRON_Mailbox_Control *the_mailbox;350 Objects_Locations location;351 Chain_Control *pending;352 353 if ( !pk_rmbx )354 return E_PAR;355 356 the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );357 switch ( location ) {358 case OBJECTS_REMOTE:359 case OBJECTS_ERROR:360 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );361 362 case OBJECTS_LOCAL:363 364 pending = &the_mailbox->message_queue.Pending_messages;365 if ( _Chain_Is_empty( pending ) )366 pk_rmbx->pk_msg = NULL;367 else368 pk_rmbx->pk_msg = (T_MSG *) pending->first;369 370 /*371 * Fill in whether or not there is a waiting task372 */373 374 if ( !_Thread_queue_First( &the_mailbox->message_queue.Wait_queue ) )375 pk_rmbx->wtsk = FALSE;376 else377 pk_rmbx->wtsk = TRUE;378 379 break;380 }381 _ITRON_return_errorno( E_OK );382 }383 -
cpukit/itron/include/itronsys/mbox.h
rc730be8f r5e96e917 22 22 ATR mbxatr; /* mailbox attributes */ 23 23 /* Following is implementation-dependent function */ 24 INT bufcnt; /* ring buffer size*/24 INT bufcnt; /* maximum number of messages to let pend */ 25 25 /* additional information may be included depending on the implementation */ 26 26 } T_CMBX; … … 39 39 * A region (header) reserved by the OS may be included first 40 40 * depending on the implementation. 41 * 42 * NOTE: The first two fields are RTEMS specific. 41 43 */ 44 45 INT msgpri; /* priority of each message */ 42 46 /* VB msgcont[]; XXX */ 43 47 unsigned8 msgcont[1]; … … 64 68 65 69 ER cre_mbx( 66 ID mbxid,67 T_CMBX *pk_cmbx70 ID mbxid, 71 T_CMBX *pk_cmbx 68 72 ); 69 73 … … 81 85 82 86 ER snd_msg( 83 ID mbxid,87 ID mbxid, 84 88 T_MSG *pk_msg 85 89 ); … … 91 95 ER rcv_msg( 92 96 T_MSG **ppk_msg, 93 ID mbxid97 ID mbxid 94 98 ); 95 99 … … 100 104 ER prcv_msg( 101 105 T_MSG **ppk_msg, 102 ID mbxid106 ID mbxid 103 107 ); 104 108 … … 109 113 ER trcv_msg( 110 114 T_MSG **ppk_msg, 111 ID mbxid,112 TMO tmout115 ID mbxid, 116 TMO tmout 113 117 ); 114 118 … … 119 123 ER ref_mbx( 120 124 T_RMBX *pk_rmbx, 121 ID mbxid125 ID mbxid 122 126 ); 123 127 -
cpukit/itron/include/rtems/itron/mbox.h
rc730be8f r5e96e917 15 15 16 16 #include <rtems/itron/object.h> 17 #include <rtems/score/coremsg.h> 17 18 18 19 /* … … 21 22 22 23 typedef struct { 23 ITRON_Objects_Control Object; 24 unsigned32 XXX_more_stuff_goes_here; 24 ITRON_Objects_Control Object; 25 unsigned32 count; 26 boolean do_message_priority; 27 CORE_message_queue_Control message_queue; 25 28 } ITRON_Mailbox_Control; 26 29 … … 45 48 46 49 /* 47 * XXX insert private stuff here 50 * _ITRON_Mailbox_Translate_core_message_queue_return_code 51 * 52 * DESCRIPTION: 53 * 54 * This routine translates a core message queue object status 55 * into the appropriate ITRON status code. 48 56 */ 57 58 ER _ITRON_Mailbox_Translate_core_message_queue_return_code( 59 CORE_message_queue_Status status 60 ); 49 61 50 62 #include <rtems/itron/mbox.inl> -
cpukit/itron/src/mbox.c
rc730be8f r5e96e917 13 13 #include <rtems/itron/mbox.h> 14 14 #include <rtems/itron/task.h> 15 16 /*17 * _ITRON_Mailbox_Translate_core_message_queue_return_code18 *19 * This routine translates a core message queue object status20 * into the appropriate ITRON status code.21 */22 23 ER _ITRON_Mailbox_Translate_core_message_queue_return_code(24 CORE_message_queue_Status status25 )26 {27 switch (status) {28 case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:29 return E_OK;30 case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:31 return E_TMOUT;32 case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:33 return E_PAR;34 case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:35 return E_TMOUT;36 case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:37 return E_TMOUT;38 default:39 return E_ID;40 }41 }42 15 43 16 /* … … 77 50 78 51 } 79 80 81 /*82 * cre_mbx - Create Mailbox83 *84 * Creates a Mailbox according to the following spec:85 *86 * ------Parameters-------------------------87 * ID mbxid MailboxID88 * T_CMBX *pk_cmbx Packet to Create Mailbox89 * -----------------------------------------90 * -*pk_cmbx members*-91 * VP exinf ExtendedInformation92 * ATR mbxatr MailboxAttributes93 * (the use of the following information94 * is implementation dependent)95 * INT bufcnt BufferMessageCount96 * (CPU and/or implementation-dependent information97 * may also be included)98 *99 * ----Return Parameters--------------------100 * ER ercd ErrorCode101 * -----------------------------------------102 *103 *104 * ----C Language Interface-----------------105 * ER ercd = cre_mbx ( ID mbxid, T_CMBX *pk_cmbx ) ;106 * -----------------------------------------107 *108 */109 110 ER cre_mbx(111 ID mbxid,112 T_CMBX *pk_cmbx113 )114 {115 register ITRON_Mailbox_Control *the_mailbox;116 CORE_message_queue_Attributes the_mailbox_attributes;117 118 if ( !pk_cmbx )119 return E_PAR;120 121 if ((pk_cmbx->mbxatr & (TA_TPRI | TA_MPRI)) != 0 )122 return E_RSATR;123 124 _Thread_Disable_dispatch(); /* protects object pointer */125 126 the_mailbox = _ITRON_Mailbox_Allocate( mbxid );127 if ( !the_mailbox ) {128 _Thread_Enable_dispatch();129 return _ITRON_Mailbox_Clarify_allocation_id_error( mbxid );130 }131 132 the_mailbox->count = pk_cmbx->bufcnt;133 if (pk_cmbx->mbxatr & TA_MPRI)134 the_mailbox->do_message_priority = TRUE;135 else136 the_mailbox->do_message_priority = FALSE;137 138 if (pk_cmbx->mbxatr & TA_TPRI)139 the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;140 else141 the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;142 143 if ( !_CORE_message_queue_Initialize(144 &the_mailbox->message_queue,145 OBJECTS_ITRON_MAILBOXES,146 &the_mailbox_attributes,147 the_mailbox->count,148 sizeof(T_MSG *),149 NULL ) ) { /* Multiprocessing not supported */150 _ITRON_Mailbox_Free(the_mailbox);151 _ITRON_return_errorno( E_OBJ );152 }153 154 _ITRON_Objects_Open( &_ITRON_Mailbox_Information, &the_mailbox->Object );155 156 /*157 * If multiprocessing were supported, this is where we would announce158 * the existence of the semaphore to the rest of the system.159 */160 161 #if defined(RTEMS_MULTIPROCESSING)162 #endif163 164 _ITRON_return_errorno( E_OK );165 }166 167 /*168 * del_mbx - Delete Mailbox169 *170 *171 * ------Parameters--------------172 * ID mbxid The Mailbox's ID173 * ------------------------------174 *175 * -----Return Parameters-------176 * ER ercd Itron Error Code177 * -----------------------------178 *179 * -----C Language Interface----180 * ER ercd = del_mbx(ID mbxid);181 * -----------------------------182 *183 */184 185 ER del_mbx(186 ID mbxid187 )188 {189 register ITRON_Mailbox_Control *the_mailbox;190 Objects_Locations location;191 192 the_mailbox= _ITRON_Mailbox_Get( mbxid, &location );193 switch ( location ) {194 case OBJECTS_ERROR:195 case OBJECTS_REMOTE:196 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );197 198 case OBJECTS_LOCAL:199 _Objects_Close( &_ITRON_Mailbox_Information, &the_mailbox->Object );200 201 _CORE_message_queue_Close(202 &the_mailbox->message_queue,203 NULL, /* Multiprocessing not supported */204 CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED205 );206 207 _ITRON_Mailbox_Free(the_mailbox);208 break;209 }210 211 _ITRON_return_errorno( E_OK );212 }213 214 215 /*216 * snd_msg - Send Message to Mailbox217 */218 219 ER snd_msg(220 ID mbxid,221 T_MSG *pk_msg222 )223 {224 register ITRON_Mailbox_Control *the_mailbox;225 Objects_Locations location;226 CORE_message_queue_Status status = E_OK;227 unsigned32 message_priority;228 void *message_contents;229 230 if ( !pk_msg )231 return E_PAR;232 233 the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );234 switch ( location ) {235 case OBJECTS_REMOTE:236 case OBJECTS_ERROR:237 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );238 239 case OBJECTS_LOCAL:240 if ( the_mailbox->do_message_priority )241 message_priority = pk_msg->msgpri;242 else243 message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;244 245 message_contents = pk_msg;246 status = _CORE_message_queue_Submit(247 &the_mailbox->message_queue,248 &message_contents,249 sizeof(T_MSG *),250 the_mailbox->Object.id,251 NULL, /* multiprocessing not supported */252 message_priority253 );254 break;255 }256 257 _ITRON_return_errorno(258 _ITRON_Mailbox_Translate_core_message_queue_return_code(status) );259 }260 261 /*262 * rcv_msg - Receive Message from Mailbox263 */264 265 ER rcv_msg(266 T_MSG **ppk_msg,267 ID mbxid268 )269 {270 return trcv_msg( ppk_msg, mbxid, TMO_FEVR );271 }272 273 /*274 * prcv_msg - Poll and Receive Message from Mailbox275 */276 277 ER prcv_msg(278 T_MSG **ppk_msg,279 ID mbxid280 )281 {282 return trcv_msg( ppk_msg, mbxid, TMO_POL );283 }284 285 /*286 * trcv_msg - Receive Message from Mailbox with Timeout287 */288 289 ER trcv_msg(290 T_MSG **ppk_msg,291 ID mbxid,292 TMO tmout293 )294 {295 register ITRON_Mailbox_Control *the_mailbox;296 Watchdog_Interval interval;297 boolean wait;298 Objects_Locations location;299 unsigned32 size;300 301 if (!ppk_msg)302 return E_PAR;303 304 interval = 0;305 if ( tmout == TMO_POL ) {306 wait = FALSE;307 } else {308 wait = TRUE;309 if ( tmout != TMO_FEVR )310 interval = TOD_MILLISECONDS_TO_TICKS(tmout);311 }312 313 if ( wait && _ITRON_Is_in_non_task_state() )314 return E_CTX;315 316 the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );317 switch ( location ) {318 case OBJECTS_REMOTE:319 case OBJECTS_ERROR:320 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );321 322 case OBJECTS_LOCAL:323 324 _CORE_message_queue_Seize(325 &the_mailbox->message_queue,326 the_mailbox->Object.id,327 ppk_msg,328 &size,329 wait,330 interval331 );332 break;333 }334 335 _ITRON_return_errorno(336 _ITRON_Mailbox_Translate_core_message_queue_return_code(337 _Thread_Executing->Wait.return_code ) );338 }339 340 /*341 * ref_mbx - Reference Mailbox Status342 */343 344 ER ref_mbx(345 T_RMBX *pk_rmbx,346 ID mbxid347 )348 {349 register ITRON_Mailbox_Control *the_mailbox;350 Objects_Locations location;351 Chain_Control *pending;352 353 if ( !pk_rmbx )354 return E_PAR;355 356 the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );357 switch ( location ) {358 case OBJECTS_REMOTE:359 case OBJECTS_ERROR:360 return _ITRON_Mailbox_Clarify_get_id_error( mbxid );361 362 case OBJECTS_LOCAL:363 364 pending = &the_mailbox->message_queue.Pending_messages;365 if ( _Chain_Is_empty( pending ) )366 pk_rmbx->pk_msg = NULL;367 else368 pk_rmbx->pk_msg = (T_MSG *) pending->first;369 370 /*371 * Fill in whether or not there is a waiting task372 */373 374 if ( !_Thread_queue_First( &the_mailbox->message_queue.Wait_queue ) )375 pk_rmbx->wtsk = FALSE;376 else377 pk_rmbx->wtsk = TRUE;378 379 break;380 }381 _ITRON_return_errorno( E_OK );382 }383
Note: See TracChangeset
for help on using the changeset viewer.