diff options
| author | Charles Giessen <charles@lunarg.com> | 2023-03-17 16:40:25 -0600 |
|---|---|---|
| committer | Juan Ramos <114601453+juan-lunarg@users.noreply.github.com> | 2023-03-17 17:09:14 -0600 |
| commit | f196c8d3cafcaf7e628b7b76a799c940999ee984 (patch) | |
| tree | 30fefc1ed0d93c042dbb79488cc68b1a240ce9f6 /scripts | |
| parent | a7bc1fe90ff58bebf95470ebcb8670ea22907795 (diff) | |
| download | usermoji-f196c8d3cafcaf7e628b7b76a799c940999ee984.tar.xz | |
mock_icd: Add missing locks
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mock_icd_generator.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index e4892bd6..b6c460b5 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -988,6 +988,7 @@ CUSTOM_C_INTERCEPTS = { pMemoryRequirements->alignment = 1; pMemoryRequirements->memoryTypeBits = 0xFFFF; // Return a better size based on the buffer size from the create info. + unique_lock_t lock(global_lock); auto d_iter = buffer_map.find(device); if (d_iter != buffer_map.end()) { auto iter = d_iter->second.find(buffer); @@ -1003,6 +1004,7 @@ CUSTOM_C_INTERCEPTS = { pMemoryRequirements->size = 0; pMemoryRequirements->alignment = 1; + unique_lock_t lock(global_lock); auto d_iter = image_memory_size_map.find(device); if(d_iter != image_memory_size_map.end()){ auto iter = d_iter->second.find(image); @@ -1732,6 +1734,7 @@ class MockICDOutputGenerator(OutputGenerator): self.appendSection('command', '//Destroy object') if 'FreeMemory' in api_function_name: # Remove from allocation map + self.appendSection('command', ' unique_lock_t lock(global_lock);') self.appendSection('command', ' allocated_memory_size_map.erase(memory);') else: self.appendSection('command', '//Not a CREATE or DESTROY function') |
