From af671c44903b1fb7368976abace32823d982136c Mon Sep 17 00:00:00 2001 From: RexKnight <10152130255@stu.ecnu.edu.cn> Date: Mon, 4 Dec 2017 21:44:08 +0800 Subject: [PATCH] Comments and clean 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. --- .idea/OSLab-P4.iml | 2 - .idea/misc.xml | 4 - .idea/modules.xml | 8 - .idea/vcs.xml | 6 - .idea/workspace.xml | 507 --------------------- cmake-build-debug/CMakeFiles/clion-log.txt | 1 - error.h | 13 - src/CMakeLists.txt | 9 + src/Makefile | 14 + src/counter.c | 40 +- src/counter.h | 4 +- src/hash.c | 56 +-- src/hash.h | 14 +- src/list.c | 60 +-- src/list.h | 19 +- src/lock.c | 271 ++++++----- src/lock.h | 82 ++-- src/main.c | 11 +- 18 files changed, 290 insertions(+), 831 deletions(-) delete mode 100644 .idea/OSLab-P4.iml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml delete mode 100644 cmake-build-debug/CMakeFiles/clion-log.txt delete mode 100644 error.h create mode 100644 src/CMakeLists.txt create mode 100644 src/Makefile diff --git a/.idea/OSLab-P4.iml b/.idea/OSLab-P4.iml deleted file mode 100644 index f08604b..0000000 --- a/.idea/OSLab-P4.iml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 79b3c94..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 9f3dfc8..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 54d0539..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -