File: git-openmp-nested-lock

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (26 lines) | stat: -rw-r--r-- 935 bytes parent folder | download
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
commit 781c6459e6ef74882d46797426d1551fc4cbe008
Author: François Trahay <francois.trahay@telecom-sudparis.eu>
Date:   Thu Aug 25 09:31:24 2022 +0200

    add missing initialization

diff --git a/src/modules/omp/gomp.c b/src/modules/omp/gomp.c
index 6ef52892..eda9af9d 100644
--- a/src/modules/omp/gomp.c
+++ b/src/modules/omp/gomp.c
@@ -947,6 +947,7 @@ void POMP2_Init_nest_lock(omp_nest_lock_t* s) {
 
   struct ezt_omp_lock_info* l = malloc(sizeof(struct ezt_omp_lock_info));
   l->acquisition_order = 0;
+  l->nested_lock_count = 0;
   l->lock_id = next_lock_id ++;
   l->addr = (omp_lock_t*)s;
   ezt_hashtable_insert(&lock_map, hash_function_ptr(s), (void*)l);
@@ -964,6 +965,7 @@ void POMP2_Set_nest_lock(omp_nest_lock_t* s) {
 
   struct ezt_omp_lock_info* l = ezt_hashtable_get(&lock_map, hash_function_ptr(s));
   eztrace_assert(l);
+
   l->nested_lock_count ++;
   if(l->nested_lock_count==1) {
     l->acquisition_order++;