mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-06-05 21:15:09 +00:00
34bd04d6dd
The way the mutex usage verification framework plugs into the library requires it to have access to the API type, which holds the state field. In the new threading API, the mutable function that the framework overrides now only receives a pointer to the platform object that is embedded in the API object. Hence we need to calculate a pointer to the containing API object when given a pointer to the platform object. It's ugly, but it works. A follow-up should clean this up by changing how the mutex usage verification framework plugs into the library. It should use a more normal hook function mechanism instead of replacing the function pointers. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>