Changeset ab6edb6 in mainline for uspace/lib/c/generic/async/client.c


Ignore:
Timestamp:
2018-06-26T17:34:48Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e768aea
Parents:
b59318e
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-25 19:28:19)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-26 17:34:48)
Message:

Simplify the interaction between async_futex and fibril_switch().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async/client.c

    rb59318e rab6edb6  
    372372
    373373        /* Leave the async_futex locked when entering this function */
    374         fibril_switch(FIBRIL_TO_MANAGER);
    375 
    376         /* Futex is up automatically after fibril_switch */
     374        fibril_switch(FIBRIL_FROM_BLOCKED);
     375        futex_unlock(&async_futex);
    377376
    378377done:
     
    445444
    446445        /* Leave the async_futex locked when entering this function */
    447         fibril_switch(FIBRIL_TO_MANAGER);
    448 
    449         /* Futex is up automatically after fibril_switch */
     446        fibril_switch(FIBRIL_FROM_BLOCKED);
     447        futex_unlock(&async_futex);
    450448
    451449        if (!msg->done)
     
    511509
    512510        /* Leave the async_futex locked when entering this function */
    513         fibril_switch(FIBRIL_TO_MANAGER);
    514 
    515         /* Futex is up automatically after fibril_switch() */
     511        fibril_switch(FIBRIL_FROM_BLOCKED);
     512        futex_unlock(&async_futex);
    516513}
    517514
Note: See TracChangeset for help on using the changeset viewer.