Changeset ab936440 in mainline for uspace/lib/c/arch/arm32/src/tls.c


Ignore:
Timestamp:
2019-02-12T20:42:42Z (7 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f31ca47
Parents:
7f7817a9 (diff), 4805495 (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.
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:26:18)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:42:42)
Message:

Merge branch 'master' into bdsh_alias

Conflicts:

uspace/app/bdsh/Makefile
uspace/app/bdsh/cmds/modules/modules.h

Ccheck correction and removing header which includes itself

File:
1 edited

Legend:

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

    r7f7817a9 rab936440  
    11/*
     2 * Copyright (c) 2019 Jiri Svoboda
    23 * Copyright (c) 2007 Pavel Jancik
    34 * All rights reserved.
     
    3839#include <stddef.h>
    3940
     41#ifdef CONFIG_RTLD
     42#include <rtld/rtld.h>
     43#endif
     44
    4045tcb_t *tls_alloc_arch(size_t size, size_t align)
    4146{
     
    4853}
    4954
     55/*
     56 * Rtld TLS support
     57 */
     58
     59typedef struct {
     60        unsigned long int ti_module;
     61        unsigned long int ti_offset;
     62} tls_index;
     63
     64int __tls_debug = 0;
     65
     66void *__tls_get_addr(tls_index *ti);
     67
     68void *__tls_get_addr(tls_index *ti)
     69{
     70        uint8_t *tls;
     71
     72#ifdef CONFIG_RTLD
     73        if (runtime_env != NULL) {
     74                return rtld_tls_get_addr(runtime_env, __tcb_get(),
     75                    ti->ti_module, ti->ti_offset);
     76        }
     77#endif
     78        /* Get address of static TLS block */
     79        tls = tls_get();
     80        return tls + ti->ti_offset;
     81}
     82
    5083/** @}
    5184 */
Note: See TracChangeset for help on using the changeset viewer.