Home
last modified time | relevance | path

Searched refs:ScopeGuard (Results 1 – 8 of 8) sorted by relevance

/system/libbase/include/android-base/
Dscopeguard.h27 class ScopeGuard {
29 constexpr ScopeGuard(F&& f) : f_(std::forward<F>(f)), active_(true) {} in ScopeGuard() function
31 constexpr ScopeGuard(ScopeGuard&& that) noexcept : f_(std::move(that.f_)), active_(that.active_) { in ScopeGuard() function
36 constexpr ScopeGuard(ScopeGuard<Functor>&& that) : f_(std::move(that.f_)), active_(that.active_) { in ScopeGuard() function
40 ~ScopeGuard() { in ~ScopeGuard()
44 ScopeGuard() = delete;
45 ScopeGuard(const ScopeGuard&) = delete;
46 void operator=(const ScopeGuard&) = delete;
47 void operator=(ScopeGuard&& that) = delete;
55 friend class ScopeGuard;
[all …]
/system/libbase/
Dscopeguard_test.cpp52 std::vector<android::base::ScopeGuard<std::function<void()>>> scopeguards; in TEST()
/system/extras/simpleperf/
DJITDebugReader_test.cpp67 android::base::ScopeGuard g([&]() { munmap(symfile_addr, symfile_size); }); in TEST()
Dreport_utils.cpp37 android::base::ScopeGuard g([&]() { line_reader_ = nullptr; }); in AddProguardMappingFile()
/system/libfmq/fuzzer/
Dfmq_fuzzer.cpp156 android::base::ScopeGuard guard([&readersNotFinished]() { readersNotFinished--; }); in readerBlocking()
216 android::base::ScopeGuard guard([&writersNotFinished]() { writersNotFinished--; }); in writerBlocking()
/system/netd/server/
DTetherController.cpp280 const android::base::ScopeGuard faGuard = [&] { posix_spawn_file_actions_destroy(&fa); }; in startTethering()
293 const android::base::ScopeGuard attrGuard = [&] { posix_spawnattr_destroy(&attr); }; in startTethering()
/system/apex/apexd/
Dapex_file.cpp310 auto guard = android::base::ScopeGuard(std::bind(avb_free, descriptors)); in FindDescriptor()
/system/core/fs_mgr/
Dfs_mgr_overlayfs_mount.cpp723 android::base::ScopeGuard umountDir([]() { in fs_mgr_overlayfs_mount_all()