Changeset 456 for soft/giet_vm/giet_drivers/bdv_driver.c
- Timestamp:
- Dec 5, 2014, 3:38:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/bdv_driver.c
r437 r456 20 20 #include <ioc_driver.h> 21 21 #include <utils.h> 22 #include <tty _driver.h>22 #include <tty0.h> 23 23 #include <ctx_handler.h> 24 24 25 #if !defined(GIET_NO_HARD_CC)26 # error: You must define GIET_NO_HARD_CC in the giet_config.h file27 #endif28 29 25 /////////////////////////////////////////////////////////////////////////////// 30 26 // BDV global variables 31 27 /////////////////////////////////////////////////////////////////////////////// 32 28 33 #define in_unckdata __attribute__((section (".unckdata"))) 34 #define in_kdata __attribute__((section (".kdata"))) 35 36 #if GIET_NO_HARD_CC 37 in_unckdata giet_lock_t _bdv_lock __attribute__((aligned(64))); 38 in_unckdata volatile unsigned int _bdv_status; 39 in_unckdata volatile unsigned int _bdv_gtid; 40 #else 41 in_kdata giet_lock_t _bdv_lock __attribute__((aligned(64))); 42 in_kdata volatile unsigned int _bdv_status; 43 in_kdata volatile unsigned int _bdv_gtid; 44 #endif 29 spin_lock_t _bdv_lock __attribute__((aligned(64))); 30 unsigned int _bdv_status; 31 unsigned int _bdv_gtid; 45 32 46 33 /////////////////////////////////////////////////////////////////////////////// … … 110 97 111 98 // get the lock protecting BDV 112 _ get_lock(&_bdv_lock);113 114 #if GIET_DEBUG_IOC_DRIVER 115 _puts("\n[BDV DEBUG] _bdv_access() : P["); 116 _putd( x ); 117 _puts(","); 118 _putd( y ); 119 _puts(","); 120 _putd( p ); 121 _puts("] get bdv_lock at cycle ");122 _pu d( _get_proctime() );99 _lock_acquire( &_bdv_lock ); 100 101 #if GIET_DEBUG_IOC_DRIVER 102 _puts("\n[BDV DEBUG] _bdv_access() : P["); 103 _putd( x ); 104 _puts(","); 105 _putd( y ); 106 _puts(","); 107 _putd( p ); 108 _puts("] get _bdv_lock at cycle "); 109 _putd( _get_proctime() ); 123 110 _puts("\n"); 124 111 #endif … … 172 159 173 160 // release lock 174 _ release_lock(&_bdv_lock);161 _lock_release( &_bdv_lock ); 175 162 } 176 163 // in USER or KERNEL mode, we deschedule the task. … … 233 220 // reset _bdv_status and release lock 234 221 _bdv_status = BLOCK_DEVICE_IDLE; 235 _ release_lock(&_bdv_lock);222 _lock_release( &_bdv_lock ); 236 223 } 237 224 … … 246 233 _putd( _get_proctime() ); 247 234 _puts(" / error = "); 248 _putd( error ) 235 _putd( error ); 249 236 _puts("\n"); 250 237 #endif
Note: See TracChangeset
for help on using the changeset viewer.