forked from EmpyreanKnight/OSLab-P4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add comments to almost all places (except futex, xchg and cmpxchg) 2. Delete all error checks for concurrent libraries. These libraries are mainly used to test performance of locks, implement error check will introduce irrelavent factors. 2. Clean unused codes and CLion files 3. Create Makefile (without -Wall and -Werror) TODO: eliminate all warnings.
- Loading branch information
1 parent
43866cf
commit af671c4
Showing
18 changed files
with
290 additions
and
831 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(P4) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
find_package (Threads) | ||
set(SOURCE_FILES main.c lock.h counter.h list.h hash.h lock.c counter.c list.c hash.c) | ||
add_executable(P4 ${SOURCE_FILES}) | ||
target_link_libraries (P4 ${CMAKE_THREAD_LIBS_INIT}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
make: libcounter.so liblist.so libhash.so | ||
|
||
P4: | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. | ||
cc -lcounter -llist -lhash -L. -o P4 main.c libcounter.so liblist.so libhash.so -lpthread | ||
|
||
libcounter.so: | ||
cc -shared -fPIC counter.c lock.h lock.c -o libcounter.so | ||
|
||
liblist.so: | ||
cc -shared -fPIC list.c lock.h lock.c -o liblist.so | ||
|
||
libhash.so: | ||
cc -shared -fPIC hash.c list.h list.c lock.h lock.c -o libhash.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.