Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 899342e in mainline


Ignore:
Timestamp:
2018-06-11T18:07:59Z (3 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
master
Children:
a55d76b1
Parents:
ec39720
Message:

fibril_futex must be locked during context_swap().

File:
1 edited

Legend:

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

    rec39720 r899342e  
    7272static void fibril_main(void)
    7373{
     74        /* fibril_futex is locked when a fibril is first started. */
     75        futex_unlock(&fibril_futex);
     76
    7477        fibril_t *fibril = __tcb_get()->fibril_data;
    7578
     
    211214        }
    212215
    213         futex_unlock(&fibril_futex);
    214 
    215216#ifdef FUTEX_UPGRADABLE
    216217        if (stype == FIBRIL_FROM_DEAD) {
     
    223224
    224225        /* Restored by another fibril! */
     226
     227        /* Must be after context_swap()! */
     228        futex_unlock(&fibril_futex);
    225229
    226230        if (srcf->clean_after_me) {
Note: See TracChangeset for help on using the changeset viewer.