mirror of https://github.com/ARMmbed/mbed-os.git
983503f9ee
Like all HAL APIs, the calls in trng_api.h are not expected to be thread-safe. All current accesses to the TRNG HAL are currently via `mbedtls_hardware_poll`. Mbed TLS does not currently serialise these calls itself, as `MBEDTLS_THREADING_C` is not enabled. But even if Mbed TLS's own accesses were serialised, there are other direct users of `mbedtls_hardware_poll` such as randLIB, that need to use direct calls due to lack of API to extract entropy from Mbed TLS. As such it makes sense to treat `mbedtls_hardware_poll` as a de facto public Mbed OS API, akin to the C++ veneers on top of the HAL, and add a PlatformMutex there so that it is safe for multithreaded use. |
||
---|---|---|
.. | ||
TARGET_PSA | ||
inc | ||
src |