From 56516fa7c85dec0dfb468b009244da00f377a3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Tue, 26 Sep 2023 12:41:12 +0200 Subject: [PATCH] implement mutex --- .gitignore | 1 + src/simplified/xf/port/idf-qt/mutex.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfaa045 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +test-bench/test1/build-test1-idf-Desktop_Qt_6_3_0_MinGW_64_bit-Debug diff --git a/src/simplified/xf/port/idf-qt/mutex.cpp b/src/simplified/xf/port/idf-qt/mutex.cpp index 5697f96..602da6e 100644 --- a/src/simplified/xf/port/idf-qt/mutex.cpp +++ b/src/simplified/xf/port/idf-qt/mutex.cpp @@ -16,3 +16,17 @@ interface::XFMutex * interface::XFMutex::create() // TODO: Implement code for XFMutex class #endif // USE_XF_IDF_QT_MUTEX_CLASS + + + +void XFMutex::lock() { + mutex_.lock(); +} + +void XFMutex::unlock() { + mutex_.unlock(); +} + +bool XFMutex::tryLock(int32_t timeout) { + mutex_.tryLock(timeout); +}