Ignore:
Timestamp:
Oct 7, 2015, 12:05:03 PM (9 years ago)
Author:
alain
Message:

Cosmetic.

Location:
soft/giet_vm/giet_drivers
Files:
2 edited

Legend:

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

    r709 r715  
    3333///////////////////////////////////////////////////////////////////////////////
    3434
    35 // lock protecting single channel BDV peripheral
     35// lock protecting exclusive access
    3636__attribute__((section(".kdata")))
    37 spin_lock_t  _bdv_lock __attribute__((aligned(64)));
    38 
    39 // global index of the waiting thread (only used in descheduling mode)
     37spin_lock_t      _bdv_lock __attribute__((aligned(64)));
     38
     39// owner thread (only used in descheduling mode)
    4040__attribute__((section(".kdata")))
    41 unsigned int _bdv_trdid;
    42 
    43 // BDV peripheral status (only used in descheduling mode)
     41unsigned int     _bdv_trdid;
     42
     43// transfer status (only used in descheduling mode)
    4444__attribute__((section(".kdata")))
    45 unsigned int _bdv_status;
    46 
    47 ///////////////////////////////////////////////////////////////////////////////
    48 // This low_level function returns the value contained in register (index).
     45unsigned int     _bdv_status;
     46
     47///////////////////////////////////////////////////////////////////////////////
     48// This low_level function returns the value contained in register(index).
    4949///////////////////////////////////////////////////////////////////////////////
    5050unsigned int _bdv_get_register( unsigned int index )
     
    5555
    5656///////////////////////////////////////////////////////////////////////////////
    57 // This low-level function set a new value in register (index).
     57// This low-level function set a new value in register(index).
    5858///////////////////////////////////////////////////////////////////////////////
    5959void _bdv_set_register( unsigned int index,
  • soft/giet_vm/giet_drivers/hba_driver.c

    r709 r715  
    2828
    2929// allocated in the boot.c or kernel_init.c files
    30 extern static_scheduler_t* _schedulers[X_SIZE][Y_SIZE][NB_PROCS_MAX];
     30extern static_scheduler_t*    _schedulers[X_SIZE][Y_SIZE][NB_PROCS_MAX];
     31extern unsigned int           _hba_boot_mode; 
    3132
    3233//////////////////////////////////////////////////////////////////////////////////
     
    3637// and must be defined in both kernel_init.c and boot.c files.
    3738// - during the boot phase, only one processor access the HBA in synchronous
    38 //   mode. There is no need for the allocator to use a lock.
    39 // - after the boot phase, the HBA device can be used by several processors. The
    40 //   allocator is protected by a sqt_lock.
     39//   mode. There is no need to use a lock.
     40// - during the execution phase, the HBA device can be used by several processors.
     41//   The slot allocator is protected by a sqt_lock.
    4142//////////////////////////////////////////////////////////////////////////////////
    4243       
    43 extern unsigned int _hba_boot_mode;
    44 
    45 __attribute__((section(".kdata")))
    46 sqt_lock_t          _hba_allocator_lock  __attribute__((aligned(64)));
     44__attribute__((section(".kdata")))
     45sqt_lock_t          _hba_lock  __attribute__((aligned(64)));
    4746
    4847// state of each slot (allocated to a thread or not)
     
    9897///////////////////////////////////////////////////////////////////////////////
    9998// This blocking fonction allocates a free command index to the thread.
    100 // The hba_allocator_lock is not used in boot mode.
     99// The hba_lock is not used in boot mode.
    101100// It returns the allocated command index (between 0 and 31)
    102101///////////////////////////////////////////////////////////////////////////////
     
    109108    while ( found == 0)
    110109    {
    111         if ( !_hba_boot_mode )
    112             _sqt_lock_acquire(&_hba_allocator_lock);
     110        if ( !_hba_boot_mode ) _sqt_lock_acquire(&_hba_lock);
    113111
    114112        for ( c = 0; c < 32 ; c++ )
     
    123121        }
    124122
    125         if ( !_hba_boot_mode )
    126             _sqt_lock_release(&_hba_allocator_lock);
     123        if ( !_hba_boot_mode ) _sqt_lock_release(&_hba_lock);
    127124    }
    128125
     
    379376    // initialise allocator lock if not in boot mode
    380377    if ( !_hba_boot_mode )
    381         _sqt_lock_init(&_hba_allocator_lock);
     378        _sqt_lock_init(&_hba_lock);
    382379
    383380    // initialise Command Descriptors in Command List, allocated command table
     
    390387        _hba_cmd_list[c].ctba  = (unsigned int)(paddr);
    391388        _hba_cmd_list[c].ctbau = (unsigned int)(paddr>>32);
    392         _hba_allocated_cmd[c] = 0;
    393         _hba_active_cmd[c] = 0;
     389        _hba_allocated_cmd[c]  = 0;
     390        _hba_active_cmd[c]     = 0;
    394391    }
    395392
Note: See TracChangeset for help on using the changeset viewer.