zephyr/drivers/sensor/mcp9808
James Harris b10428163a kernel: sem: add K_SEM_MAX_LIMIT
Currently there is no way to distinguish between a caller
explicitly asking for a semaphore with a limit that
happens to be `UINT_MAX` and a semaphore that just
has a limit "as large as possible".

Add `K_SEM_MAX_LIMIT`, currently defined to `UINT_MAX`, and akin
to `K_FOREVER` versus just passing some very large wait time.

In addition, the `k_sem_*` APIs were type-confused, where
the internal data structure was `uint32_t`, but the APIs took
and returned `unsigned int`. This changes the underlying data
structure to also use `unsigned int`, as changing the APIs
would be a (potentially) breaking change.

These changes are backwards-compatible, but it is strongly suggested
to take a quick scan for `k_sem_init` and `K_SEM_DEFINE` calls with
`UINT_MAX` (or `UINT32_MAX`) and replace them with `K_SEM_MAX_LIMIT`
where appropriate.

Signed-off-by: James Harris <james.harris@intel.com>
2021-03-05 08:13:53 -06:00
..
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig sensor: mcp9808: Convert to DTS 2019-11-08 07:44:54 -06:00
mcp9808.c sensor: mcp9808: Adding temperature resolution to MCP9808 sensor driver 2021-02-15 08:13:17 -05:00
mcp9808.h sensor: mcp9808: Adding temperature resolution to MCP9808 sensor driver 2021-02-15 08:13:17 -05:00
mcp9808_trigger.c kernel: sem: add K_SEM_MAX_LIMIT 2021-03-05 08:13:53 -06:00