From bd20a021cef387a5b4a97556e8b343b5ea656f7f Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 2 Jul 2020 10:39:15 +0200 Subject: [PATCH] Update documentation --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 38c0e1eb..0a2ae9ef 100644 --- a/README.md +++ b/README.md @@ -3941,12 +3941,6 @@ Return a new shared pointer to the same object than the one pointed by 'shared', incrementing the ownership of the object. This function is thread safe. -##### void name\_init\_set2(name_t *ptr, name_t shared) - -Set '*ptr' to a new shared pointer to 'shared', -incrementing the ownership of the object referenced by 'shared'. -This function is thread safe (providing the ptr address is local to a thread). - ##### name_t name\_init\_new(void) Allocate a new object, initialize it and return an initialized shared pointer to it. @@ -3964,6 +3958,14 @@ and destroying the shared object if no longer any other shared pointers own it. This function is thread safe. +##### void name\_clear\_ptr(name_t *shared) + +Clear the shared pointer '*shared', releasing ownership of the object +and destroying the shared object if no longer +any other shared pointers own it. +This function is thread safe. +Afterwards, '*shared' is set to NULL. + ##### void name\_set(name_t *shared1, name_t shared2) Update the shared pointer '*shared1' to point to the same object than