Home
last modified time | relevance | path

Searched refs:refCount (Results 1 – 25 of 196) sorted by relevance

12345678

/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/
H A Dref_object.cpp76 int refCount = refCount_.load(std::memory_order_seq_cst); in ~RefObject() local
77 if (refCount > 0) { in ~RefObject()
78 LOGF("object is destructed with ref-count > 0., refCount = %d", refCount); in ~RefObject()
161 int refCount = obj->refCount_.fetch_add(1, std::memory_order_seq_cst); in IncObjRef() local
162 if ((refCount <= 0) || (refCount >= MAX_REF_COUNT)) { in IncObjRef()
164 LOGF("%s object is refed with ref-count=%d.", tag.c_str(), refCount); in IncObjRef()
173 int refCount = obj->refCount_.fetch_sub(1, std::memory_order_seq_cst); in DecObjRef() local
174 if (refCount <= 0) { in DecObjRef()
176 LOGF("%s object is unrefed with ref-count(%d) <= 0.", tag.c_str(), refCount); in DecObjRef()
178 if (refCount == 1) { in DecObjRef()
/ohos5.0/drivers/hdf_core/framework/model/network/wifi/platform/include/message/
H A Dshared_obj.h15 OsalAtomic refCount; \
36 …if (obj->status <= ME_STATUS_RUNNING && OsalAtomicRead(&obj->refCount) < MAX_OBJ_REF_COUNT) { …
37 OsalAtomicInc(&obj->refCount); \
47 OsalAtomicDec(&obj->refCount); \
48 if (OsalAtomicRead(&obj->refCount) <= 0) { \
61 OsalAtomicSet(&obj->refCount, 1); \
70 OsalAtomicSet(&obj->refCount, 0); \
/ohos5.0/foundation/communication/ipc/ipc/native/test/unittest/common/
H A Dipc_core_unittest.cpp520 int refCount = 0; variable
527 EXPECT_EQ(refCount, 1);
535 EXPECT_GE(refCount, 2);
537 EXPECT_GE(refCount, 1);
545 EXPECT_GE(refCount, 3);
547 EXPECT_GE(refCount, 1);
553 EXPECT_GE(refCount, 2);
555 EXPECT_GE(refCount, 1);
567 int refCount = 0; variable
580 EXPECT_GE(refCount, 2);
[all …]
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/controller/
H A Dnfc_napi_controller_event.cpp74 uint32_t refCount = INVALID_REF_COUNT; in after_work_cb() local
97 napi_reference_unref(asyncData->env, asyncData->callbackRef, &refCount); in after_work_cb()
99 asyncData->env, asyncData->callbackRef, refCount); in after_work_cb()
100 if (refCount == 0) { in after_work_cb()
127 uint32_t refCount = INVALID_REF_COUNT; in EventNotify() local
334 uint32_t refCount = INVALID_REF_COUNT; in DeleteRegisterObj() local
337 iter->m_regEnv, iter->m_regHanderRef, refCount); in DeleteRegisterObj()
338 if (refCount == 0) { in DeleteRegisterObj()
358 uint32_t refCount = INVALID_REF_COUNT; in DeleteAllRegisterObj() local
361 iter->m_regEnv, iter->m_regHanderRef, refCount); in DeleteAllRegisterObj()
[all …]
/ohos5.0/foundation/resourceschedule/work_scheduler/interfaces/kits/js/napi/src/
H A Dinit.cpp72 int32_t refCount = 1; in InitNetworkType() local
99 napi_create_reference(env, result, refCount, &g_networkTypeConstructor); in InitNetworkType()
125 int32_t refCount = 1; in InitChargingType() local
146 napi_create_reference(env, result, refCount, &g_chargingTypeConstructor); in InitChargingType()
171 int32_t refCount = 1; in InitBatteryStatus() local
189 napi_create_reference(env, result, refCount, &g_batteryStatusConstructor); in InitBatteryStatus()
213 int32_t refCount = 1; in InitStorageRequest() local
231 napi_create_reference(env, result, refCount, &g_storageRequestConstructor); in InitStorageRequest()
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/tag/
H A Dnfc_napi_foreground_dispatch.cpp78 napi_handle_scope &scope, uint32_t &refCount) in ReleaseAfterWorkCb() argument
83 asyncData->env, asyncData->callbackRef, refCount); in ReleaseAfterWorkCb()
84 if (refCount == 0) { in ReleaseAfterWorkCb()
96 uint32_t refCount = INVALID_REF_COUNT; in AfterWorkCb() local
100 ReleaseAfterWorkCb(work, asyncData, scope, refCount); in AfterWorkCb()
121 ReleaseAfterWorkCb(work, asyncData, scope, refCount); in AfterWorkCb()
142 uint32_t refCount = INVALID_REF_COUNT; in EventNotify() local
360 uint32_t refCount = INVALID_REF_COUNT; in DeleteRegisterObj() local
363 if (refCount == 0) { in DeleteRegisterObj()
554 uint32_t refCount = INVALID_REF_COUNT; in DeleteRegisteredObj() local
[all …]
/ohos5.0/foundation/filemanagement/dfs_service/test/unittests/cloud_disk/mock/
H A Dfile_operations_helper_mock.cpp131 ptr -> refCount = 1; in FindCloudDiskFile()
146 ptr -> refCount = 0; in FindCloudDiskFile()
205 child->refCount++; in GenerateCloudDiskInode()
238 inoPtr->refCount -= num; in PutCloudDiskInode()
239 if (inoPtr->refCount == 0) { in PutCloudDiskInode()
255 if (filePtr->refCount == 0) { in PutCloudDiskFile()
272 inoPtr->refCount -= num; in PutLocalId()
273 if (inoPtr->refCount == 0) { in PutLocalId()
/ohos5.0/foundation/window/window_manager/utils/src/
H A Dsingleton_container.cpp33 if (it->second.refCount > 0) { in WM_IMPLEMENT_SINGLE_INSTANCE()
40 singletonMap[mid].refCount--; in WM_IMPLEMENT_SINGLE_INSTANCE()
61 singletonMap[nextId].refCount = 0; in AddSingleton()
98 singletonMap[stringMap[name]].refCount++; in DependOn()
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/model/camera/src/
H A Dvirtual_malloc.c19 refcount_t refCount; member
28 if (refcount_dec_and_test(&buf->refCount) != 0) { in VmallocMmapFree()
53 buf->handler.refCount = &buf->refCount; in VmallocMmapAlloc()
57 refcount_set(&buf->refCount, 1); in VmallocMmapAlloc()
161 return refcount_read(&buf->refCount); in VmallocNumUsers()
H A Dcontig_dma.c27 refcount_t refCount; member
59 if (refcount_dec_and_test(&buf->refCount) == 0) { in ContigMmapFree()
110 buf->handler.refCount = &buf->refCount; in ContigMmapAlloc()
114 refcount_set(&buf->refCount, 1); in ContigMmapAlloc()
421 return refcount_read(&buf->refCount); in ContigNumUsers()
H A Dsg_dma.c25 refcount_t refCount; member
39 if (refcount_dec_and_test(&buf->refCount) != 0) { in SgMmapFree()
146 buf->handler.refCount = &buf->refCount; in SgMmapAlloc()
149 refcount_set(&buf->refCount, 1); in SgMmapAlloc()
420 return refcount_read(&buf->refCount); in SgNumUsers()
/ohos5.0/foundation/communication/wifi/wifi/frameworks/js/napi/src/
H A Dwifi_napi_event.cpp83 uint32_t refCount = INVALID_REF_COUNT; in EventNotify() local
110 res = napi_reference_ref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
112 res, asyncEvent->callbackRef, refCount); in EventNotify()
113 if (res != napi_ok || refCount <= 1) { in EventNotify()
746 uint32_t refCount = INVALID_REF_COUNT; in DeleteRegisterObj() local
749 iter->m_regEnv, iter->m_regHanderRef, refCount); in DeleteRegisterObj()
750 if (refCount == 0) { in DeleteRegisterObj()
770 uint32_t refCount = INVALID_REF_COUNT; in DeleteAllRegisterObj() local
771 napi_reference_unref(iter->m_regEnv, iter->m_regHanderRef, &refCount); in DeleteAllRegisterObj()
773 iter->m_regEnv, iter->m_regHanderRef, refCount); in DeleteAllRegisterObj()
[all …]
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/render/
H A Drs_image_cache.cpp171 int refCount = IMAGE_USE_COUNT_FOR_PURGE; in CheckRefCntAndReleaseImageCache() local
173 return refCount; in CheckRefCntAndReleaseImageCache()
189 return refCount; // skip purge if pixelMap mismatch in CheckRefCntAndReleaseImageCache()
202 refCount = image.use_count(); in CheckRefCntAndReleaseImageCache()
204 if (refCount == 1) { // purge pixelMap & image only if no more reference in CheckRefCntAndReleaseImageCache()
210 return refCount; in CheckRefCntAndReleaseImageCache()
/ohos5.0/foundation/communication/nfc/frameworks/js/napi/cardEmulation/
H A Dnfc_napi_hce_adapter.cpp281 uint32_t refCount = INVALID_REF_COUNT; in DeleteHceCmdRegisterObj() local
282 napi_reference_unref(oldRegObj.m_regEnv, oldRegObj.m_regHanderRef, &refCount); in DeleteHceCmdRegisterObj()
285 oldRegObj.m_regEnv, oldRegObj.m_regHanderRef, refCount); in DeleteHceCmdRegisterObj()
286 if (refCount == 0) { in DeleteHceCmdRegisterObj()
315 uint32_t refCount = INVALID_REF_COUNT; in after_work_cb() local
341 napi_reference_unref(asyncData->env, asyncData->callbackRef, &refCount); in after_work_cb()
344 asyncData->env, asyncData->callbackRef, refCount); in after_work_cb()
345 if (refCount == 0) { in after_work_cb()
372 uint32_t refCount = INVALID_REF_COUNT; in EventNotify() local
373 napi_reference_ref(asyncEvent->env, asyncEvent->callbackRef, &refCount); in EventNotify()
/ohos5.0/foundation/resourceschedule/device_usage_statistics/frameworks/src/
H A Dusage_statistics_init.cpp69 int32_t refCount = 1; in InitIntervalType() local
93 napi_create_reference(env, result, refCount, &typeConstructor_); in InitIntervalType()
106 int32_t refCount = 1; in InitAppGroupType() local
133 napi_create_reference(env, result, refCount, &typeConstructor_); in InitAppGroupType()
/ohos5.0/foundation/filemanagement/dfs_service/services/cloudfiledaemon/src/cloud_disk/
H A Dfile_operations_helper.cpp178 child->refCount++; in GenerateCloudDiskInode()
211 inoPtr->refCount -= num; in PutCloudDiskInode()
212 if (inoPtr->refCount == 0) { in PutCloudDiskInode()
228 if (filePtr->refCount == 0) { in PutCloudDiskFile()
245 inoPtr->refCount -= num; in PutLocalId()
246 if (inoPtr->refCount == 0) { in PutLocalId()
/ohos5.0/foundation/multimedia/audio_framework/frameworks/js/napi/audiomanager/callback/
H A Dnapi_audio_manager_callbacks.cpp58 const int32_t refCount = ARGS_ONE; in SaveCallbackReference() local
59 napi_status status = napi_create_reference(env_, args, refCount, &callback); in SaveCallbackReference()
83 const int32_t refCount = ARGS_ONE; in SaveRoutingManagerDeviceChangeCbRef() local
90 napi_status status = napi_create_reference(env_, callback, refCount, &callbackRef); in SaveRoutingManagerDeviceChangeCbRef()
181 const int32_t refCount = ARGS_ONE; in SaveMicrophoneBlockedCallbackReference() local
188 napi_status status = napi_create_reference(env_, callback, refCount, &callbackRef); in SaveMicrophoneBlockedCallbackReference()
227 const int32_t refCount = 1; in SaveAudioManagerDeviceChangeCbRef() local
234 napi_status status = napi_create_reference(env_, callback, refCount, &callbackRef); in SaveAudioManagerDeviceChangeCbRef()
/ohos5.0/foundation/multimedia/player_framework/frameworks/js/system_sound_manager/src/ringtone_player/
H A Dringtone_player_napi.cpp69 int32_t refCount = 1; in Init() local
87 if (napi_create_reference(env, ctorObj, refCount, &sConstructor_) == napi_ok) { in Init()
244 const int32_t refCount = 1; in GetTitle() local
262 napi_create_reference(env, argv[PARAM0], refCount, &asyncContext->callbackRef); in GetTitle()
338 const int32_t refCount = 1; in GetAudioRendererInfo() local
354 napi_create_reference(env, argv[PARAM0], refCount, &asyncContext->callbackRef); in GetAudioRendererInfo()
394 const int32_t refCount = 1; in Configure() local
458 const int32_t refCount = 1; in Start() local
476 napi_create_reference(env, argv[PARAM0], refCount, &asyncContext->callbackRef); in Start()
508 const int32_t refCount = 1; in Stop() local
[all …]
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/test/
H A Dutils_test.cpp140 RefCount refCount([&num]() { in __anon20e15c150202() variable
143 ASSERT_TRUE(refCount);
145 RefCount refCount1(refCount);
148 RefCount refCount2(std::move(refCount));
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/common/
H A Dnapi_bluetooth_event.cpp98 uint32_t refCount = INVALID_REF_COUNT; in UpdateCallbackInfo() local
108 napi_reference_unref(it->second->env_, it->second->callback_, &refCount); in UpdateCallbackInfo()
109 HILOGD("decrements the refernce count, refCount: %{public}d", refCount); in UpdateCallbackInfo()
112 if (refCount == 0) { in UpdateCallbackInfo()
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/matrix/src/
H A Dmatrix_event.cpp38 void MatrixEvent::SetRefCount(RefCount refCount) in SetRefCount() argument
40 refCount_ = std::move(refCount); in SetRefCount()
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeRender/src/util/
H A Drender_util.cpp50 desc.refCount = handle.GetRefCount(); in GetRenderHandleDesc()
54 desc.refCount -= 1; // one count in mgr in GetRenderHandleDesc()
66 desc.refCount -= 1; // one count in mgr in GetRenderHandleDesc()
/ohos5.0/base/web/webview/interfaces/kits/napi/webviewcontroller/
H A Dwebview_javascript_result_callback.h54 napi_env env, int32_t containerScopeId, napi_value value, size_t refCount = 1);
56 … napi_env env, int32_t containerScopeId, napi_value value, int32_t holder, size_t refCount = 1);
58 JavaScriptOb(napi_env env, int32_t containerScopeId, napi_value value, size_t refCount = 1);
61 …v env, int32_t containerScopeId, napi_value value, std::set<int32_t> holders, size_t refCount = 1);
371 uint32_t refCount = 0; in Release() local
372 napi_status s = napi_reference_unref(env_, objRef_, &refCount); in Release()
376 return refCount; in Release()
/ohos5.0/base/update/updateservice/frameworks/js/napi/update/src/
H A Drestorer.cpp32 constexpr int32_t refCount = 1; // 新引用的初始引用计数 in Restorer() local
33 napi_create_reference(env, thisVar, refCount, &thisReference); in Restorer()
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/syncer/src/device/
H A Dsync_state_machine.cpp297 watchDogController_[flag].refCount++; in StartFeedDogForSync()
298 LOGD("af incr refCount = %d", watchDogController_[flag].refCount); in StartFeedDogForSync()
368 watchDogController_[flag].refCount = 0; in StopFeedDogForSyncNoLock()
381 if (--watchDogController_[flag].refCount <= 0) { in DecRefCountOfFeedDogTimer()
382 LOGD("stop feed dog timer, refcount = %d", watchDogController_[flag].refCount); in DecRefCountOfFeedDogTimer()
385 LOGD("af dec refcount = %d", watchDogController_[flag].refCount); in DecRefCountOfFeedDogTimer()

12345678