Commit Graph
48 Commits
Author SHA1 Message Date
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
Patrick Pelissier 82dbf60a4c Use of the standard naming for User Defined macro that can customize the code generation. Rename macros WORKER_DISABLE. 2018-12-23 23:49:19 +01:00
Patrick Pelissier 48a970ceb9 Avoid using '__' within words.
It seems to be a reserved naming of C++.
2018-08-19 11:31:09 +02:00
Patrick Pelissier 7b5ae3c15b Update API so that the worker_t parameter is given on creating the sync bloc.
(API breakage), more RAII like.
2018-07-28 19:09:07 +02:00
Patrick Pelissier 7678625071 Review:
* add comments
* change error code from assertion to proper memory failure
* add new assertions
2018-07-28 13:48:30 +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 3f5406f1d4 API breakage:
worker_sync takes an extra parameter (worker_t) to perform a
wait-on-event instead of a busy waiting, reducing consummer ressources.

worker_init takes an int instead of an unsigned int for the number of workers.
It allows additional extra value -1 to initialize the number of workers to
twice the number of CPU, allowing to overload the CPU with loads and keep
them fully working in some scenario.
2018-04-16 23:57:28 +02:00
Patrick Pelissier 6cccbfc73a Add worker_sync_p function. 2018-03-26 22:13:50 +02:00
Patrick Pelissier 1f08bcf0f8 Add clear callback for workers. 2018-01-29 22:08:21 +01:00
Patrick Pelissier a3e2e75021 Use new macro. 2018-01-29 21:59:57 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 6549bea3e0 Fix issue for BSD 2018-01-12 20:11:11 +01:00
Patrick Pelissier 83eeb5d6d0 Make the code more robust 2018-01-12 18:48:38 +01:00
Patrick Pelissier 1c9a232a9d Add 'worker_flush' function.
Factorization of the exec function.
2018-01-07 22:15:58 +01:00
Patrick Pelissier f2344c69ca Rename worker_block_t into worker_sync_t
as it is a synchronization point for workers
not an anonymous block.
2017-12-28 00:03:47 +01:00
Patrick Pelissier adc7545a42 Rename internal macros to use _USE_ as it can be modified
by the user.
2017-12-28 00:01:07 +01:00
Patrick Pelissier 66eff4eb44 Update comments 2017-12-27 23:59:29 +01:00
Patrick Pelissier b4cf464e98 Fix data race. 2017-12-25 01:20:58 +01:00
Patrick Pelissier 8aa3c86ce9 Add support of C++ for workers. 2017-12-16 20:54:17 +01:00
Patrick Pelissier 9020baf364 Add option to disable worker. 2017-12-16 18:48:18 +01:00
Patrick Pelissier 1efd7e84a7 Remove some warnings about uninitilized fields with CLANG. 2017-12-16 18:24:17 +01:00
Patrick Pelissier e2e902552e Fix warning with GCC. 2017-12-16 17:53:39 +01:00
Patrick Pelissier 20e304b423 worker are no longer using a global variable.
The global variable is user defined now.
2017-12-03 17:40:59 +01:00
Patrick Pelissier d222c7cbab Add WORKER into M*LIB. 2017-12-03 17:31:21 +01:00