abroekhuis commented on a change in pull request #224:
URL: https://github.com/apache/celix/pull/224#discussion_r420561681
##########
File path: libs/framework/src/service_registry.c
##########
@@ -1215,4 +1215,9 @@ static void
celix_waitForPendingRegisteredEvents(celix_service_registry_t *regis
count = (long)hashMap_get(registry->pendingRegisterEvents.map,
(void*)svcId);
}
celixThreadMutex_unlock(®istry->pendingRegisterEvents.mutex);
+}
+
+long celix_serviceRegistry_nextSvcId(celix_service_registry_t* registry) {
+ long scvId = __atomic_fetch_add(®istry->nextServiceId, 1,
__ATOMIC_SEQ_CST);
Review comment:
If I am right, this return 0. "These built-in functions perform the
operation suggested by the name, and return the value that had previously been
in *ptr".
So now instead of starting at 1, we start at 0? I don't think this
introduces some error, just curious.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]