Commit Graph
48 Commits
Author SHA1 Message Date
Patrick Pelissier 6d621703eb Copyright go to 2025 year 2025-03-01 11:03:38 +01:00
Patrick Pelissier 52b58c5a51 Happy new year 2024 2024-01-19 21:37:47 +01:00
Patrick Pelissier 085d7157c0 Add compatibility layer with old header m-mutex
as a transition for current programs.
2023-02-16 00:10:55 +01:00
Patrick Pelissier 91f3174a36 Rename m-mutex header into m-thread
as it is not just about mutex but about thread functions
just like the header pthread or thread.h
2023-02-16 00:09:06 +01:00
Patrick Pelissier 8846707c8b Fix issue on FreeBSD when building in C11 mode:
thrd_sucess is not equal to 0 on this system,
so replace 0 by thrd_success
2023-02-11 00:08:51 +01:00
Patrick Pelissier a2ae209992 Happy new year 2023-01-02 12:57:41 +01:00
Patrick Pelissier 9fda06276c Move m_once_t to the public interface 2022-03-19 16:44:40 +01:00
Patrick Pelissier 19b01b404d Migrate to 2022 2022-03-12 20:25:45 +01:00
Patrick Pelissier 25fe26deaa Happy new year 2021-01-13 20:18:01 +01:00
Patrick Pelissier a29682ca29 Create M_ASSERT macro to encapsulate assert within M*LIB
The goal is to enable the user to override this macro if needed so that it can enable or disable the M*LIB witout impacting its own assertions.
2020-10-29 22:46:17 +01:00
Patrick Pelissier 54d4b80368 Reformat macro to 80 characters 2020-10-21 23:23:40 +02:00
Patrick Pelissier b3a1a75f6f Rename internal types:
a suffix ending with _ct means confidential type
ans is reserved for M*LIB internal usage.

OPLIST doesn't use the external types
but rather the internal types.
It enables to be independent of the real names
of the external types.
Such external names are planned to be fully customizable
(i.e. the user may define a name that suits its coding style)
2020-10-03 14:07:14 +02:00
Patrick Pelissier ac9e9a83b9 Fix issue with warnings on MacOS 2020-07-11 20:38:51 +02:00
Patrick Pelissier a6951fe5e3 Fix warnings for clang-cl 2020-07-03 21:59:25 +02:00
Patrick Pelissier 6743cb9456 Add posibility for user to select Thread backend directly 2020-07-02 00:09:54 +02:00
Patrick Pelissier f2a06ede62 Add mechanism to disable temporary compiler warnings in a sequence of code. 2020-07-01 11:47:55 +02:00
Patrick Pelissier 47296e5c11 The user can define M_USE_C11_NO_THREADS to disable C11 header (Support for broken C11 implementation) 2020-06-29 21:53:09 +02:00
Patrick Pelissier 7e0bd8414d Fix warnings for mingw 2020-06-22 00:33:10 +02:00
Patrick Pelissier 279b46b4e2 Fix -Wsign-conversion warnings. 2020-06-13 19:43:38 +02:00
Patrick Pelissier 8be06cadb3 Add comments on description. 2020-05-20 23:21:27 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier a39cf23697 Remove a warning (WINDOWS) 2019-12-06 21:10:00 +01:00
Patrick Pelissier baddcc3855 Avoid warning about variable being unused (C11) 2019-11-23 23:28:36 +01:00
Patrick Pelissier ccccedc2d5 Rework failure messages. 2019-04-22 18:30:46 +02:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00
Patrick Pelissier 1fb1fa2e0a Add M_THREAD_ATTR 2018-11-26 23:26:08 +01:00
Patrick Pelissier 8cf780a60f Update comment 2018-11-25 22:43:37 +01:00
Patrick Pelissier 609175713b Fix C11 backend. 2018-10-26 19:40:51 +02:00
Patrick Pelissier 04dd708941 Delayed the inclusion of the common headers, so that the backend may properly
set up additional parameters for the headers.
2018-07-29 19:40:37 +02:00
Patrick Pelissier 540e01f1fe Fix prototype of the callback to InitOnceExecuteOnce: Missing CALLBACK.
(Some version of the compilers for windows produced warnings)
2018-07-18 21:21:35 +02:00
Patrick Pelissier 96202aa78f Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers) 2018-07-14 14:35:14 +02:00
Patrick Pelissier 8fc8decd09 Add m_thread_yield & m_thread_sleep.
Rewrite the windows package (it wasn't fully working before) and use functions
available since WINDOWS VISTA (increasing minimum supported version).
2018-04-27 20:12:44 +02:00
Patrick Pelissier c8d668ad96 Merge branch 'master' of https://github.com/P-p-H-d/mlib 2018-04-25 22:04:42 +02:00
Patrick Pelissier a39c4ba9a4 Rewrite the code by adding an additional cast to avoid new warning with GCC8. 2018-04-25 22:03:52 +02:00
Patrick Pelissier 1c18133603 Close the handle of the thread in case of joining thread. 2018-04-22 19:30:24 +02:00
Patrick Pelissier e152ff0377 Add TODO 2018-03-09 21:07:07 +01:00
Patrick Pelissier df51c6dc64 Add m_cond_broad_cast 2018-03-09 19:15:31 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier beb4c0f7b8 Rename param 2017-10-31 16:46:40 +01:00
Patrick Pelissier 2e564088b0 Simplify the inclusion of headers. 2017-09-16 10:14:45 +02:00
Patrick Pelissier 749cd43306 Remove warning in release mode. 2017-07-18 19:26:27 +02:00
Patrick Pelissier fd8021a943 Remove outdated comment. 2017-03-27 14:23:26 +02:00
Patrick Pelissier 56453a518d Fix issue with windows
(Use make check CC="i686-w64-mingw32-gcc -std=c99" VALGRIND=wine)
2017-03-17 22:08:02 +01:00
Patrick Pelissier 0d21ac12bf Port mutex to use static inline instead of MACRO:
* cleaner
* fix bug in existing code detected by the changes.

*** Break API (you need to go to lower case instead of upper case) ***
2017-03-17 22:02:17 +01:00
Patrick Pelissier 2c759641a2 Add macro M_LOCK allowing intuitive encapsulation for lock. 2017-03-12 18:48:56 +01:00
Patrick Pelissier 5bae6d0870 Update documentation for mutex. 2017-02-21 20:33:01 +01:00
Patrick Pelissier 4d019ca1f2 Update library name in headers. 2017-02-20 21:29:21 +01:00
Patrick Pelissier 8e9d20ba1a Add initial stuff 2017-02-18 18:51:04 +01:00