Changeset 694ca93f in mainline for uspace/lib/c/include/rtld/module.h
- Timestamp:
- 2011-05-01T19:34:26Z (13 years ago)
- 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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/rtld/module.h
r1ff896e r694ca93f 1 1 /* 2 * Copyright (c) 2007 Jan Hudecek 3 * Copyright (c) 2008 Martin Decky 2 * Copyright (c) 2008 Jiri Svoboda 4 3 * All rights reserved. 5 4 * … … 28 27 */ 29 28 30 /** @addtogroup genericproc29 /** @addtogroup libc 31 30 * @{ 32 31 */ 33 /** @file tasklet.h 34 * @brief Tasklets declarations 32 /** @file 35 33 */ 36 34 37 #ifndef KERN_TASKLET_H_38 #define KERN_TASKLET_H_35 #ifndef LIBC_RTLD_MODULE_H_ 36 #define LIBC_RTLD_MODULE_H_ 39 37 38 #include <sys/types.h> 39 #include <rtld/dynamic.h> 40 40 #include <adt/list.h> 41 41 42 /** Tasklet callback type */ 43 typedef void (* tasklet_callback_t)(void *arg); 42 typedef struct module { 43 dyn_info_t dyn; 44 size_t bias; 44 45 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; 52 50 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; 66 53 54 /** Link to list of all modules in runtime environment */ 55 link_t modules_link; 67 56 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 63 void module_process_relocs(module_t *m); 64 module_t *module_find(const char *name); 65 module_t *module_load(const char *name); 66 void module_load_deps(module_t *m); 67 68 void modules_process_relocs(module_t *start); 69 void modules_untag(void); 69 70 70 71 #endif
Note:
See TracChangeset
for help on using the changeset viewer.