diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-03-23 14:44:36 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-23 23:21:52 +0000 |
commit | 416b1307caa472cacabd227d72e72c56c7a7040d (patch) | |
tree | 3518d3ba01201ba440d57e0323b76052fe38a4c4 /common/chipset.c | |
parent | 2ff6477da30081edc3f396c60b0089ccc42a9f78 (diff) | |
download | chrome-ec-416b1307caa472cacabd227d72e72c56c7a7040d.tar.gz |
throttle_ap: convert throttle_mutex to use K_MUTEX_DEFINE
K_MUTEX_DEFINE creates a statically-initialized mutex, and is now
available for both Zephyr and CrOS EC OS.
The previous way of initializing this mutex required a boolean
variable, which could potentially be the cause of a race condition if
the mutex had been initialized in two threads (this condition has not
been observed, though).
Change to K_MUTEX_DEFINE to demonstrate the new way to do this.
BUG=b:177677037
BRANCH=none
TEST=compile for zephyr and CrOS EC OS
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Id27e6bff975809a2ea51bb5e9ddb0e9e6971f066
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782232
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/chipset.c')
0 files changed, 0 insertions, 0 deletions