Changeset 102
- Timestamp:
- Jun 29, 2017, 4:55:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_special.c
r101 r102 25 25 #include <hal_register.h> 26 26 #include <hal_internal.h> 27 28 #include <core.h> 29 #include <thread.h> 27 30 28 31 struct thread_s; … … 73 76 } 74 77 75 uint 32_t hal_get_cycles()78 uint64_t hal_get_cycles() 76 79 { 77 return (uint32_t)rdtsc(); // XXX will be fixed soon 80 uint64_t cycles; 81 core_t *core = CURRENT_THREAD->core; 82 83 /* 84 * Put the value of the TSC everywhere 85 */ 86 cycles = rdtsc(); 87 core->time_stamp = cycles; 88 core->cycles = cycles; 89 90 return cycles; 78 91 } 79 92 80 struct thread_s * 93 struct thread_s *hal_get_current_thread() 81 94 { 82 95 return curcpu()->ci_thr;
Note: See TracChangeset
for help on using the changeset viewer.