lockfree

lockfree.git
git clone git://git.lenczewski.org/lockfree.git
Log | Files | Refs | README | LICENSE

commit 44e93ef894e6ab476848dcdb8b6dac6569c1b020
Author: Mikołaj Lenczewski <mblenczewski@gmail.com>
Date:   Wed, 13 Aug 2025 23:48:04 +0100

Initial commit

Diffstat:
A.editorconfig | 10++++++++++
A.gitignore | 3+++
ALICENSE | 18++++++++++++++++++
AREADME | 3+++
Abuild.sh | 17+++++++++++++++++
Ac/lockfree.c | 5+++++
Aclean.sh | 5+++++
Acpp/lockfree.cpp | 5+++++
8 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/.editorconfig b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +[*.{c,cpp,h,hpp}] +indent_style = tab +indent_size = 8 diff --git a/.gitignore b/.gitignore @@ -0,0 +1,3 @@ +bin/ + +**/.*.swp diff --git a/LICENSE b/LICENSE @@ -0,0 +1,18 @@ +The MIT-Zero License + +Copyright (c) 2025 Mikołaj Lenczewski <mikolaj@lenczewski.org> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README b/README @@ -0,0 +1,3 @@ +lockfree +============================================================================== +A small collection of lockfree algorithms and data structures. diff --git a/build.sh b/build.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +CC="${CC:-clang}" +CXX="${CXX:-clang++}" + +WARNINGS="-Wall -Wextra ${WERROR:+-Werror} -Wno-unused-parameter" +CFLAGS="-std=c11 -g3" +CXXFLAGS="-std=c++20 -g3" + +OPTFLAGS="-O${OPT:-0}" + +set -ex + +mkdir -p bin + +$CC -o bin/lockfree c/lockfree.c $WARNINGS $CFLAGS $OPTFLAGS +$CXX -o bin/lockfree-cpp cpp/lockfree.cpp $WARNINGS $CXXFLAGS $OPTFLAGS diff --git a/c/lockfree.c b/c/lockfree.c @@ -0,0 +1,5 @@ +int +main(int argc, char **argv) +{ + return 0; +} diff --git a/clean.sh b/clean.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +rm -rf bin diff --git a/cpp/lockfree.cpp b/cpp/lockfree.cpp @@ -0,0 +1,5 @@ +int +main(int argc, char **argv) +{ + return 0; +}