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


Ignore:
Timestamp:
2018-06-25T21:45:15Z (7 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:
38e3427
Parents:
3679f51a
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-25 20:58:01)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-25 21:45:15)
Message:

Switch async_futex to using futex_lock/unlock.

File:
1 edited

Legend:

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

    r3679f51a r95838f1  
    243243        assert(arg);
    244244
    245         futex_down(&async_futex);
     245        futex_lock(&async_futex);
    246246
    247247        amsg_t *msg = (amsg_t *) arg;
     
    268268        }
    269269
    270         futex_up(&async_futex);
     270        futex_unlock(&async_futex);
    271271}
    272272
     
    357357        amsg_t *msg = (amsg_t *) amsgid;
    358358
    359         futex_down(&async_futex);
     359        futex_lock(&async_futex);
    360360
    361361        assert(!msg->forget);
     
    363363
    364364        if (msg->done) {
    365                 futex_up(&async_futex);
     365                futex_unlock(&async_futex);
    366366                goto done;
    367367        }
     
    403403        amsg_t *msg = (amsg_t *) amsgid;
    404404
    405         futex_down(&async_futex);
     405        futex_lock(&async_futex);
    406406
    407407        assert(!msg->forget);
     
    409409
    410410        if (msg->done) {
    411                 futex_up(&async_futex);
     411                futex_unlock(&async_futex);
    412412                goto done;
    413413        }
     
    477477        assert(!msg->destroyed);
    478478
    479         futex_down(&async_futex);
     479        futex_lock(&async_futex);
    480480
    481481        if (msg->done) {
     
    486486        }
    487487
    488         futex_up(&async_futex);
     488        futex_unlock(&async_futex);
    489489}
    490490
     
    506506        tv_add_diff(&awaiter.to_event.expires, timeout);
    507507
    508         futex_down(&async_futex);
     508        futex_lock(&async_futex);
    509509
    510510        async_insert_timeout(&awaiter);
Note: See TracChangeset for help on using the changeset viewer.