Attention is currently required from: Raul Rangel, Rob Barnes, Kyösti Mälkki, Karthik Ramasubramanian.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59320 )
Change subject: lib: Add a mutex
......................................................................
Patch Set 5:
(1 comment)
File src/include/mutex.h:
https://review.coreboot.org/c/coreboot/+/59320/comment/1688c9bd_8232c308
PS2, Line 11: void mutex_unlock(struct mutex *mutex);
A no-op function will get garbage collected anyway.
Uhh... not if it's not inline, no. Unless I'm really confused about something here. (Or you're using LTO which we aren't, yet.)
I'm not really sure I understand the Makefile problem. If you just move the mutex_lock() you have right now as a static inline into the header, split your mutex_unlock() into a mutex_unlock_smp() and mutex_unlock_coop(), and then write a static inline mutex_unlock() stub in the header that calls either of those, doesn't that work? (You can compile the .c file unconditionally, that's fine, it'll just not be used if neither SMP nor coop are enabled.)
--
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: 5
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: Raul Rangel
rrangel@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: Fri, 19 Nov 2021 23:36:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Raul Rangel
rrangel@chromium.org
Comment-In-Reply-To: Julius Werner
jwerner@chromium.org
Gerrit-MessageType: comment