Changeset 336 for trunk/hal/x86_64


Ignore:
Timestamp:
Aug 7, 2017, 11:22:15 AM (7 years ago)
Author:
max@…
Message:

Rename curcpu -> curtls.

Location:
trunk/hal/x86_64/core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_exception.c

    r335 r336  
    7676        x86_printf("-> rdi = %Z\n", ctx->tf_rdi);
    7777        x86_printf("-> rbp = %Z\n", ctx->tf_rbp);
    78         x86_printf("-> tls = %Z (gid=%Z)\n", (uint64_t)curcpu(),
     78        x86_printf("-> tls = %Z (gid=%Z)\n", (uint64_t)curtls(),
    7979            (uint64_t)hal_get_gid());
    8080        x86_printf("-> err = %Z\n", ctx->tf_err);
  • trunk/hal/x86_64/core/hal_interrupt.c

    r335 r336  
    4848
    4949        core_t *core = CURRENT_THREAD->core;
    50         curcpu()->tls_tf = tf;
     50        curtls()->tls_tf = tf;
    5151
    5252        core_clock(core);
  • trunk/hal/x86_64/core/hal_irqmask.c

    r285 r336  
    2626inline void hal_disable_irq(reg_t *old)
    2727{
    28         tls_t *tls = curcpu();
     28        tls_t *tls = curtls();
    2929
    3030        *old = tls->tls_intr;
     
    3636inline void hal_enable_irq(reg_t *old)
    3737{
    38         tls_t *tls = curcpu();
     38        tls_t *tls = curtls();
    3939
    4040        *old = tls->tls_intr;
     
    4646inline void hal_restore_irq(reg_t old)
    4747{
    48         tls_t *tls = curcpu();
     48        tls_t *tls = curtls();
    4949
    5050        tls->tls_intr = old;
  • trunk/hal/x86_64/core/hal_segmentation.h

    r308 r336  
    163163void lidt(struct region_descriptor *);
    164164void ltr(uint16_t);
    165 tls_t *curcpu();
     165tls_t *curtls();
    166166
    167167#define INTRS_ENABLED   0xFFEFAAAA
  • trunk/hal/x86_64/core/hal_special.c

    r309 r336  
    3232struct thread_s;
    3333
    34 tls_t *curcpu()
     34tls_t *curtls()
    3535{
    3636        tls_t *cputls;
     
    4545gid_t hal_get_gid()
    4646{
    47         return curcpu()->tls_gid;
     47        return curtls()->tls_gid;
    4848}
    4949
     
    7575struct thread_s *hal_get_current_thread()
    7676{
    77         return curcpu()->tls_thr;
     77        return curtls()->tls_thr;
    7878}
    7979
    8080void hal_set_current_thread( struct thread_s * thread )
    8181{
    82         curcpu()->tls_thr = thread;
     82        curtls()->tls_thr = thread;
    8383}
    8484
Note: See TracChangeset for help on using the changeset viewer.