pnoltes commented on code in PR #729:
URL: https://github.com/apache/celix/pull/729#discussion_r1501900450


##########
libs/framework/src/bundle_context_private.h:
##########
@@ -46,47 +48,50 @@ typedef struct celix_bundle_context_bundle_tracker_entry {
 } celix_bundle_context_bundle_tracker_entry_t;
 
 typedef struct celix_bundle_context_service_tracker_entry {
-       celix_bundle_context_t *ctx;
-       long trackerId;
+    celix_bundle_context_t* ctx;
+    long trackerId;
     celix_service_tracking_options_t opts;
-       celix_service_tracker_t* tracker;
-    void *trackerCreatedCallbackData;
-    void (*trackerCreatedCallback)(void *trackerCreatedCallbackData);
+    celix_service_tracker_t* tracker;
+    void* trackerCreatedCallbackData;
+    void (*trackerCreatedCallback)(void* trackerCreatedCallbackData);
     bool isFreeFilterNeeded;
 
-    //used for sync
+    // used for sync
     long createEventId;
-    bool cancelled; //if tracker is stopped before created async
+    bool cancelled; // if tracker is stopped before created async
 } celix_bundle_context_service_tracker_entry_t;
 
 typedef struct celix_bundle_context_service_tracker_tracker_entry {
-       celix_bundle_context_t* ctx;
-       long trackerId;
+    celix_bundle_context_t* ctx;
+    long trackerId;
 
-       struct listener_hook_service hook;
-       long serviceId;
+    struct listener_hook_service hook;
+    long serviceId;
 
-       char *serviceName;
-       void *callbackHandle;
-       void (*add)(void *handle, const celix_service_tracker_info_t *info);
-       void (*remove)(void *handle, const celix_service_tracker_info_t *info);
+    char* serviceName;
+    void* callbackHandle;
+    void (*add)(void* handle, const celix_service_tracker_info_t* info);
+    void (*remove)(void* handle, const celix_service_tracker_info_t* info);
 
-    //used for sync
+    // used for sync
     long createEventId;
 } celix_bundle_context_service_tracker_tracker_entry_t;
 
 struct celix_bundle_context {
-       celix_framework_t *framework;
-       celix_bundle_t *bundle;
-
-       celix_thread_mutex_t mutex; //protects fields below (NOTE/FIXME also 
used by bundle.c for listing service tracker usage)
-        celix_array_list_t *svcRegistrations; //serviceIds
-       celix_dependency_manager_t *mng;
-       long nextTrackerId;
-       hash_map_t *bundleTrackers; //key = trackerId, value = 
celix_bundle_context_bundle_tracker_entry_t*
-       hash_map_t *serviceTrackers; //key = trackerId, value = 
celix_bundle_context_service_tracker_entry_t*
-       hash_map_t *metaTrackers; //key = trackerId, value = 
celix_bundle_context_service_tracker_tracker_entry_t*
-    hash_map_t *stoppingTrackerEventIds; //key = trackerId, value = eventId 
for stopping the tracker. Note id are only present if the stop tracking is 
queued.
+    celix_framework_t* framework;
+    celix_bundle_t* bundle;
+
+    celix_thread_mutex_t
+        mutex; // protects fields below (NOTE/FIXME also used by bundle.c for 
listing service tracker usage)

Review Comment:
   refactored mutex to rwlock. 



-- 
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: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to