Attention is currently required from: Julius Werner, Rob Barnes, Kyösti Mälkki, Karthik Ramasubramanian.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59320 )
Change subject: lib: Add a mutex
......................................................................
Patch Set 3:
(2 comments)
File src/include/mutex.h:
PS2:
License
Done
https://review.coreboot.org/c/coreboot/+/59320/comment/9807d471_40f9f83d
PS2, Line 11: void mutex_unlock(struct mutex *mutex);
These should be static inline no-ops when neither SMP nor threading is enabled.
So I wanted to make it so the lock/unlock asserts were checked regardless of threading or SMP. This way we don't introduce code that works with coop disabled, but then breaks when coop is enabled. I felt the increase in BSS and code was small enough that it was worth it. What do you think?
Otherwise I can add a check into the functions:
i.e.,
```
if (ENV_STAGE_SUPPORTS_SMP)
mutex_lock_smp(mutex);
else if (CONFIG(COOP_MULTITASKING))
mutex_lock_nosmp(mutex);
```
--
To view, visit
https://review.coreboot.org/c/coreboot/+/59320
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I41e02a54a17b1f6513b36a0274e43fc715472d78
Gerrit-Change-Number: 59320
Gerrit-PatchSet: 3
Gerrit-Owner: Raul Rangel
rrangel@chromium.org
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Reviewer: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-Reviewer: Rob Barnes
robbarnes@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Felix Held
felix-coreboot@felixheld.de
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Julius Werner
jwerner@chromium.org
Gerrit-Attention: Rob Barnes
robbarnes@google.com
Gerrit-Attention: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-Attention: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Comment-Date: Tue, 16 Nov 2021 21:54:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner
jwerner@chromium.org
Gerrit-MessageType: comment