Changeset 91e4567 in mainline for uspace/lib/c/generic/libc.c


Ignore:
Timestamp:
2016-05-06T15:21:22Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dc9a474
Parents:
7c4b26c
Message:

runtime_env must be set early, before calling fibril_setup.

File:
1 edited

Legend:

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

    r7c4b26c r91e4567  
    6565void __main(void *pcb_ptr)
    6666{
     67        /* Save the PCB pointer */
     68        __pcb = (pcb_t *) pcb_ptr;
     69       
     70#ifdef CONFIG_RTLD
     71        if (__pcb != NULL && __pcb->rtld_runtime != NULL) {
     72                runtime_env = (rtld_t *) __pcb->rtld_runtime;
     73        }
     74#endif
    6775        /* Initialize user task run-time environment */
    6876        __malloc_init();
     
    7482        __tcb_set(fibril->tcb);
    7583       
    76         /* Save the PCB pointer */
    77         __pcb = (pcb_t *) pcb_ptr;
    7884       
    7985#ifdef FUTEX_UPGRADABLE
     
    8995        char **argv;
    9096       
    91 #ifdef CONFIG_RTLD
    92         if (__pcb != NULL && __pcb->rtld_runtime != NULL) {
    93                 runtime_env = (rtld_t *) __pcb->rtld_runtime;
    94         }
    95 #endif
    9697        /*
    9798         * Get command line arguments and initialize
Note: See TracChangeset for help on using the changeset viewer.