Skip to content

Commit

Permalink
Added file lock to threading.
Browse files Browse the repository at this point in the history
  • Loading branch information
ax-6 committed Aug 2, 2024
1 parent fd32b65 commit 87fe5b0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aqvm/base/threading/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ include_directories(${PROJECT_SOURCE_DIR})
set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/threading.c)

add_subdirectory(mutex)
add_subdirectory(file_lock)

add_library(AqvmBaseThreading STATIC ${SOURCES})

target_link_libraries(AqvmBaseThreading PRIVATE AqvmBaseThreadingMutex)
target_link_libraries(AqvmBaseThreading PRIVATE AqvmBaseThreadingMutex)
target_link_libraries(AqvmBaseThreading PRIVATE AqvmBaseThreadingFileLock)
11 changes: 11 additions & 0 deletions aqvm/base/threading/file_lock/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 AQ author, All Rights Reserved.
# This program is licensed under the AQ License. You can find the AQ license in
# the root directory.

cmake_minimum_required(VERSION 3.10)

include_directories(${PROJECT_SOURCE_DIR})

set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/file_lock.c)

add_library(AqvmBaseThreadingFileLock STATIC ${SOURCES})
5 changes: 5 additions & 0 deletions aqvm/base/threading/file_lock/file_lock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright 2024 AQ author, All Rights Reserved.
// This program is licensed under the AQ License. You can find the AQ license in
// the root directory.

#include "aqvm/base/threading/file_lock/file_lock.h"
8 changes: 8 additions & 0 deletions aqvm/base/threading/file_lock/file_lock.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2024 AQ author, All Rights Reserved.
// This program is licensed under the AQ License. You can find the AQ license in
// the root directory.

#ifndef AQ_AQVM_BASE_THREADING_FILE_LOCK_FILE_LOCK_H_
#define AQ_AQVM_BASE_THREADING_FILE_LOCK_FILE_LOCK_H_

#endif

0 comments on commit 87fe5b0

Please sign in to comment.