Ignore:
Timestamp:
Dec 12, 2014, 5:09:37 PM (10 years ago)
Author:
alain
Message:

The global variables associated to TTY channels are not anymore
defined in the tty_driver.c file, but in the boot.c and kernel_init.c files.

Location:
soft/giet_vm/giet_drivers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/bdv_driver.c

    r456 r469  
    9797
    9898    // get the lock protecting BDV
    99     _lock_acquire( &_bdv_lock );
     99    _spin_lock_acquire( &_bdv_lock );
    100100
    101101#if GIET_DEBUG_IOC_DRIVER
     
    159159
    160160        // release lock
    161         _lock_release( &_bdv_lock );     
     161        _spin_lock_release( &_bdv_lock );     
    162162    }
    163163    // in USER or KERNEL mode, we deschedule the task.
     
    220220        // reset _bdv_status and release lock
    221221        _bdv_status = BLOCK_DEVICE_IDLE;
    222         _lock_release( &_bdv_lock );     
     222        _spin_lock_release( &_bdv_lock );     
    223223    }
    224224
  • soft/giet_vm/giet_drivers/tty_driver.c

    r456 r469  
    1717# error: You must define SEG_TTY_BASE in the hard_config.h file
    1818#endif
    19 
    20 #if !defined(NB_TTY_CHANNELS)
    21 # error: You must define NB_TTY_CHANNELS in the hard_config.h file
    22 #endif
    23 
    24 #if (NB_TTY_CHANNELS == 0)
    25 # error: The NB_TTY_CHANNELS in the hard_config.h file cannot be 0
    26 #endif
    27 
    28 ////////////////////////////////////////////////////////////////////////////////////
    29 //               global variables
    30 ////////////////////////////////////////////////////////////////////////////////////
    31 
    32 simple_lock_t  _tty_tx_lock[NB_TTY_CHANNELS] __attribute__((aligned(64)));
    33 
    34 unsigned int   _tty_rx_buf[NB_TTY_CHANNELS];
    35 unsigned int   _tty_rx_full[NB_TTY_CHANNELS];
    3619
    3720////////////////////////////////////////////////////////////////////////////////////
  • soft/giet_vm/giet_drivers/tty_driver.h

    r456 r469  
    2424#define _GIET_TTY_DRIVERS_H_
    2525
     26#include "hard_config.h"
    2627#include "locks.h"
    2728
     
    4142
    4243////////////////////////////////////////////////////////////////////////////////////
    43 //               global variables
     44//                   global variables
     45// These variables must be defined both in boot code and in kernel_init code.
    4446////////////////////////////////////////////////////////////////////////////////////
    4547
    46 extern simple_lock_t  _tty_tx_lock[];
     48extern sbt_lock_t     _tty_tx_lock[NB_TTY_CHANNELS];
    4749
    48 extern unsigned int   _tty_rx_buf[];
    49 extern unsigned int   _tty_rx_full[];
     50extern unsigned int   _tty_rx_buf[NB_TTY_CHANNELS];
     51extern unsigned int   _tty_rx_full[NB_TTY_CHANNELS];
    5052
    5153//////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.