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_synch.c

    r3ce781f4 raaa3c457  
    5151#include "../private/futex.h"
    5252
    53 void fibril_rmutex_initialize(fibril_rmutex_t *m)
    54 {
    55         futex_initialize(&m->futex, 1);
     53errno_t fibril_rmutex_initialize(fibril_rmutex_t *m)
     54{
     55        return futex_initialize(&m->futex, 1);
     56}
     57
     58void fibril_rmutex_destroy(fibril_rmutex_t *m)
     59{
     60        futex_destroy(&m->futex);
    5661}
    5762
     
    8590static fibril_local bool deadlocked = false;
    8691
    87 static futex_t fibril_synch_futex = FUTEX_INITIALIZER;
     92static futex_t fibril_synch_futex;
     93
     94void __fibril_synch_init(void)
     95{
     96        if (futex_initialize(&fibril_synch_futex, 1) != EOK)
     97                abort();
     98}
     99
     100void __fibril_synch_fini(void)
     101{
     102        futex_destroy(&fibril_synch_futex);
     103}
    88104
    89105typedef struct {
Note: See TracChangeset for help on using the changeset viewer.