Changeset f356618 in mainline for uspace/lib/c/generic/libc.c


Ignore:
Timestamp:
2016-05-22T21:05:55Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b3364b7c
Parents:
af2254ec (diff), 3a9414e (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:

Merge dynamic linking support for thread local storage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/libc.c

    raf2254ec rf356618  
    4141 */
    4242
     43#include <errno.h>
    4344#include <libc.h>
    4445#include <stdlib.h>
     
    6869        __malloc_init();
    6970       
     71        /* Save the PCB pointer */
     72        __pcb = (pcb_t *) pcb_ptr;
     73       
     74#ifdef CONFIG_RTLD
     75        if (__pcb != NULL && __pcb->rtld_runtime != NULL) {
     76                runtime_env = (rtld_t *) __pcb->rtld_runtime;
     77        } else {
     78                if (rtld_init_static() != EOK)
     79                        abort();
     80        }
     81#endif
     82       
    7083        fibril_t *fibril = fibril_setup();
    7184        if (fibril == NULL)
     
    7487        __tcb_set(fibril->tcb);
    7588       
    76         /* Save the PCB pointer */
    77         __pcb = (pcb_t *) pcb_ptr;
    7889       
    7990#ifdef FUTEX_UPGRADABLE
     
    89100        char **argv;
    90101       
    91 #ifdef CONFIG_RTLD
    92         if (__pcb != NULL && __pcb->rtld_runtime != NULL) {
    93                 runtime_env = (rtld_t *) __pcb->rtld_runtime;
    94         }
    95 #endif
    96102        /*
    97103         * Get command line arguments and initialize
Note: See TracChangeset for help on using the changeset viewer.