Changeset 1de92fb0 in mainline for uspace/lib/c/include/fibril_synch.h


Ignore:
Timestamp:
2018-08-01T18:15:53Z (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:
f787c8e
Parents:
6340b4d2
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-31 22:01:34)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-01 18:15:53)
Message:

Implement MPSC FIFO channel and use it to pass inbound IPC calls to the connection fibril.

Technically, a SPSC channel would be sufficient for this, and might be added
in the future but MPSC is more widely useful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/fibril_synch.h

    r6340b4d2 r1de92fb0  
    5050 *         - may not use any other synchronization primitive,
    5151 *           save for another `fibril_rmutex_t`. This includes nonblocking
    52  *           operations like cvar signal and mutex unlock.
     52 *           operations like cvar signal and mutex unlock, unless otherwise
     53 *           specified.
    5354 *         - may not read IPC messages
    5455 *         - may not start a new thread/fibril
     
    245246extern void fibril_semaphore_close(fibril_semaphore_t *);
    246247
     248typedef struct mpsc mpsc_t;
     249extern mpsc_t *mpsc_create(size_t);
     250extern void mpsc_destroy(mpsc_t *);
     251extern errno_t mpsc_send(mpsc_t *, const void *);
     252extern errno_t mpsc_receive(mpsc_t *, void *, const struct timeval *);
     253extern void mpsc_close(mpsc_t *);
     254
    247255#endif
    248256
Note: See TracChangeset for help on using the changeset viewer.