Ignore:
File:
1 edited

Legend:

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

    r9d58539 r153c7a29  
    4141 */
    4242
     43#include <errno.h>
    4344#include <libc.h>
    4445#include <stdlib.h>
     
    5253#include "private/io.h"
    5354
     55#ifdef FUTEX_UPGRADABLE
     56#include <rcu.h>
     57#endif
     58
    5459#ifdef CONFIG_RTLD
    5560#include <rtld/rtld.h>
    5661#endif
     62
    5763
    5864static bool env_setup = false;
     
    6268        /* Initialize user task run-time environment */
    6369        __malloc_init();
    64         __async_init();
     70       
     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
    6582       
    6683        fibril_t *fibril = fibril_setup();
     
    7087        __tcb_set(fibril->tcb);
    7188       
    72         /* Save the PCB pointer */
    73         __pcb = (pcb_t *) pcb_ptr;
     89       
     90#ifdef FUTEX_UPGRADABLE
     91        rcu_register_fibril();
     92#endif
     93       
     94        __async_init();
    7495       
    7596        /* The basic run-time environment is setup */
     
    79100        char **argv;
    80101       
    81 #ifdef __IN_SHARED_LIBC__
    82         if (__pcb != NULL && __pcb->rtld_runtime != NULL) {
    83                 runtime_env = (runtime_env_t *) __pcb->rtld_runtime;
    84         }
    85 #endif
    86102        /*
    87103         * Get command line arguments and initialize
     
    112128                __stdio_done();
    113129                task_retval(status);
    114                 fibril_teardown(__tcb_get()->fibril_data);
     130                fibril_teardown(__tcb_get()->fibril_data, false);
    115131        }
    116132       
Note: See TracChangeset for help on using the changeset viewer.