correctly close module file handles on module unloading in new demon layer

This commit is contained in:
Ryan Fleury
2024-03-27 11:19:24 -07:00
parent d73a3d4196
commit 4899f1871b
3 changed files with 11 additions and 5 deletions
+6 -3
View File
@@ -678,7 +678,8 @@ os_file_close(OS_Handle file)
{
if(os_handle_match(file, os_handle_zero())) { return; }
HANDLE handle = (HANDLE)file.u64[0];
CloseHandle(handle);
BOOL result = CloseHandle(handle);
(void)result;
}
internal U64
@@ -896,7 +897,8 @@ internal void
os_file_map_close(OS_Handle map)
{
HANDLE handle = (HANDLE)map.u64[0];
CloseHandle(handle);
BOOL result = CloseHandle(handle);
(void)result;
}
internal void *
@@ -939,7 +941,8 @@ os_file_map_view_open(OS_Handle map, OS_AccessFlags flags, Rng1U64 range)
internal void
os_file_map_view_close(OS_Handle map, void *ptr)
{
UnmapViewOfFile(ptr);
BOOL result = UnmapViewOfFile(ptr);
(void)result;
}
//- rjf: directory iteration