Commit Graph
73 Commits
Author SHA1 Message Date
Patrick Pelissier 3721129da1 Update prototype of memory functions
to always get the memory context parameter
(even if it is not needed) to provide a cleaner
and simpler user interface
(instead of requesting the user to use directly m_context).
2025-05-07 21:02:24 +02:00
Patrick Pelissier 0de3c622e3 Port algo to new memory format 2025-05-07 21:02:24 +02:00
Patrick Pelissier 93a1be616d Rename parameter pool to context 2025-05-07 21:02:24 +02:00
Patrick Pelissier 01f5228a36 Port to new memory model:
Communication thread buffer needs to use the global pool,
and not a local pool, since the allocation is done accross
several threads.
Therefore the non thread fixed queue & stack interfaces are moved into
a dedicated header (m-queue)
and remove support for non thread stack & queue into m-buffer
Remove also deprecated policy too.
2025-05-07 21:02:24 +02:00
Patrick Pelissier 10d918bbc9 Port to new memory model (add global context 0) 2025-05-07 21:02:24 +02:00
Patrick Pelissier 1cf7c4fa4d Port to new memory model: M_MEMORY_FULL cannot return anymore 2025-05-07 21:02:23 +02:00
Patrick Pelissier 6de8eab5c3 Add comments, rename macro for maintenance 2025-05-07 21:02:23 +02:00
Patrick Pelissier 1e196fe22a Port to new spec M_MEMORY_FULL 2025-05-07 21:02:23 +02:00
Patrick Pelissier 1f2584ccea Port to new memory model 2025-05-07 21:02:23 +02:00
Patrick Pelissier 36d11bc2bd Fix small name usage 2025-03-01 12:19:35 +01:00
Patrick Pelissier 6d621703eb Copyright go to 2025 year 2025-03-01 11:03:38 +01:00
Patrick Pelissier b60553165d Fix usage of M_USE_SMALL_NAME (Reported by Brian Sipos) 2025-02-03 22:33:07 +01:00
Patrick Pelissier 26cec1591a * Remove some obsolete macros
* Fix spelling
* A little bit of refactoring
2024-01-19 21:37:47 +01:00
Patrick Pelissier 52b58c5a51 Happy new year 2024 2024-01-19 21:37:47 +01:00
Patrick Pelissier f7f5db61d3 Fix formatting 2023-11-01 11:13:54 +01:00
Patrick Pelissier 796f2619e5 Change M_BY_NARGS semantics:
simplify suffix by __ # NARGS
instead of __NARGS_ # NARGS

Driver: reduce macro name length.
2023-10-20 00:02:38 +02:00
Patrick Pelissier c9bb739f24 Fix format 2023-07-10 00:59:18 +02:00
Patrick Pelissier e049b83a9e Rename M_SUFFIX_FUNCTION_BY_NARGS in M_BY_NARGS
and updates suffix with __NARGS_
in order to be more explicit.
2023-07-10 00:58:31 +02:00
Patrick Pelissier b50813713a Define internal M_INLINE:
it is used to control the inline semantics.
By combining it with optimize option "-fno-inline"
for the internal M*LIB function (using _Pragma optimize)
we can control easily if we want to use an inline version
or call of an external function.

Define new user API:
* M_USE_EXTERN_DECL : define it before including any MLIB header to requests to call the M*LIB functions and don't inline then.
* M_USE_EXTERN_DEF  : define it once in a translation unit to define the M*LIB functions. This translation unit shall contain all templated macro too.
If you use one option, you need to use the other one too for another translation unit.
2023-06-11 23:32:02 +02:00
Patrick Pelissier 7534aa0d61 Add internal M_UNLIKELY_NOMEM to help coverage computation 2023-04-03 00:05:29 +02:00
Patrick Pelissier d2ce71a90a Adding M_WORKER_SPAWN_DEF2 for providing specialization
and type-safe variant of m_worker_spawn.
2023-02-18 00:24:20 +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 130c32e7d4 Include only sysinfoapi.h on Windows machine to reduce dependency
Add fallback to _SC_NPROCESSORS_CONF if _SC_NPROCESSORS_ONLN is not supported (Android)
2023-02-07 23:17:03 +01:00
Patrick Pelissier a2ae209992 Happy new year 2023-01-02 12:57:41 +01:00
Patrick Pelissier d17fa4530b Update comments 2022-11-05 13:36:57 +01:00
Patrick Pelissier fc8c7349d6 Reformat 2022-03-23 21:35:22 +01:00
Patrick Pelissier f26da68aa4 Fix regression for C++ / CLANG 2022-03-21 23:27:37 +01:00
Patrick Pelissier 144182b540 Move the worker functions into the m_ namespace and create compatibility layer 2022-03-21 23:15:14 +01:00
Patrick Pelissier 0fec9e7ac4 Fix format 2022-03-19 11:46:28 +01:00
Patrick Pelissier 5be8bb435b Move WORKER_OPLIST to internal namespace 2022-03-19 11:44:58 +01:00
Patrick Pelissier 35b915ab10 Rename internal functions/types to the internal prefix 2022-03-19 10:47:27 +01:00
Patrick Pelissier 19b01b404d Migrate to 2022 2022-03-12 20:25:45 +01:00
Patrick Pelissier 517da1b999 Rename generated internal functions
to avoid "poluting" userspace naming.
2021-02-13 11:45:05 +01:00
Patrick Pelissier 25fe26deaa Happy new year 2021-01-13 20:18:01 +01:00
Patrick Pelissier 36ac6d5104 Fix issue on single core system 2020-11-21 10:53:11 +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 379e0be211 Use of new macro to define internal types not exported. 2020-10-03 14:07:14 +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 efef35c1e1 Reformat 2020-07-25 18:20:17 +02:00
Patrick Pelissier 56d2a74818 Fix some warnings 2020-07-09 23:38:34 +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 7e0bd8414d Fix warnings for mingw 2020-06-22 00:33:10 +02:00
Patrick Pelissier cc6da8941c * Fix wanings for reduce precision on integers.
* Add wrapper for strncat
2020-06-22 00:14:37 +02:00
Patrick Pelissier 279b46b4e2 Fix -Wsign-conversion warnings. 2020-06-13 19:43:38 +02:00
Patrick Pelissier 72fd53ab44 Update comments 2020-05-24 12:01:56 +02:00
Patrick Pelissier 12bc65b6a8 Fix spelling 2020-05-10 11:15:28 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier 0fa0445fa9 Fix C++ warning -Wclass-memaccess with G++ >= 8 2019-05-10 23:13:54 +02:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00