Changeset 9bde0d5 in mainline for uspace/app


Ignore:
Timestamp:
2018-07-18T19:56:43Z (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:
42f5860
Parents:
40abf56a
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 19:47:28)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 19:56:43)
Message:

Replace a bunch of direct uses of futex_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/rcubench/rcubench.c

    r40abf56a r9bde0d5  
    5959        size_t iters;
    6060        size_t nthreads;
    61         futex_t done_threads;
    62 
    63         futex_t bench_fut;
     61        fibril_semaphore_t done_threads;
    6462} bench_t;
    6563
     
    111109
    112110        /* Signal another thread completed. */
    113         futex_up(&bench->done_threads);
     111        fibril_semaphore_up(&bench->done_threads);
    114112        return EOK;
    115113}
     
    147145        /* Wait for threads to complete. */
    148146        for (size_t k = 0; k < bench->nthreads; ++k) {
    149                 futex_down(&bench->done_threads);
     147                fibril_semaphore_down(&bench->done_threads);
    150148        }
    151149}
     
    202200        }
    203201
    204         futex_initialize(&bench->bench_fut, 1);
    205 
    206202        if (0 == str_cmp(argv[1], "sys-futex")) {
    207203                bench->func = kernel_futex_bench;
     
    247243        bench_t bench;
    248244
    249         futex_initialize(&bench.done_threads, 0);
     245        fibril_semaphore_initialize(&bench.done_threads, 0);
    250246
    251247        if (!parse_cmd_line(argc, argv, &bench, &err)) {
Note: See TracChangeset for help on using the changeset viewer.