Changeset 121 for trunk/hal/tsar_mips32/core/hal_special.c
- Timestamp:
- Jul 3, 2017, 2:17:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_special.c
r101 r121 33 33 34 34 35 /////////////////// 36 gid_t hal_get_gid()35 ////////////////////////// 36 inline gid_t hal_get_gid() 37 37 { 38 38 uint32_t proc_id; … … 41 41 42 42 return (proc_id & 0x3FF); // 4/4/2 format for TSAR 43 } 44 45 //////////////////////////////// 46 inline cycle_t hal_time_stamp() 47 { 48 cycle_t count; 49 50 asm volatile ("mfc0 %0, $9 " : "=&r" (count)); 51 52 return count; 43 53 } 44 54 … … 57 67 58 68 // get current time stamp from hardware register 59 asm volatile ("mfc0 %0, $9 " : "=&r" (current_count));69 current_count = hal_time_stamp(); 60 70 61 71 // compute number of elapsed cycles, taking into account 32 bits register wrap … … 75 85 } 76 86 77 ////////////////////////////////////////// 78 struct thread_s * hal_get_current_thread()87 ///////////////////////////////////////////////// 88 inline struct thread_s * hal_get_current_thread() 79 89 { 80 90 void * thread_ptr;
Note: See TracChangeset
for help on using the changeset viewer.