Changeset eb522e8 in mainline for uspace/lib/net/adt/module_map.c


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 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/adt/module_map.c

    r9e2e715 reb522e8  
    5959 *                      running.
    6060 * @param[in] connect_module The module connecting function.
    61  * @returns             EOK on success.
    62  * @returns             ENOMEM if there is not enough memory left.
     61 * @return              EOK on success.
     62 * @return              ENOMEM if there is not enough memory left.
    6363 */
    6464int
    65 add_module(module_ref *module, modules_ref modules, const char *name,
    66     const char *filename, services_t service, task_id_t task_id,
     65add_module(module_t **module, modules_t *modules, const uint8_t *name,
     66    const uint8_t *filename, services_t service, task_id_t task_id,
    6767    connect_module_t connect_module)
    6868{
    69         module_ref tmp_module;
     69        module_t *tmp_module;
    7070        int rc;
    7171
    72         tmp_module = (module_ref) malloc(sizeof(module_t));
     72        tmp_module = (module_t *) malloc(sizeof(module_t));
    7373        if (!tmp_module)
    7474                return ENOMEM;
     
    100100 * @param[in] modules   The module map.
    101101 * @param[in] name      The module name.
    102  * @returns             The running module found. It does not have to be
     102 * @return              The running module found. It does not have to be
    103103 *                      connected.
    104  * @returns             NULL if there is no such module.
     104 * @return              NULL if there is no such module.
    105105 */
    106 module_ref get_running_module(modules_ref modules, char *name)
     106module_t *get_running_module(modules_t *modules, uint8_t *name)
    107107{
    108         module_ref module;
     108        module_t *module;
    109109
    110110        module = modules_find(modules, name, 0);
     
    113113
    114114        if (!module->task_id) {
    115                 module->task_id = spawn(module->filename);
     115                module->task_id = net_spawn(module->filename);
    116116                if (!module->task_id)
    117117                        return NULL;
     
    123123}
    124124
    125 /** Starts the given module.
     125/** Start the given module.
    126126 *
    127  * @param[in] fname     The module full or relative path filename.
    128  * @returns             The new module task identifier on success.
    129  * @returns             Zero if there is no such module.
     127 * @param[in] fname The module full or relative path filename.
     128 *
     129 * @return The new module task identifier on success.
     130 * @return Zero if there is no such module.
     131 *
    130132 */
    131 task_id_t spawn(const char *fname)
     133task_id_t net_spawn(const uint8_t *fname)
    132134{
    133135        task_id_t id;
    134136        int rc;
    135137       
    136         rc = task_spawnl(&id, fname, fname, NULL);
     138        rc = task_spawnl(&id, (const char *) fname, (const char *) fname, NULL);
    137139        if (rc != EOK)
    138140                return 0;
Note: See TracChangeset for help on using the changeset viewer.