PengZheng opened a new issue #390: URL: https://github.com/apache/celix/issues/390
The following is flawed as explained in this [LWN article](https://lwn.net/Articles/575460/): ```C int free = 0; mutex_lock(&s->lock); if (--s->refcount == 0) free = 1 mutex_unlock(&s->lock); if (free) kfree(s); ``` Unfortunately, such flawed implementation is used in `serviceRegistration` and `serviceReference`. I suggest a fix using C11 <stdatomic.h>. What do you think? If OK, I will make a PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
