Changeset 267 for soft/giet_vm/giet_kernel
- Timestamp:
- Jan 13, 2014, 3:20:29 PM (11 years ago)
- Location:
- soft/giet_vm/giet_kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/ctx_handler.c
r258 r267 41 41 // - LTID : Task local index (in scheduler) 42 42 // - VSID : Virtual space index 43 // - RUN : Task state (0 => sleeping / 1 => runable ) 43 // - RUN : Task state (0 => sleeping / 1 => runnable ) 44 // - TRDID : Thread ID index (in vspace) 44 45 // 45 46 // ctx[0]<- ***|ctx[8] <- $8 |ctx[16]<- $16|ctx[24]<- $24|ctx[32]<- EPC |ctx[40]<- TTY … … 51 52 // ctx[6]<- $6 |ctx[14]<- $14|ctx[22]<- $22|ctx[30]<- $30|ctx[38]<- VSID |ctx[46]<- GTID 52 53 // ctx[7]<- $7 |ctx[15]<- $15|ctx[23]<- $23|ctx[31]<- RA |ctx[39]<- PTPR |ctx[47]<- RUN 54 // 55 // ctx[48]<- TRDID 53 56 ////////////////////////////////////////////////////////////////////////////////////////// 54 57 … … 164 167 : "$3" ); 165 168 169 #if GIET_IDLE_TASK_VERBOSITY == 1 166 170 _tty_get_lock( 0 ); 167 171 _puts("\n[GIET WARNING] Processor "); … … 171 175 _puts("\n"); 172 176 _tty_release_lock( 0 ); 177 #endif 173 178 174 179 count = GIET_IDLE_TASK_PERIOD; -
soft/giet_vm/giet_kernel/ctx_handler.h
r258 r267 48 48 #define CTX_GTID_ID 46 // Global Task Index 49 49 #define CTX_RUN_ID 47 // Boolean: task runable 50 #define CTX_TRDID_ID 48 // Thread Index in vspace 50 51 51 52 ////////////////////////////////////////////////////////////////////////////////// -
soft/giet_vm/giet_kernel/giet.s
r258 r267 9 9 * - the _cause_vector[16] array defines the 16 causes to enter the GIET 10 10 * it is initialized in th exc_handler.c file 11 * - the _syscall_vector[ 32] array defines the 32system calls entry points11 * - the _syscall_vector[64] array defines the 64 system calls entry points 12 12 * it is initialised in the sys_handler.c file 13 13 ***********************************************************************************/ -
soft/giet_vm/giet_kernel/sys_handler.c
r263 r267 48 48 &_fb_sync_write, /* 0x10 */ 49 49 &_fb_sync_read, /* 0x11 */ 50 &_ sys_ukn,/* 0x12 */51 &_ sys_ukn,/* 0x13 */50 &_thread_id, /* 0x12 */ 51 &_tty_get_release_lock,/* 0x13 */ 52 52 &_sys_ukn, /* 0x14 */ 53 53 &_sys_ukn, /* 0x15 */ … … 180 180 { 181 181 return _get_context_slot(CTX_GTID_ID); 182 } 183 184 ///////////////////////////////////////////////////////////////////////////// 185 // _thread_id() 186 // Returns current thread index. 187 ///////////////////////////////////////////////////////////////////////////// 188 unsigned int _thread_id() 189 { 190 return _get_context_slot(CTX_TRDID_ID); 191 } 192 193 ///////////////////////////////////////////////////////////////////////////// 194 // _tty_get_release_lock(int val) 195 // Get or release the hardware TTY lock depending on val (0: get,1: release) 196 ///////////////////////////////////////////////////////////////////////////// 197 int _tty_get_release_lock(unsigned int val) 198 { 199 unsigned int channel = _get_context_slot(CTX_TTY_ID); 200 201 if ( val == 0 ) _tty_get_lock(channel); 202 else if ( val == 1 ) _tty_release_lock(channel); 203 else return -1; // Wrong action 204 205 return 0; 182 206 } 183 207 -
soft/giet_vm/giet_kernel/sys_handler.h
r258 r267 24 24 unsigned int _local_task_id(); 25 25 unsigned int _global_task_id(); 26 unsigned int _thread_id(); 27 28 int _tty_get_release_lock(unsigned int val); 26 29 27 30 unsigned int _procs_number( unsigned int cluster_id,
Note: See TracChangeset
for help on using the changeset viewer.