Commit Graph
55 Commits
Author SHA1 Message Date
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 06a1590645 Add missing assertion. 2020-06-21 23:51:49 +02:00
Patrick Pelissier 652653af0b Fix some warnings by casting
for compilers which cannot detect the affectations as ok.
2020-06-21 23:50:49 +02:00
Patrick Pelissier 78d0bfb286 Port new error oplist format to all containers. 2020-05-30 18:00:43 +02:00
Patrick Pelissier d884d257bb Export TYPE operator in oplist 2020-05-17 10:53:17 +02:00
Patrick Pelissier d1ae26f0fd * Add control than the type and the oplist are compatible 2020-05-17 10:27:30 +02:00
Patrick Pelissier 49a2e600c4 Add control of sub-oplist when creating a new oplist of a container
Add test case of this new control
Fix some corner bugs in some containers evolving their own oplists.
2020-05-15 21:19:39 +02:00
Patrick Pelissier 45d2a529b5 Add more validation of oplists before expanding data 2020-05-10 11:16:46 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier 60a10eb799 Uniformize the macro names 2019-06-09 12:02:38 +02:00
Patrick Pelissier 475836e851 Use of new macro M_CACHELINE_ALIGN 2019-01-15 19:11:10 +01:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00
Patrick Pelissier e0c456490a Fix definition of oplist for containers:
if no argument is given, it shall behave as if it was defined with
a standard C type.
2018-09-15 17:59:50 +02:00
Patrick Pelissier 2e3b312fab Fix issue of recursive usage of M_GLOBAL_OPLIST_OR_DEF
Update the way to use the macro to avoid being limited by the
preprocessor limitation.
2018-09-14 20:57:55 +02:00
Patrick Pelissier 6325f01122 Port to M_CALL M-SHARED 2018-09-10 21:39:38 +02:00
Patrick Pelissier 3b0e940284 Add missing _ptr & _srcptr alias. 2018-08-19 17:58:23 +02: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 143a5fdf4f Fix issue if given type is a T * = TYPE:
token pasting created const T *, which is not the same as
const TYPE = T * const
2018-08-03 20:20:57 +02:00
Patrick Pelissier 68c737dcef Clean up interface if (internal) genint:
it returns at most an 2048, so an unsigned int is more enought
(and internally it was already used!).
So transform the interface to take as input unsigned int.

Fix maximum size supported by the genint package.

Add proper constant used for error, and use it in the code.
2018-08-02 23:19:05 +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 f2b2335080 Fix issue with C++ not supporting passing an int constant value to an unsigned atomic type...
I definitely find this disturbing.
2018-03-16 22:59:51 +01:00
Patrick Pelissier e540a95ad0 Fix spelling 2018-02-24 15:28:07 +01:00
Patrick Pelissier d258fb3eff Fix memory leak 2018-02-23 23:13:10 +01:00
Patrick Pelissier acb1aa8104 Add new restriction 2018-02-20 22:12:03 +01:00
Patrick Pelissier 2dc71cc5fd Fix bug 2018-02-20 22:01:19 +01:00
Patrick Pelissier 4a92419bbe Add tests 2018-02-20 21:55:16 +01:00
Patrick Pelissier 92699501f6 Add more assertions 2018-02-19 23:41:29 +01:00
Patrick Pelissier b49ed97be0 Update comment 2018-02-19 23:38:22 +01:00
Patrick Pelissier aec661edea Add shared ressource container 2018-02-19 23:37:10 +01:00
Patrick Pelissier a9aa1e13ee Add relaxed shared pointer (thread unsafe with non-atomic counter). 2018-02-10 17:31:12 +01:00
Patrick Pelissier f5857c8aab Create an oplist for the counter and use it.
It will allow to use other oplist.
2018-02-10 17:22:51 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 2e564088b0 Simplify the inclusion of headers. 2017-09-16 10:14:45 +02:00
Patrick Pelissier 1930bdeac1 _DEF macros checks if a global oplist is register if there is no one
given in the macro call. If it founds one, it will be it instead
of M_DEFAULT_OPLIST.
2017-09-16 08:31:22 +02:00
Patrick Pelissier d08e2bba95 Add I/O for deque 2017-09-06 21:05:57 +02:00
Patrick Pelissier 5c5fbd9bf0 Remove warnings for some compilers. 2017-08-05 19:26:50 +02:00
Patrick Pelissier e8c952def8 Remove prefix shared_ from all definition of the functions / types of shared pointer.
This make the name shorter, give the user full control over the prefix,
give the user full power over the name,
allow more flexibility over the kind of container (allowing switch quickly),
and uniformize with variant_, tuple_ & algo_.
This is better than the current situation and all containers will switch.

==> Break API compatibility:
To fix this quickly, just add shared_ before the name into the
macro SHARED_PTR_DEF & SHARED_OPLIST.
This will generate the same name than before.
2017-07-25 22:19:08 +02:00
Patrick Pelissier d44c60670e Add function equal_p. 2017-07-16 23:59:55 +02:00
Patrick Pelissier b1c6681c92 Use of M_CONST_CAST 2017-05-26 15:49:09 +02:00
Patrick Pelissier a5dac33524 Add more assertions. 2017-04-13 22:47:39 +02:00
Patrick Pelissier d5bd3674d8 Make it cleaner for static analysis:
add more assertions.
2017-04-13 22:45:27 +02:00
Patrick Pelissier 72c5c3f371 Replace stdatomic.h (C11 standard compliant header) by a custom one
to increase C++ compatibility as stdatomic.h doesn't work in C++!

(I would like to thanks the one(s) who thought it was a good idea
***not*** to include stdatomic.h -and thread.h- in the C++ standard!)
2017-04-13 21:50:16 +02:00
Patrick Pelissier 6e19864d44 Fix wrong strict usage of atomic (missing atomic_init & atomic_load). 2017-04-08 11:09:06 +02:00
Patrick Pelissier ebf24d41cf Export back NEW / DEL / REALLOC of oplist to container oplist 2017-03-30 20:57:44 +02:00
Patrick Pelissier 2ade0805e7 Fix issue with clang 4. 2017-03-18 14:22:19 +01:00
Patrick Pelissier 5ff056656a Clean up shared_ptr interface:
* remove release
* add clean
2017-03-16 22:26:15 +01:00
Patrick Pelissier 50163118f4 Rewrite unique slot detection to be standard compliant. 2017-03-16 00:14:14 +01:00
Patrick Pelissier ba37d183a7 Only one alloc per init_new. 2017-03-15 22:06:50 +01:00
Patrick Pelissier de7d0bd682 Add _init_new operation for shared_ptr 2017-03-15 00:17:41 +01:00
Patrick Pelissier 7118da65ae Add SWAP for m-shared 2017-03-14 21:43:52 +01:00