Changeset aaa3c457 in mainline for uspace/lib/c/generic/io/kio.c


Ignore:
Timestamp:
2018-11-12T10:36:10Z (6 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
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/io/kio.c

    r3ce781f4 raaa3c457  
    3838#include <str.h>
    3939#include <stdint.h>
     40#include <stdlib.h>
    4041#include <errno.h>
    4142#include <abi/kio.h>
     
    5354        char data[KIO_BUFFER_SIZE];
    5455        size_t used;
    55 } kio_buffer = { .futex = FUTEX_INITIALIZER, };
     56} kio_buffer;
     57
     58void __kio_init(void)
     59{
     60        if (futex_initialize(&kio_buffer.futex, 1) != EOK)
     61                abort();
     62}
     63
     64void __kio_fini(void)
     65{
     66        futex_destroy(&kio_buffer.futex);
     67}
    5668
    5769errno_t kio_write(const void *buf, size_t size, size_t *nwritten)
Note: See TracChangeset for help on using the changeset viewer.