From 5d1ebdf5bbf1b0a5c96a1896b791202254ad090d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 29 Mar 2025 00:25:49 +0100 Subject: [PATCH] Update obsolete header files: * remove obsolete m-mutex header file * mark m-concurrent, m-shared and m-i-shared as obsolete (They won't support new memory model) --- m-concurrent.h | 4 ++++ m-i-shared.h | 4 ++++ m-mutex.h | 28 ---------------------------- m-shared.h | 4 ++++ 4 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 m-mutex.h diff --git a/m-concurrent.h b/m-concurrent.h index af0b2704..53e7ade2 100644 --- a/m-concurrent.h +++ b/m-concurrent.h @@ -29,6 +29,10 @@ #include "m-thread.h" #include "m-atomic.h" +#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L +#warning The header m-concurrent.h is obsolete. Use m-shared-ptr header instead. +#endif + /* Define a protected concurrent container and its associated functions based on the given container. USAGE: CONCURRENT_DEF(name, type [, oplist_of_the_type]) */ diff --git a/m-i-shared.h b/m-i-shared.h index 1dfe6ae4..b9324b14 100644 --- a/m-i-shared.h +++ b/m-i-shared.h @@ -28,6 +28,10 @@ #include "m-core.h" #include "m-atomic.h" +#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L +#warning The header m-i-shared.h is obsolete. Use m-shared-ptr header instead. +#endif + M_BEGIN_PROTECTED_CODE /* Define the oplist of a intrusive shared pointer. diff --git a/m-mutex.h b/m-mutex.h deleted file mode 100644 index 9a81ca42..00000000 --- a/m-mutex.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * M*LIB - Thin Mutex & Thread wrapper (compatibility layer) - * - * Copyright (c) 2017-2025, Patrick Pelissier - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * + Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * + Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#if defined(__GNUC__) && __GNUC__ >= 4 -#warning "m-mutex.h is an obsolete header. Use m-thread.h instead." -#endif -#include "m-thread.h" diff --git a/m-shared.h b/m-shared.h index 3509533a..f79d5562 100644 --- a/m-shared.h +++ b/m-shared.h @@ -29,6 +29,10 @@ #include "m-atomic.h" #include "m-genint.h" +#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L +#warning The header m-shared.h is obsolete. Use m-shared-ptr header instead. +#endif + M_BEGIN_PROTECTED_CODE /* Define shared pointer and its function.