Ignore:
Timestamp:
Oct 9, 2009, 1:46:39 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
7cb7a5ef
Parents:
bbf6253
Message:

2009-10-09 Sebastian Huber <Sebastian.Huber@…>

  • cpukit/sapi/include/rtems/io.h: Documentation.
  • cpukit/sapi/src/ioregisterdriver.c: Call from interrupt context is an error.
  • cpukit/sapi/src/iounregisterdriver.c: Disable preemption during critical section.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/iounregisterdriver.c

    rbbf6253 r031b57c  
    1818#include <rtems/system.h>
    1919#include <rtems/io.h>
     20#include <rtems/rtems/intr.h>
     21#include <rtems/score/thread.h>
    2022#include <string.h>
    2123
     
    3739)
    3840{
     41  if ( rtems_interrupt_is_in_progress() )
     42    return RTEMS_CALLED_FROM_ISR;
     43
    3944  if ( major < _IO_Number_of_drivers ) {
     45    _Thread_Disable_dispatch();
    4046    memset(
    4147      &_IO_Driver_address_table[major],
     
    4349      sizeof( rtems_driver_address_table )
    4450    );
     51    _Thread_Enable_dispatch();
     52
    4553    return RTEMS_SUCCESSFUL;
    4654  }
     55
    4756  return RTEMS_UNSATISFIED;
    4857}
Note: See TracChangeset for help on using the changeset viewer.