Changeset 2482192 in mainline
- Timestamp:
- 2025-03-05T22:22:36Z (4 days ago)
- Children:
- 9a41e6e
- Parents:
- 5208709
- git-author:
- Matěj Volf <git@…> (2025-01-18 20:57:32)
- git-committer:
- Matěj Volf <git@…> (2025-03-05 22:22:36)
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/libc.c
r5208709 r2482192 172 172 void __libc_exit(int status) 173 173 { 174 // TODO: some teardown of the main fibril? 175 // namely, fibril_exit_hooks would like to run even on the main fibril 176 174 177 /* 175 178 * GCC extension __attribute__((destructor)), -
uspace/lib/c/generic/thread/fibril.c
r5208709 r2482192 185 185 void fibril_setup(fibril_t *f) 186 186 { 187 list_initialize(&f->exit_hooks); 187 188 futex_lock(&fibril_futex); 188 189 list_append(&f->all_link, &fibril_list); … … 566 567 fibril->arg = arg; 567 568 568 list_initialize(&fibril->exit_hooks);569 570 569 context_create_t sctx = { 571 570 .fn = _fibril_main, … … 934 933 return ENOMEM; 935 934 935 DPRINTF("adding exit hook: function %p (fibril_hook_t structure at %p)\n", hook, h); 936 936 937 h->func = hook; 937 938 list_append(&h->link, &fibril_self()->exit_hooks); -
uspace/srv/loader/main.c
r5208709 r2482192 355 355 DPRINTF("Jump to entry point at %p\n", pcb.entry); 356 356 357 // mvolfik is very confused: why is __libc_fini called BEFORE jumping to entrypoint?? 357 358 __libc_fini(); 358 359 __tcb_reset();
Note:
See TracChangeset
for help on using the changeset viewer.