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.
This commit is contained in:
Patrick Pelissier committed 2017-07-25 22:19:08 +02:00
1 parent 19ed56f37f
commit e8c952def8
3 files changed
+65 -64

No files matched your search

+2 -2
View File
@@ -81,7 +81,7 @@ static void perform_computation4(bigdata_t p)
/**************************************************************/
/* Let's define a shared pointer interface around the bigdata structure */
SHARED_PTR_DEF(bigdata, bigdata_t, (INIT(bigdata_init), CLEAR(bigdata_clear)))
SHARED_PTR_DEF(shared_bigdata, bigdata_t, (INIT(bigdata_init), CLEAR(bigdata_clear)))
/* Let's define the communication queue between the thread:
* - size of queue is 10,
@@ -90,7 +90,7 @@ SHARED_PTR_DEF(bigdata, bigdata_t, (INIT(bigdata_init), CLEAR(bigdata_clear)))
*/
#define MY_QUEUE_SIZE 10
BUFFER_DEF(bigdata, shared_bigdata_t, MY_QUEUE_SIZE,
BUFFER_QUEUE|BUFFER_PUSH_INIT_POP_MOVE, SHARED_PTR_OPLIST(bigdata))
BUFFER_QUEUE|BUFFER_PUSH_INIT_POP_MOVE, SHARED_PTR_OPLIST(shared_bigdata))
/* Let's build a Thread synchros tree:
*