Changeset 51a6fd5 in rtems


Ignore:
Timestamp:
Dec 19, 2008, 3:00:09 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
1de98d97
Parents:
eb961961
Message:

2008-12-19 Sebastian Huber <sebastian.huber@…>

  • include/irq-info.h, src/irq-info.c, src/irq-shell.c: New files.
  • include/irq-generic.h, src/irq-generic.c: Improved interrupt handler dispatch function.
Location:
c/src/lib/libbsp/shared
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    reb961961 r51a6fd5  
     12008-12-19      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * include/irq-info.h, src/irq-info.c, src/irq-shell.c: New files.
     4        * include/irq-generic.h, src/irq-generic.c: Improved interrupt handler
     5        dispatch function.
     6
    172008-12-15      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libbsp/shared/include/irq-generic.h

    reb961961 r51a6fd5  
    7474        return vector - BSP_INTERRUPT_VECTOR_MIN;
    7575#endif /* BSP_INTERRUPT_USE_INDEX_TABLE */
    76 }
    77 
    78 void bsp_interrupt_handler_empty( rtems_vector_number vector, void *arg);
    79 
    80 static inline bool bsp_interrupt_is_empty_handler_entry( bsp_interrupt_handler_entry *e)
    81 {
    82         return e->handler == bsp_interrupt_handler_empty;
    8376}
    8477
     
    218211{
    219212        if (bsp_interrupt_is_valid_vector( vector)) {
    220                 bsp_interrupt_handler_entry *head = &bsp_interrupt_handler_table [bsp_interrupt_handler_index( vector)];
    221                 bsp_interrupt_handler_entry *current = head;
     213                bsp_interrupt_handler_entry *e = &bsp_interrupt_handler_table [bsp_interrupt_handler_index( vector)];
    222214
    223215                do {
    224                         current->handler( vector, current->arg);
    225                         current = current->next;
    226                 } while (current != NULL);
    227 
    228                 if (bsp_interrupt_is_empty_handler_entry( head)) {
    229                         bsp_interrupt_handler_default( vector);
    230                 }
     216                        e->handler( vector, e->arg);
     217                        e = e->next;
     218                } while (e != NULL);
    231219        } else {
    232220                bsp_interrupt_handler_default( vector);
  • c/src/lib/libbsp/shared/src/irq-generic.c

    reb961961 r51a6fd5  
    2727#endif /* BSP_INTERRUPT_USE_INDEX_TABLE */
    2828
     29static void bsp_interrupt_handler_empty( rtems_vector_number vector, void *arg)
     30{
     31        bsp_interrupt_handler_default( vector);
     32}
     33
    2934bsp_interrupt_handler_entry bsp_interrupt_handler_table [BSP_INTERRUPT_HANDLER_TABLE_SIZE] = {
    3035        [0 ... BSP_INTERRUPT_HANDLER_TABLE_SIZE - 1] = {
     
    6974}
    7075
    71 void bsp_interrupt_handler_empty( rtems_vector_number vector, void *arg)
    72 {
    73         /* Do nothing */
     76static inline bool bsp_interrupt_is_empty_handler_entry( bsp_interrupt_handler_entry *e)
     77{
     78        return e->handler == bsp_interrupt_handler_empty;
    7479}
    7580
     
    102107}
    103108
    104 static bsp_interrupt_handler_entry *bsp_interrupt_allocate_handler_entry()
     109static bsp_interrupt_handler_entry *bsp_interrupt_allocate_handler_entry( void)
    105110{
    106111#ifdef BSP_INTERRUPT_NO_HEAP_USAGE
     
    125130}
    126131
    127 static rtems_status_code bsp_interrupt_lock()
     132static rtems_status_code bsp_interrupt_lock( void)
    128133{
    129134        rtems_status_code sc = RTEMS_SUCCESSFUL;
     
    168173}
    169174
    170 static rtems_status_code bsp_interrupt_unlock()
     175static rtems_status_code bsp_interrupt_unlock( void)
    171176{
    172177        if (bsp_interrupt_mutex != RTEMS_ID_NONE) {
     
    185190 * is complete if everything was successful.
    186191 */
    187 rtems_status_code bsp_interrupt_initialize()
     192rtems_status_code bsp_interrupt_initialize( void)
    188193{
    189194        rtems_status_code sc = RTEMS_SUCCESSFUL;
    190         rtems_vector_number index = 0;
    191195
    192196        /* Lock */
Note: See TracChangeset for help on using the changeset viewer.