Changeset 694ca93f in mainline for uspace/lib/c/include/rtld/module.h


Ignore:
Timestamp:
2011-05-01T19:34:26Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e26444
Parents:
1ff896e (diff), 042fbe0 (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 mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/rtld/module.h

    r1ff896e r694ca93f  
    11/*
    2  * Copyright (c) 2007 Jan Hudecek
    3  * Copyright (c) 2008 Martin Decky
     2 * Copyright (c) 2008 Jiri Svoboda
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
    30 /** @addtogroup genericproc
     29/** @addtogroup libc
    3130 * @{
    3231 */
    33 /** @file tasklet.h
    34  * @brief Tasklets declarations
     32/** @file
    3533 */
    3634
    37 #ifndef KERN_TASKLET_H_
    38 #define KERN_TASKLET_H_
     35#ifndef LIBC_RTLD_MODULE_H_
     36#define LIBC_RTLD_MODULE_H_
    3937
     38#include <sys/types.h>
     39#include <rtld/dynamic.h>
    4040#include <adt/list.h>
    4141
    42 /** Tasklet callback type */
    43 typedef void (* tasklet_callback_t)(void *arg);
     42typedef struct module {
     43        dyn_info_t dyn;
     44        size_t bias;
    4445
    45 /** Tasklet state */
    46 typedef enum {
    47         NotActive,
    48         Scheduled,
    49         InProgress,
    50         Disabled
    51 } tasklet_state_t;
     46        /** Array of pointers to directly dependent modules */
     47        struct module **deps;
     48        /** Number of fields in deps */
     49        size_t n_deps;
    5250
    53 /** Structure describing a tasklet */
    54 typedef struct tasklet_descriptor {
    55         link_t link;
    56        
    57         /** Callback to call */
    58         tasklet_callback_t callback;
    59        
    60         /** Argument passed to the callback */
    61         void *arg;
    62        
    63         /** State of the tasklet */
    64         tasklet_state_t state;
    65 } tasklet_descriptor_t;
     51        /** True iff relocations have already been processed in this module. */
     52        bool relocated;
    6653
     54        /** Link to list of all modules in runtime environment */
     55        link_t modules_link;
    6756
    68 extern void tasklet_init(void);
     57        /** Link to BFS queue. Only used when doing a BFS of the module graph */
     58        link_t queue_link;
     59        /** Tag for modules already processed during a BFS */
     60        bool bfs_tag;
     61} module_t;
     62
     63void module_process_relocs(module_t *m);
     64module_t *module_find(const char *name);
     65module_t *module_load(const char *name);
     66void module_load_deps(module_t *m);
     67
     68void modules_process_relocs(module_t *start);
     69void modules_untag(void);
    6970
    7071#endif
Note: See TracChangeset for help on using the changeset viewer.