blob: ff635a2755621b0f60b7e682dac89436af4e9914 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 435cc1becf334f650dcdd0763cb0022f27f3f54a Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Wed, 19 Aug 2015 15:57:54 +0200
Subject: [PATCH gnumach 1/5] kern: really zero-out unused simple lock info
entries
* kern/lock.c (simple_unlock): Really zero-out unused simple lock info
entries.
---
kern/lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kern/lock.c b/kern/lock.c
index 46c78da..1daf1b4 100644
--- a/kern/lock.c
+++ b/kern/lock.c
@@ -219,8 +219,8 @@ void simple_unlock(
simple_locks_info[i] = simple_locks_info[simple_locks_taken-1];
}
- simple_locks_info[simple_locks_taken] = (struct simple_locks_info) {0};
simple_locks_taken--;
+ simple_locks_info[simple_locks_taken] = (struct simple_locks_info) {0};
}
#endif /* MACH_SLOCKS && NCPUS == 1 */
--
2.1.4
|