summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/switcher.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-09-21 22:23:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-09-21 22:23:47 (GMT)
commit76fb13178cf6be94b8e01675b37f7cb1b92f7709 (patch)
treea6e6bbc6dde169add608097ceb5658fcb904bd08 /src/analysis/db/items/switcher.c
parentdfe76faf21e254c02c86a1b0b1f8ca8fc07fe027 (diff)
Defined lock mechanism for buffer caches.
Diffstat (limited to 'src/analysis/db/items/switcher.c')
-rw-r--r--src/analysis/db/items/switcher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analysis/db/items/switcher.c b/src/analysis/db/items/switcher.c
index 3ae9358..090b8ce 100644
--- a/src/analysis/db/items/switcher.c
+++ b/src/analysis/db/items/switcher.c
@@ -611,7 +611,7 @@ static bool g_db_switcher_run(GDbSwitcher *switcher, GLoadedBinary *binary, ImmO
cursor = g_binary_cursor_new();
g_binary_cursor_update(G_BINARY_CURSOR(cursor), &switcher->addr);
- g_buffer_cache_lock(cache);
+ g_buffer_cache_wlock(cache);
index = g_buffer_cache_find_index_by_cursor(cache, cursor, true);
@@ -630,7 +630,7 @@ static bool g_db_switcher_run(GDbSwitcher *switcher, GLoadedBinary *binary, ImmO
exit_gui:
- g_buffer_cache_unlock(cache);
+ g_buffer_cache_wunlock(cache);
g_object_unref(G_OBJECT(cache));