From a37eed4a4af397add6dc0b1e05247ac038173e0f Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 18 May 2020 01:44:35 +0200 Subject: [PATCH] remove fb_lock/unlock The two functions have been removed from the external header file. Remove them and the now unnecessary field is_locked. --- include/fb.h | 1 - src/fb.c | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/include/fb.h b/include/fb.h index 1bec36a..4c56886 100644 --- a/include/fb.h +++ b/include/fb.h @@ -25,7 +25,6 @@ struct nvnc_fb { int ref; void* addr; - atomic_bool is_locked; enum nvnc_fb_flags flags; size_t size; uint16_t width; diff --git a/src/fb.c b/src/fb.c index 82b42a0..9685ba0 100644 --- a/src/fb.c +++ b/src/fb.c @@ -56,19 +56,6 @@ struct nvnc_fb* nvnc_fb_new(uint16_t width, uint16_t height, return fb; } -EXPORT -bool nvnc_fb_lock(struct nvnc_fb* fb) -{ - bool expected = false; - return atomic_compare_exchange_strong(&fb->is_locked, &expected, true); -} - -EXPORT -void nvnc_fb_unlock(struct nvnc_fb* fb) -{ - fb->is_locked = false; -} - EXPORT enum nvnc_fb_flags nvnc_fb_get_flags(const struct nvnc_fb* fb) {