From 9d995b418fcc2051d95d832c012ca0a0754d57b7 Mon Sep 17 00:00:00 2001 From: Arihant Lunawat Date: Thu, 14 Aug 2025 17:59:18 +0530 Subject: [PATCH] Added license headers Signed-off-by: Arihant Lunawat --- include/sync_prim/upgrade_mutex.hpp | 25 +++++++++++++++++++++++-- src/bank_account_example.cpp | 23 +++++++++++++++++++++++ src/benchmark_upgrade_mutex.cpp | 23 +++++++++++++++++++++++ tests/test_upgrade_mutex.cpp | 26 +++++++++++++++++++++++--- 4 files changed, 92 insertions(+), 5 deletions(-) diff --git a/include/sync_prim/upgrade_mutex.hpp b/include/sync_prim/upgrade_mutex.hpp index 51d3766..f83773b 100644 --- a/include/sync_prim/upgrade_mutex.hpp +++ b/include/sync_prim/upgrade_mutex.hpp @@ -1,10 +1,31 @@ +/* + * MIT License + * Copyright (c) 2024 Arihant Lunawat + * + * 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, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * 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. + */ + #pragma once #include #include #include -#include -#include namespace sync_prim { diff --git a/src/bank_account_example.cpp b/src/bank_account_example.cpp index ba1e90d..c59814a 100644 --- a/src/bank_account_example.cpp +++ b/src/bank_account_example.cpp @@ -1,3 +1,26 @@ +/* + * MIT License + * Copyright (c) 2024 Arihant Lunawat + * + * 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, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * 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. + */ + #include "sync_prim/upgrade_mutex.hpp" #include #include diff --git a/src/benchmark_upgrade_mutex.cpp b/src/benchmark_upgrade_mutex.cpp index ffdc7d3..2b6a760 100644 --- a/src/benchmark_upgrade_mutex.cpp +++ b/src/benchmark_upgrade_mutex.cpp @@ -1,3 +1,26 @@ +/* + * MIT License + * Copyright (c) 2024 Arihant Lunawat + * + * 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, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * 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. + */ + #include "sync_prim/upgrade_mutex.hpp" #include #include diff --git a/tests/test_upgrade_mutex.cpp b/tests/test_upgrade_mutex.cpp index 25fdefd..cdf32d3 100644 --- a/tests/test_upgrade_mutex.cpp +++ b/tests/test_upgrade_mutex.cpp @@ -1,10 +1,30 @@ +/* + * MIT License + * Copyright (c) 2024 Arihant Lunawat + * + * 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, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * 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. + */ + #include "sync_prim/upgrade_mutex.hpp" #include #include -#include #include -#include -#include // --- Test Runner Helper --- void run_test(void (*test_func)(), const std::string &test_name)