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


Ignore:
Timestamp:
2011-06-01T08:43:42Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6c1f1
Parents:
9e2e715 (diff), e51a514 (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:

Huuuuuge merge from development - all the work actually :)

File:
1 moved

Legend:

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

    r9e2e715 reb522e8  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2008 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup arp
    30  *  @{
     29/** @addtogroup libc
     30 * @{
     31 */
     32/** @file
    3133 */
    3234
    33 /** @file
    34  * ARP protocol header.
    35  * Based on the RFC 826.
    36  */
    37 
    38 #ifndef NET_ARP_HEADER_H_
    39 #define NET_ARP_HEADER_H_
     35#ifndef LIBC_RTLD_MODULE_H_
     36#define LIBC_RTLD_MODULE_H_
    4037
    4138#include <sys/types.h>
     39#include <rtld/dynamic.h>
     40#include <adt/list.h>
    4241
    43 /** Type definition of an ARP protocol header.
    44  * @see arp_header
    45  */
    46 typedef struct arp_header arp_header_t;
     42typedef struct module {
     43        dyn_info_t dyn;
     44        size_t bias;
    4745
    48 /** Type definition of an ARP protocol header pointer.
    49  * @see arp_header
    50  */
    51 typedef arp_header_t *arp_header_ref;
     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 /** ARP protocol header. */
    54 struct arp_header {
    55         /**
    56          * Hardware type identifier.
    57          * @see hardware.h
    58          */
    59         uint16_t hardware;
    60        
    61         /** Protocol identifier. */
    62         uint16_t protocol;
    63         /** Hardware address length in bytes. */
    64         uint8_t hardware_length;
    65         /** Protocol address length in bytes. */
    66         uint8_t protocol_length;
    67        
    68         /**
    69          * ARP packet type.
    70          * @see arp_oc.h
    71          */
    72         uint16_t operation;
    73 } __attribute__ ((packed));
     51        /** True iff relocations have already been processed in this module. */
     52        bool relocated;
     53
     54        /** Link to list of all modules in runtime environment */
     55        link_t modules_link;
     56
     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);
    7470
    7571#endif
Note: See TracChangeset for help on using the changeset viewer.