void v_collectionDeinit( v_collection c) { assert(C_TYPECHECK(c,v_collection)); v_observerDeinit(v_observer(c)); c_free(c->queries); c->queries = NULL; }
void v_participantDeinit( v_participant p) { v_kernel kernel; assert(C_TYPECHECK(p,v_participant)); kernel = v_objectKernel(p); v_leaseManagerDeregister(kernel->livelinessLM, p->lease); c_free(p->lease); p->lease = NULL; v_leaseManagerFree(p->leaseManager); p->leaseManager = NULL; v_observerDeinit(v_observer(p)); }
void v_waitsetDeinit( v_waitset _this) { v_waitsetEvent event; v_observable o; v_proxy found; v_handleResult result; void* userDataRemoved = NULL; assert(_this != NULL); assert(C_TYPECHECK(_this,v_waitset)); if (_this == NULL) { return; } v_waitsetLock(_this); found = c_take(_this->observables); while (found) { result = v_handleClaim(found->source,(v_object *)&o); if (result == V_HANDLE_OK) { v_observableRemoveObserver(o,v_observer(_this), &userDataRemoved); v_waitsetClearRemovedObserverPendingEvents(_this, userDataRemoved); result = v_handleRelease(found->source); } c_free(found); found = c_take(_this->observables); } /* wakeup blocking threads to evaluate new condition. */ /* remove all events */ while (v_waitsetEvent(v_waitsetEventList(_this)) != NULL) { event = v_waitsetEvent(v_waitsetEventList(_this)); v_waitsetEventList(_this) = event->next; event->next = NULL; c_free(event); } v_waitsetWakeup(_this, NULL, NULL); v_waitsetUnlock(_this); v_observerDeinit(v_observer(_this)); }
void v_subscriberDeinit( v_subscriber s) { v_observerDeinit(v_observer(s)); }