MCPcopy Create free account
hub / github.com/ROCm/clr / CloseUniqueFileHandle

Method CloseUniqueFileHandle

hipamd/src/hip_platform.cpp:1073–1084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1071}
1072
1073bool 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
1086void* PlatformState::getDynamicLibraryHandle() {
1087 amd::ScopedLock lock(lock_);

Callers 2

ReleaseImageAndFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected