| 1071 | } |
| 1072 | |
| 1073 | bool PlatformState::CloseUniqueFileHandle(const std::shared_ptr<UniqueFD>& ufd) { |
| 1074 | amd::ScopedLock lock(ufd_lock_); |
| 1075 | |
| 1076 | // if use_count is 2, then there is 1 entry in the map and the current entry is the last close. |
| 1077 | if (ufd.use_count() == 2) { |
| 1078 | ufd_map_.erase(ufd->fpath_); |
| 1079 | if (!amd::Os::CloseFileHandle(ufd->fdesc_)) { |
| 1080 | return false; |
| 1081 | } |
| 1082 | } |
| 1083 | return true; |
| 1084 | } |
| 1085 | |
| 1086 | void* PlatformState::getDynamicLibraryHandle() { |
| 1087 | amd::ScopedLock lock(lock_); |
no outgoing calls
no test coverage detected