Changeset ffe316d in rtems


Ignore:
Timestamp:
Dec 2, 1996, 10:50:33 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0d051533
Parents:
e1a06d1b
Message:

Suggested changes from Mark Jordan which eliminate warnings and errors
he received using the Microtec C++ compiler. Most of these are
either missing casts from/to (void *), heavy handed use of enumerated
types, or simply assumed conversions. There is at least one actual
bug in an error path in thread.c in which the wrong argument was
passed to _Thread_Stack_Free and was not being caught by gcc.

Files:
15 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/rtems/headers/status.h

    re1a06d1b rffe316d  
    5353  RTEMS_NOT_IMPLEMENTED          = 24, /* directive not implemented */
    5454  RTEMS_INTERNAL_ERROR           = 25, /* RTEMS inconsistency detected */
    55   RTEMS_NO_MEMORY                = 26  /* could not get enough memory */
     55  RTEMS_NO_MEMORY                = 26, /* could not get enough memory */
     56  RTEMS_PROXY_BLOCKING           = 27  /* internal error only */
    5657} rtems_status_code;
    5758
    5859#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
    59 #define RTEMS_STATUS_CODES_LAST  RTEMS_NO_MEMORY
     60#define RTEMS_STATUS_CODES_LAST  RTEMS_PROXY_BLOCKING
    6061
    6162extern rtems_status_code _Status_Object_name_errors_to_status[];
  • c/src/exec/rtems/include/rtems/rtems/status.h

    re1a06d1b rffe316d  
    5353  RTEMS_NOT_IMPLEMENTED          = 24, /* directive not implemented */
    5454  RTEMS_INTERNAL_ERROR           = 25, /* RTEMS inconsistency detected */
    55   RTEMS_NO_MEMORY                = 26  /* could not get enough memory */
     55  RTEMS_NO_MEMORY                = 26, /* could not get enough memory */
     56  RTEMS_PROXY_BLOCKING           = 27  /* internal error only */
    5657} rtems_status_code;
    5758
    5859#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
    59 #define RTEMS_STATUS_CODES_LAST  RTEMS_NO_MEMORY
     60#define RTEMS_STATUS_CODES_LAST  RTEMS_PROXY_BLOCKING
    6061
    6162extern rtems_status_code _Status_Object_name_errors_to_status[];
  • c/src/exec/rtems/src/eventmp.c

    re1a06d1b rffe316d  
    5959      the_packet->event_in          = event_in;
    6060
    61       return
     61      return (rtems_status_code)
    6262        _MPCI_Send_request_packet(
    6363          rtems_get_node( event_id ),
  • c/src/exec/rtems/src/intr.c

    re1a06d1b rffe316d  
    5656    return RTEMS_INVALID_NUMBER;
    5757
    58   if ( !_ISR_Is_valid_user_handler( new_isr_handler ) )
     58  if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
    5959    return RTEMS_INVALID_ADDRESS;
    6060
  • c/src/exec/rtems/src/msg.c

    re1a06d1b rffe316d  
    679679      return RTEMS_TIMEOUT;
    680680    case THREAD_STATUS_PROXY_BLOCKING:
    681       return THREAD_STATUS_PROXY_BLOCKING;
     681      return RTEMS_PROXY_BLOCKING;
    682682  }
    683683  _Internal_error_Occurred(         /* XXX */
  • c/src/exec/rtems/src/msgmp.c

    re1a06d1b rffe316d  
    141141      }
    142142
    143       return _MPCI_Send_request_packet(rtems_get_node(message_queue_id),
    144                                        &the_packet->Prefix,
    145                                        STATES_WAITING_FOR_MESSAGE);
     143      return (rtems_status_code) _MPCI_Send_request_packet(
     144        rtems_get_node(message_queue_id),
     145        &the_packet->Prefix,
     146        STATES_WAITING_FOR_MESSAGE
     147      );
    146148      break;
    147149
     
    164166      _Thread_Executing->Wait.return_argument_1 = size_p;
    165167     
    166       return _MPCI_Send_request_packet(rtems_get_node(message_queue_id),
    167                                        &the_packet->Prefix,
    168                                        STATES_WAITING_FOR_MESSAGE);
     168      return (rtems_status_code) _MPCI_Send_request_packet(
     169        rtems_get_node(message_queue_id),
     170        &the_packet->Prefix,
     171        STATES_WAITING_FOR_MESSAGE
     172      );
    169173      break;
    170174
  • c/src/exec/rtems/src/region.c

    re1a06d1b rffe316d  
    361361
    362362      _Thread_Enable_dispatch();
    363       return( executing->Wait.return_code );
     363      return (rtems_status_code) executing->Wait.return_code;
    364364  }
    365365
     
    465465           break;
    466466
    467         the_segment = _Region_Allocate_segment(
     467        the_segment = (void **) _Region_Allocate_segment(
    468468           the_region,
    469469           the_thread->Wait.count
  • c/src/exec/rtems/src/regionmp.c

    re1a06d1b rffe316d  
    106106      the_packet->option_set        = option_set;
    107107
    108       return _MPCI_Send_request_packet(
     108      return (rtems_status_code) _MPCI_Send_request_packet(
    109109          rtems_get_node( region_id ),
    110110          &the_packet->Prefix,
  • cpukit/rtems/include/rtems/rtems/status.h

    re1a06d1b rffe316d  
    5353  RTEMS_NOT_IMPLEMENTED          = 24, /* directive not implemented */
    5454  RTEMS_INTERNAL_ERROR           = 25, /* RTEMS inconsistency detected */
    55   RTEMS_NO_MEMORY                = 26  /* could not get enough memory */
     55  RTEMS_NO_MEMORY                = 26, /* could not get enough memory */
     56  RTEMS_PROXY_BLOCKING           = 27  /* internal error only */
    5657} rtems_status_code;
    5758
    5859#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
    59 #define RTEMS_STATUS_CODES_LAST  RTEMS_NO_MEMORY
     60#define RTEMS_STATUS_CODES_LAST  RTEMS_PROXY_BLOCKING
    6061
    6162extern rtems_status_code _Status_Object_name_errors_to_status[];
  • cpukit/rtems/src/eventmp.c

    re1a06d1b rffe316d  
    5959      the_packet->event_in          = event_in;
    6060
    61       return
     61      return (rtems_status_code)
    6262        _MPCI_Send_request_packet(
    6363          rtems_get_node( event_id ),
  • cpukit/rtems/src/intr.c

    re1a06d1b rffe316d  
    5656    return RTEMS_INVALID_NUMBER;
    5757
    58   if ( !_ISR_Is_valid_user_handler( new_isr_handler ) )
     58  if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
    5959    return RTEMS_INVALID_ADDRESS;
    6060
  • cpukit/rtems/src/msg.c

    re1a06d1b rffe316d  
    679679      return RTEMS_TIMEOUT;
    680680    case THREAD_STATUS_PROXY_BLOCKING:
    681       return THREAD_STATUS_PROXY_BLOCKING;
     681      return RTEMS_PROXY_BLOCKING;
    682682  }
    683683  _Internal_error_Occurred(         /* XXX */
  • cpukit/rtems/src/msgmp.c

    re1a06d1b rffe316d  
    141141      }
    142142
    143       return _MPCI_Send_request_packet(rtems_get_node(message_queue_id),
    144                                        &the_packet->Prefix,
    145                                        STATES_WAITING_FOR_MESSAGE);
     143      return (rtems_status_code) _MPCI_Send_request_packet(
     144        rtems_get_node(message_queue_id),
     145        &the_packet->Prefix,
     146        STATES_WAITING_FOR_MESSAGE
     147      );
    146148      break;
    147149
     
    164166      _Thread_Executing->Wait.return_argument_1 = size_p;
    165167     
    166       return _MPCI_Send_request_packet(rtems_get_node(message_queue_id),
    167                                        &the_packet->Prefix,
    168                                        STATES_WAITING_FOR_MESSAGE);
     168      return (rtems_status_code) _MPCI_Send_request_packet(
     169        rtems_get_node(message_queue_id),
     170        &the_packet->Prefix,
     171        STATES_WAITING_FOR_MESSAGE
     172      );
    169173      break;
    170174
  • cpukit/rtems/src/region.c

    re1a06d1b rffe316d  
    361361
    362362      _Thread_Enable_dispatch();
    363       return( executing->Wait.return_code );
     363      return (rtems_status_code) executing->Wait.return_code;
    364364  }
    365365
     
    465465           break;
    466466
    467         the_segment = _Region_Allocate_segment(
     467        the_segment = (void **) _Region_Allocate_segment(
    468468           the_region,
    469469           the_thread->Wait.count
  • cpukit/rtems/src/regionmp.c

    re1a06d1b rffe316d  
    106106      the_packet->option_set        = option_set;
    107107
    108       return _MPCI_Send_request_packet(
     108      return (rtems_status_code) _MPCI_Send_request_packet(
    109109          rtems_get_node( region_id ),
    110110          &the_packet->Prefix,
Note: See TracChangeset for help on using the changeset viewer.