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/abs32le/include/libarch/tls.h

    r9b1baac r0b05082  
    4141#include <stddef.h>
    4242
     43/* Some architectures store the value with an offset. Some do not. */
     44#define ARCH_TP_OFFSET 0
     45
    4346typedef struct {
    4447        void *self;
     
    4649} tcb_t;
    4750
    48 static inline void __tcb_set(tcb_t *tcb)
     51static inline void __tcb_raw_set(void *tls)
    4952{
     53        /* Usually a short assembly assigning to an ABI-defined register. */
    5054}
    5155
    52 static inline tcb_t *__tcb_get(void)
     56static inline void *__tcb_raw_get(void)
    5357{
     58        /* Usually a short assembly reading from an ABI-defined register. */
    5459        return NULL;
    5560}
Note: See TracChangeset for help on using the changeset viewer.