Home
last modified time | relevance | path

Searched refs:GuardState (Results 1 – 3 of 3) sorted by relevance

/art/runtime/base/unix_file/
Dfd_file.cc28 FdFile::FdFile() : guard_state_(GuardState::kClosed), fd_(-1), auto_close_(true) { in FdFile()
32 : guard_state_(check_usage ? GuardState::kBase : GuardState::kNoCheck), in FdFile()
37 : guard_state_(check_usage ? GuardState::kBase : GuardState::kNoCheck), in FdFile()
43 if (kCheckSafeUsage && (guard_state_ < GuardState::kNoCheck)) { in ~FdFile()
44 if (guard_state_ < GuardState::kFlushed) { in ~FdFile()
47 if (guard_state_ < GuardState::kClosed) { in ~FdFile()
50 CHECK_GE(guard_state_, GuardState::kClosed); in ~FdFile()
59 void FdFile::moveTo(GuardState target, GuardState warn_threshold, const char* warning) { in moveTo()
61 if (guard_state_ < GuardState::kNoCheck) { in moveTo()
62 if (warn_threshold < GuardState::kNoCheck && guard_state_ >= warn_threshold) { in moveTo()
[all …]
Dfd_file.h80 enum class GuardState { enum
93 void moveTo(GuardState target, GuardState warn_threshold, const char* warning);
98 void moveUp(GuardState target, const char* warning);
101 void resetGuard(GuardState new_state) { in resetGuard()
107 GuardState guard_state_;
117 std::ostream& operator<<(std::ostream& os, const FdFile::GuardState& kind);
Dmapped_file.cc46 resetGuard(GuardState::kNoCheck); in MapReadOnly()
82 resetGuard(GuardState::kBase); in MapReadWrite()
143 moveUp(GuardState::kFlushed, "Flushing closed file."); in Flush()
159 moveTo(GuardState::kBase, GuardState::kClosed, "Writing into a closed file."); in Write()