Changeset ce1ba298 in rtems


Ignore:
Timestamp:
Jul 6, 2000, 9:59:25 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d74fdb5
Parents:
eaedd00
Message:

Switched to faster implementation.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/rtems/src/msgqtranslatereturncode.c

    reaedd00 rce1ba298  
    4343 */
    4444 
     45rtems_status_code _Message_queue_Translate_core_return_code_[] = {
     46  RTEMS_SUCCESSFUL,         /* CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL */
     47  RTEMS_INVALID_SIZE,       /* CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE */
     48  RTEMS_TOO_MANY,           /* CORE_MESSAGE_QUEUE_STATUS_TOO_MANY */
     49  RTEMS_UNSATISFIED,        /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED */
     50  RTEMS_UNSATISFIED,        /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT */
     51  RTEMS_OBJECT_WAS_DELETED, /* CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED */
     52  RTEMS_TIMEOUT             /* CORE_MESSAGE_QUEUE_STATUS_TIMEOUT */
     53};
     54
    4555rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
    46   unsigned32 the_message_queue_status
     56  unsigned32 status
    4757)
    4858{
    49   switch ( the_message_queue_status ) {
    50     case  CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
    51       return RTEMS_SUCCESSFUL;
    52     case  CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
    53       return RTEMS_INVALID_SIZE;
    54     case  CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
    55       return RTEMS_TOO_MANY;
    56     case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED:
    57       return RTEMS_UNSATISFIED;
    58     case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
    59       return RTEMS_UNSATISFIED;
    60     case CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED:
    61       return RTEMS_OBJECT_WAS_DELETED;
    62     case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
    63       return RTEMS_TIMEOUT;
    64     case THREAD_STATUS_PROXY_BLOCKING:
    65       return RTEMS_PROXY_BLOCKING;
    66   }
    67   _Internal_error_Occurred(         /* XXX */
    68     INTERNAL_ERROR_RTEMS_API,
    69     TRUE,
    70     the_message_queue_status
    71   );
    72   return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
     59#if defined(RTEMS_MULTIPROCESSING)
     60  if ( status == THREAD_STATUS_PROXY_BLOCKING )
     61    return RTEMS_PROXY_BLOCKING;
     62  else
     63#endif
     64  if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT )
     65    return RTEMS_INTERNAL_ERROR;
     66  else
     67    return _Message_queue_Translate_core_return_code_[status];
    7368}
  • cpukit/rtems/src/msgqtranslatereturncode.c

    reaedd00 rce1ba298  
    4343 */
    4444 
     45rtems_status_code _Message_queue_Translate_core_return_code_[] = {
     46  RTEMS_SUCCESSFUL,         /* CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL */
     47  RTEMS_INVALID_SIZE,       /* CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE */
     48  RTEMS_TOO_MANY,           /* CORE_MESSAGE_QUEUE_STATUS_TOO_MANY */
     49  RTEMS_UNSATISFIED,        /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED */
     50  RTEMS_UNSATISFIED,        /* CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT */
     51  RTEMS_OBJECT_WAS_DELETED, /* CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED */
     52  RTEMS_TIMEOUT             /* CORE_MESSAGE_QUEUE_STATUS_TIMEOUT */
     53};
     54
    4555rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
    46   unsigned32 the_message_queue_status
     56  unsigned32 status
    4757)
    4858{
    49   switch ( the_message_queue_status ) {
    50     case  CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
    51       return RTEMS_SUCCESSFUL;
    52     case  CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
    53       return RTEMS_INVALID_SIZE;
    54     case  CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
    55       return RTEMS_TOO_MANY;
    56     case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED:
    57       return RTEMS_UNSATISFIED;
    58     case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
    59       return RTEMS_UNSATISFIED;
    60     case CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED:
    61       return RTEMS_OBJECT_WAS_DELETED;
    62     case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
    63       return RTEMS_TIMEOUT;
    64     case THREAD_STATUS_PROXY_BLOCKING:
    65       return RTEMS_PROXY_BLOCKING;
    66   }
    67   _Internal_error_Occurred(         /* XXX */
    68     INTERNAL_ERROR_RTEMS_API,
    69     TRUE,
    70     the_message_queue_status
    71   );
    72   return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
     59#if defined(RTEMS_MULTIPROCESSING)
     60  if ( status == THREAD_STATUS_PROXY_BLOCKING )
     61    return RTEMS_PROXY_BLOCKING;
     62  else
     63#endif
     64  if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT )
     65    return RTEMS_INTERNAL_ERROR;
     66  else
     67    return _Message_queue_Translate_core_return_code_[status];
    7368}
Note: See TracChangeset for help on using the changeset viewer.