Ignore:
Timestamp:
2018-07-18T18:56:16Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
40abf56
Parents:
9b1baac
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 14:25:11)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 18:56:16)
Message:

Adds

  • tcb_raw_get(), which returns the value of the TP register without any offsets applied to it,
  • tcb_raw_set(), which does the opposite,
  • tcb_is_set(), which returns true iff the register is not NULL,
  • tcb_reset(), which sets the register to NULL.

Used for debug assertions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia64/include/libarch/tls.h

    r9b1baac r0b05082  
    3838#define CONFIG_TLS_VARIANT_1
    3939
     40#define ARCH_TP_OFFSET 0
     41
    4042/* This structure must be exactly 16 bytes long */
    4143typedef struct {
     
    4446} tcb_t;
    4547
    46 static inline void __tcb_set(tcb_t *tcb)
     48static inline void __tcb_raw_set(void *tcb)
    4749{
    4850        asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
    4951}
    5052
    51 static inline tcb_t *__tcb_get(void)
     53static inline void *__tcb_raw_get(void)
    5254{
    53         tcb_t *retval;
    54 
     55        void *retval;
    5556        asm volatile ("mov %0 = r13\n" : "=r" (retval));
    56 
    5757        return retval;
    5858}
Note: See TracChangeset for help on using the changeset viewer.