Changeset 336
- Timestamp:
- Aug 7, 2017, 11:22:15 AM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_exception.c
r335 r336 76 76 x86_printf("-> rdi = %Z\n", ctx->tf_rdi); 77 77 x86_printf("-> rbp = %Z\n", ctx->tf_rbp); 78 x86_printf("-> tls = %Z (gid=%Z)\n", (uint64_t)cur cpu(),78 x86_printf("-> tls = %Z (gid=%Z)\n", (uint64_t)curtls(), 79 79 (uint64_t)hal_get_gid()); 80 80 x86_printf("-> err = %Z\n", ctx->tf_err); -
trunk/hal/x86_64/core/hal_interrupt.c
r335 r336 48 48 49 49 core_t *core = CURRENT_THREAD->core; 50 cur cpu()->tls_tf = tf;50 curtls()->tls_tf = tf; 51 51 52 52 core_clock(core); -
trunk/hal/x86_64/core/hal_irqmask.c
r285 r336 26 26 inline void hal_disable_irq(reg_t *old) 27 27 { 28 tls_t *tls = cur cpu();28 tls_t *tls = curtls(); 29 29 30 30 *old = tls->tls_intr; … … 36 36 inline void hal_enable_irq(reg_t *old) 37 37 { 38 tls_t *tls = cur cpu();38 tls_t *tls = curtls(); 39 39 40 40 *old = tls->tls_intr; … … 46 46 inline void hal_restore_irq(reg_t old) 47 47 { 48 tls_t *tls = cur cpu();48 tls_t *tls = curtls(); 49 49 50 50 tls->tls_intr = old; -
trunk/hal/x86_64/core/hal_segmentation.h
r308 r336 163 163 void lidt(struct region_descriptor *); 164 164 void ltr(uint16_t); 165 tls_t *cur cpu();165 tls_t *curtls(); 166 166 167 167 #define INTRS_ENABLED 0xFFEFAAAA -
trunk/hal/x86_64/core/hal_special.c
r309 r336 32 32 struct thread_s; 33 33 34 tls_t *cur cpu()34 tls_t *curtls() 35 35 { 36 36 tls_t *cputls; … … 45 45 gid_t hal_get_gid() 46 46 { 47 return cur cpu()->tls_gid;47 return curtls()->tls_gid; 48 48 } 49 49 … … 75 75 struct thread_s *hal_get_current_thread() 76 76 { 77 return cur cpu()->tls_thr;77 return curtls()->tls_thr; 78 78 } 79 79 80 80 void hal_set_current_thread( struct thread_s * thread ) 81 81 { 82 cur cpu()->tls_thr = thread;82 curtls()->tls_thr = thread; 83 83 } 84 84
Note: See TracChangeset
for help on using the changeset viewer.