Changeset bc73be3 in mainline for uspace/lib/c/arch/ppc32/src/tls.c


Ignore:
Timestamp:
2019-06-27T08:51:20Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8add15e0
Parents:
ad40b74b (diff), aeba767 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

cpp: merge and resolve conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ppc32/src/tls.c

    rad40b74b rbc73be3  
    11/*
     2 * Copyright (c) 2019 Jiri Svoboda
    23 * Copyright (c) 2006 Ondrej Palkovsky
    34 * All rights reserved.
     
    3637#include <stddef.h>
    3738
     39#ifdef CONFIG_RTLD
     40#include <rtld/rtld.h>
     41#endif
     42
    3843tcb_t *tls_alloc_arch(size_t size, size_t align)
    3944{
     
    4651}
    4752
     53/*
     54 * Rtld TLS support
     55 */
     56
     57typedef struct {
     58        unsigned long int ti_module;
     59        unsigned long int ti_offset;
     60} tls_index;
     61
     62int __tls_debug = 0;
     63
     64void *__tls_get_addr(tls_index *ti);
     65
     66void *__tls_get_addr(tls_index *ti)
     67{
     68        uint8_t *tls;
     69
     70#ifdef CONFIG_RTLD
     71        if (runtime_env != NULL) {
     72                return rtld_tls_get_addr(runtime_env, __tcb_get(),
     73                    ti->ti_module, ti->ti_offset) + 0x8000;
     74        }
     75#endif
     76        /* Get address of static TLS block */
     77        tls = tls_get();
     78        return tls + ti->ti_offset + 0x8000;
     79}
     80
    4881/** @}
    4982 */
Note: See TracChangeset for help on using the changeset viewer.