1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include
Benjamin Valentin 5602587dd7 sys/sema_inv: add inverse Semaphore
It is often desiderable to sync on multiple threads, e.g. there can be a controller
thread that waits for `n` worker threads to finish their job.
An inverse semaphore provides an easy primitive to implement this pattern.

After being initialized with a value `n` (in counter mode), a call to `sema_inv_wait()`
will block until each of the `n` threads has called `sema_inv_post()` exactly once.

There are situations where workers might post an event more than once
(unless additional state is introduced).
For this case, the alternative mask mode is provided.
Here the inverse semaphore is initialized with a bit mask, each worker can clear one
or multiple bits with `sema_inv_post_mask()`. A worker can clear it's bit multiple times.
2021-01-17 00:17:58 +01:00
..
can all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
checksum sys/checksum: add crc8 implementation 2019-12-13 14:50:32 +01:00
crypto sys/crypto: OCB add const 2020-10-05 12:32:51 +02:00
ecc
embUnit sys/include: fix typos 2019-11-23 22:39:37 +01:00
entropy_source sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event sys/event: Allow shared thread for multiple queues 2020-12-03 15:28:35 +01:00
fs pkg/fatfs: bump version to r0.14 2020-11-17 11:29:28 +01:00
hashes sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation. 2020-11-04 09:57:32 +01:00
isrpipe isrpipe: change API to be in line with tsrb 2019-06-05 18:13:57 +02:00
net sock/dtls: add example of a blocking handshake to the doc 2021-01-04 20:22:58 +01:00
riotboot sys/riotboot: add DFU support to riotboot 2021-01-12 11:34:22 +01:00
suit suit/transport/coap: make blocksize configurable 2020-12-03 10:51:42 +01:00
sys sys/bus: add system buses 2020-11-12 22:50:53 +01:00
test_utils sys/test_utils/interactive_sync: allow module disabling 2020-03-02 08:50:18 +01:00
usb usbus/dfu: introduce initial Device Firmware Upgrade support for USBUS 2021-01-12 11:34:22 +01:00
xtimer xtimer: introduce xtimer_msleep() 2020-10-24 21:38:25 +02:00
ztimer sys/ztimer: fix xtimer_compat 2020-12-14 10:46:51 +01:00
analog_util.h sys/include: fix typos 2019-11-23 22:39:37 +01:00
app_metadata.h
architecture.h sys/architecture: add comment on pronunciation 2020-12-15 10:29:58 +01:00
atomic_utils.h sys/atomic_utils: return previous value 2020-12-16 18:09:35 +01:00
auto_init.h sys/auto_init: Added auto-init for multimedia 2020-06-28 21:06:14 +02:00
base64.h sys/base64: Use void pointer for buffers in API 2020-07-02 11:10:06 +02:00
bcd.h
benchmark.h sys/benchmark: don't disable interrupts 2020-07-28 16:03:00 +02:00
bit.h sys/bit: move bit.h from cortexm_common/ to sys/ 2020-12-08 17:07:41 +01:00
bitfield.h bitfield: unify order 2019-11-20 18:53:11 +01:00
bloom.h many typo fixes 2019-11-23 22:39:07 +01:00
byteorder.h core/byteorder: add helpers to convert from little endian to host byte order 2020-11-29 21:41:14 +01:00
c11_atomics_compat.hpp sys/include/c11_atomics_compat.hpp: fix for esp32 2020-05-04 17:56:09 +02:00
cb_mux.h
clif.h sys: Add clif (CoRE Link Format) module 2019-10-04 11:35:52 +02:00
color.h sys/color: add color_rgb_set_brightness() 2019-11-24 23:27:05 +01:00
div.h sys/include: fix typos 2019-11-23 22:39:37 +01:00
eepreg.h
embUnit.h sys/embUnit: fix broken links 2020-03-24 10:39:49 +01:00
entropy_source.h sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event.h sys/event: Allow shared thread for multiple queues 2020-12-03 15:28:35 +01:00
evtimer_mbox.h evtimer: add mbox support 2020-08-21 15:19:22 +02:00
evtimer_msg.h
evtimer.h Merge pull request #13661 from jue89/feature/evtimer_on_ztimer 2020-09-27 14:07:04 +02:00
fmt_table.h sys/fmt: Added submodule fmt_table 2019-08-20 14:32:49 +02:00
fmt.h sys/fmt: add fmt_is_number() 2019-12-05 15:39:24 +01:00
frac.h sys/frac: make gcd32() public 2020-10-22 11:10:14 +02:00
fuzzing.h sys/fuzzing: Initialize 2020-04-07 17:48:39 +02:00
hashes.h
iolist.h many typo fixes 2019-11-23 22:39:07 +01:00
isrpipe.h isrpipe: change API to be in line with tsrb 2019-06-05 18:13:57 +02:00
luid.h sys/luid: add luid_netdev_get_eui48() & luid_netdev_get_eui64() 2020-08-18 11:45:45 +02:00
matstat.h
memarray.h memarray: Inline short alloc and free functions 2020-12-20 17:24:56 +01:00
mineplex.h
od.h sys/od: allow to specify address offset with od_hex_dump_ext() 2021-01-11 14:35:40 +01:00
phydat.h sys/phydat: added phydat_to_json converter 2020-05-20 15:29:24 +02:00
pipe.h
pm_layered.h cpu/native: pm: fix build with pm_layered 2020-12-08 18:24:02 +01:00
progress_bar.h sys/progress_bar: add module for configurable progress bars 2019-12-02 16:48:16 +01:00
ps.h
ptrtag.h sys: Add helpers for pointer tagging 2020-11-17 10:10:28 +01:00
puf_sram.h sys/puf_sram: counter based reseed after soft reset 2020-01-20 14:14:09 +01:00
random.h sys/random: add option to use HWRNG as source of randomness 2020-07-08 18:23:18 +02:00
saul_reg.h saul/doc: Warn about and deprecate saul_reg_rm 2020-05-25 16:16:11 +02:00
schedstatistics.h all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
sema_inv.h sys/sema_inv: add inverse Semaphore 2021-01-17 00:17:58 +01:00
sema.h
seq.h
shell_commands.h
shell.h sys/shell: Add optional hooks for shell commands 2020-07-07 17:00:38 +02:00
stdio_base.h
stdio_rtt.h
stdio_semihosting.h stdio_semihosting: Initial include of Semihosting-based STDIO 2020-06-09 10:15:49 +02:00
stdio_uart.h sys/stdio_uart: Add warning about use in ISR 2020-06-23 23:32:44 +02:00
suit.h suit: Adapt manifest handling to use common storage backend 2020-09-30 14:32:27 +02:00
timex.h sys/timex: change type of NS_PER_SEC 2020-12-02 17:53:00 +01:00
tm.h Merge pull request #13863 from yogo1212/rtc_iff 2020-04-14 23:02:25 +02:00
trace.h sys/trace: initial commit 2020-06-10 21:21:33 +02:00
trickle.h
tsrb.h sys/tsrb: Make thread-safe 2020-10-13 10:32:41 +02:00
unaligned.h sys/unaligned: Add 64 bit version 2020-08-14 12:21:24 +02:00
universal_address.h sys/include: fix typos 2019-11-23 22:39:37 +01:00
uri_parser.h uri_parser: parse interface in IPv6 addresses 2020-11-11 22:47:30 +01:00
usb_board_reset_internal.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb_board_reset.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb.h usb: Add configuration options for USB peripheral serial 2020-12-17 11:37:04 +01:00
utlist.h
uuid.h sys/include: fix typos 2019-11-23 22:39:37 +01:00
vfs.h sys/vfs: adapt to changed thread define location 2020-11-23 16:56:34 +01:00
volatile_utils.h sys/atomic_utils: return previous value 2020-12-16 18:09:35 +01:00
xtimer.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
zptr.h sys/zptr: fix typos 2020-10-02 08:15:00 +02:00
ztimer.h sys/ztimer: Add ztimer_mutex_lock_timeout() 2020-12-08 22:54:39 +01:00