From Navin Barnwal <knbarnwal@xxxxxxxxx>:
Hello waddlesplash,
I'd like you to do a code review. Please visit
https://review.haiku-os.org/c/haiku/+/2437
to review the following change.
Change subject: HaikuPorts: add intel_microcode for x86_64
......................................................................
HaikuPorts: add intel_microcode for x86_64
Change-Id: If8d165e54a58fc01918d2ffab88657fa7abb3afc
---
M src/libs/compat/freebsd_network/mutex.c
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/37/2437/1
diff --git a/src/libs/compat/freebsd_network/mutex.c
b/src/libs/compat/freebsd_network/mutex.c
index 4a035fb..1084437 100644
--- a/src/libs/compat/freebsd_network/mutex.c
+++ b/src/libs/compat/freebsd_network/mutex.c
@@ -10,8 +10,6 @@
#include <compat/sys/mutex.h>
-// these methods are bit unfriendly, a bit too much panic() around
-
struct mtx Giant;
struct rw_lock ifnet_rwlock;
struct mtx gIdStoreLock;
@@ -49,10 +47,13 @@
void
mtx_destroy(struct mtx *mutex)
{
- if ((mutex->type & MTX_RECURSE) != 0)
+ if ((mutex->type & MTX_RECURSE) != 0) {
recursive_lock_destroy(&mutex->u.recursive);
- else
+ } else if ((mutex->type & MTX_SPIN) != 0) {
+ KASSERT(!B_SPINLOCK_IS_LOCKED(&mutex->u.spinlock.lock), ("spin
mutex is locked"));
+ } else {
mutex_destroy(&mutex->u.mutex.lock);
+ }
}
--
To view, visit https://review.haiku-os.org/c/haiku/+/2437
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: If8d165e54a58fc01918d2ffab88657fa7abb3afc
Gerrit-Change-Number: 2437
Gerrit-PatchSet: 1
Gerrit-Owner: Navin Barnwal <knbarnwal@xxxxxxxxx>
Gerrit-Reviewer: waddlesplash <waddlesplash@xxxxxxxxx>
Gerrit-MessageType: newchange