summaryrefslogtreecommitdiff
path: root/fsgen/filesystem_creator.go
diff options
context:
space:
mode:
Diffstat (limited to 'fsgen/filesystem_creator.go')
-rw-r--r--fsgen/filesystem_creator.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index e97fce6b5..f10b2ba11 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -45,6 +45,7 @@ func RegisterCollectFileSystemDepsMutators(ctx android.RegisterMutatorsContext)
ctx.BottomUp("fs_collect_deps", collectDepsMutator).MutatesGlobalState()
}
+var fsDepsMutex = sync.Mutex{}
var collectFsDepsOnceKey = android.NewOnceKey("CollectFsDeps")
var depCandidatesOnceKey = android.NewOnceKey("DepCandidates")
@@ -80,12 +81,11 @@ func collectDepsMutator(mctx android.BottomUpMutatorContext) {
}).(*[]string)
m := mctx.Module()
- mutex := &sync.Mutex{}
if slices.Contains(*depCandidates, m.Name()) {
if installInSystem(mctx, m) {
- mutex.Lock()
+ fsDepsMutex.Lock()
*fsDeps = append(*fsDeps, m.Name())
- mutex.Unlock()
+ fsDepsMutex.Unlock()
}
}
}