File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,24 @@ rt_err_t dlmodule_load_shared_object(struct rt_dlmodule* module, void *module_pt
226226 length );
227227 count ++ ;
228228 }
229+
230+ /* get priority param */
231+ for (i = 0 ; i < shdr [index ].sh_size / sizeof (Elf32_Sym ); i ++ )
232+ {
233+ if (rt_strcmp ((const char * )(strtab + symtab [i ].st_name ), "dlmodule_thread_priority" ) == 0 )
234+ {
235+ module -> priority = * (rt_uint16_t * )(module -> mem_space + symtab [i ].st_value - module -> vstart_addr );
236+ }
237+ }
238+
239+ /* get stack size param */
240+ for (i = 0 ; i < shdr [index ].sh_size / sizeof (Elf32_Sym ); i ++ )
241+ {
242+ if (rt_strcmp ((const char * )(strtab + symtab [i ].st_name ), "dlmodule_thread_stacksize" ) == 0 )
243+ {
244+ module -> stack_size = * (rt_uint32_t * )(module -> mem_space + symtab [i ].st_value - module -> vstart_addr );
245+ }
246+ }
229247 }
230248
231249 return RT_EOK ;
You can’t perform that action at this time.
0 commit comments