From 63cfe0d5ac5deef790635cdcf893c082dd26ec6a Mon Sep 17 00:00:00 2001 From: falsycat Date: Thu, 9 Mar 2023 03:24:56 +0900 Subject: [PATCH] add new articles --- content/note/info-tech/library-c-cpp.md | 16 +++++++++++++ content/note/info-tech/tinycthread.md | 32 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 content/note/info-tech/library-c-cpp.md create mode 100644 content/note/info-tech/tinycthread.md diff --git a/content/note/info-tech/library-c-cpp.md b/content/note/info-tech/library-c-cpp.md new file mode 100644 index 0000000..9d53dbe --- /dev/null +++ b/content/note/info-tech/library-c-cpp.md @@ -0,0 +1,16 @@ +--- +title: C/C++のライブラリまとめ +tags: [note, info-tech, c-language, cpp, development] +--- + +## 概要 +- C/C++のいい感じのライブラリのまとめ +- 基本的にlightweightかつmulti-platformなものしか載せない +- リンクがない項目は今後執筆予定 + +## Script +- [LuaJIT](note/info-tech/luajit) (C) +- [ExprTk](note/info-tech/exprtk) (C++) + +## OS Wrapper +- [tinycthread](note/info-tech/tinycthread) (C11) \ No newline at end of file diff --git a/content/note/info-tech/tinycthread.md b/content/note/info-tech/tinycthread.md new file mode 100644 index 0000000..fbbe2d2 --- /dev/null +++ b/content/note/info-tech/tinycthread.md @@ -0,0 +1,32 @@ +--- +title: tinycthread +tags: [note, info-tech, 'c-language', development] +--- + +[tinycthread](https://tinycthread.github.io) / [API doc](https://tinycthread.github.io/doc/tinycthread_8h.html) + +## 概要 +- スレッド関係の機能を提供するlightweightなライブラリ + - `mtx`: mutex + - `cnd`: condition variable + - `thrd`: thread + - `tss`: thread-specific storage +- C11 +- zlib license +- マルチプラットフォーム +- CMake利用可能 + +## 導入方法 +### CMake: FetchContent +```cmake +# ---- tinycthread ---- +# repository: https://github.com/tinycthread/tinycthread +# license : zlib + +FetchContent_Declare( + tinycthread + GIT_REPOSITORY "https://github.com/tinycthread/tinycthread.git" + GIT_TAG "6957fc8383d6c7db25b60b8c849b29caab1caaee" +) +FetchContent_MakeAvailable(tinycthread) +``` \ No newline at end of file