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

Ignore:
Timestamp:
2018-11-12T10:36:10Z (3 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master
Children:
a43dfcb
Parents:
3ce781f4 (diff), 6874bd2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermář <jakub@…> (2018-11-12 10:36:10)
git-committer:
GitHub <noreply@…> (2018-11-12 10:36:10)
Message:

Merge pull request #56 from jermar/futexremoval

Remove kernel support for futexes in favor of waitq kobjects.

File:
1 edited

Legend:

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

    r3ce781f4 raaa3c457  
    8787
    8888/* This futex serializes access to global data. */
    89 static futex_t fibril_futex = FUTEX_INITIALIZER;
     89static futex_t fibril_futex;
    9090static futex_t ready_semaphore;
    9191static long ready_st_count;
     
    9595static LIST_INITIALIZE(timeout_list);
    9696
    97 static futex_t ipc_lists_futex = FUTEX_INITIALIZER;
     97static futex_t ipc_lists_futex;
    9898static LIST_INITIALIZE(ipc_waiter_list);
    9999static LIST_INITIALIZE(ipc_buffer_list);
     
    796796        if (!multithreaded) {
    797797                _ready_debug_check();
    798                 futex_initialize(&ready_semaphore, ready_st_count);
     798                if (futex_initialize(&ready_semaphore, ready_st_count) != EOK)
     799                        abort();
    799800                multithreaded = true;
    800801        }
     
    861862void __fibrils_init(void)
    862863{
     864        if (futex_initialize(&fibril_futex, 1) != EOK)
     865                abort();
     866        if (futex_initialize(&ipc_lists_futex, 1) != EOK)
     867                abort();
     868
    863869        /*
    864870         * We allow a fixed, small amount of parallelism for IPC reads, but
     
    876882}
    877883
     884void __fibrils_fini(void)
     885{
     886        futex_destroy(&fibril_futex);
     887        futex_destroy(&ipc_lists_futex);
     888}
     889
    878890void fibril_usleep(usec_t timeout)
    879891{
Note: See TracChangeset for help on using the changeset viewer.