Changeset d50f3e5 in mainline for uspace/lib/c/generic/thread/fibril.c


Ignore:
Timestamp:
2025-03-09T20:06:24Z (15 hours ago)
Author:
Matěj Volf <git@…>
Children:
53e652d
Parents:
af28af6
git-author:
Matěj Volf <git@…> (2025-03-09 20:05:51)
git-committer:
Matěj Volf <git@…> (2025-03-09 20:06:24)
Message:

decrease scrope of pthread keys support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/thread/fibril.c

    raf28af6 rd50f3e5  
    185185void fibril_setup(fibril_t *f)
    186186{
    187         list_initialize(&f->exit_hooks);
    188187        futex_lock(&fibril_futex);
    189188        list_append(&f->all_link, &fibril_list);
     
    846845}
    847846
    848 void fibril_run_exit_hooks(fibril_t *f)
    849 {
    850         list_foreach_safe(f->exit_hooks, cur, _next) {
    851                 fibril_hook_t *hook = list_get_instance(cur, fibril_hook_t, link);
    852                 list_remove(cur);
    853                 hook->func();
    854                 free(hook);
    855         }
    856 }
    857 
    858847/**
    859848 * Exit a fibril. Never returns.
     
    865854        // TODO: implement fibril_join() and remember retval
    866855        (void) retval;
    867 
    868         fibril_run_exit_hooks(fibril_self());
    869856
    870857        fibril_t *f = _ready_list_pop_nonblocking(false);
     
    931918}
    932919
    933 errno_t fibril_add_exit_hook(void (*hook)(void))
    934 {
    935         fibril_hook_t *h = malloc(sizeof(fibril_hook_t));
    936         if (!h)
    937                 return ENOMEM;
    938 
    939         DPRINTF("adding exit hook: function %p (fibril_hook_t structure at %p)\n", hook, h);
    940 
    941         h->func = hook;
    942         list_append(&h->link, &fibril_self()->exit_hooks);
    943         return EOK;
    944 }
    945 
    946920errno_t fibril_ipc_wait(ipc_call_t *call, const struct timespec *expires)
    947921{
Note: See TracChangeset for help on using the changeset viewer.