diff options
author | 2023-04-14 06:45:20 +1000 | |
---|---|---|
committer | 2023-04-14 06:45:20 +1000 | |
commit | 7d26d641d3e94943b351ad55d7ffe25ec02ac791 (patch) | |
tree | d9fabd7ddf5c487711b1ee6b5599d0e4a7cb5902 /src/osd/modules/lib/osdlib_win32.cpp | |
parent | c0b57d30f0ce39c445190fe4e27bec6c57ebb137 (diff) |
Miscellaneous improvements:
infoxml.cpp: Thread device processing. Gives about a 10% speed
improvement overall, and avoids the need to mess with the locale of the
ultimate output stream.
debugger/win/consolewininfo.cpp: Show image mount/create error messages
on the console.
emu/devdelegate.h, util/delegate.h: Added deduction guides for common
delegate creation patterns (only used in sega/segas16a.cpp so far).
More noexcept on things that have no business throwing exceptions.
Diffstat (limited to 'src/osd/modules/lib/osdlib_win32.cpp')
-rw-r--r-- | src/osd/modules/lib/osdlib_win32.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp index 23e75bf9dc2..d42ad14d3df 100644 --- a/src/osd/modules/lib/osdlib_win32.cpp +++ b/src/osd/modules/lib/osdlib_win32.cpp @@ -253,7 +253,7 @@ std::error_condition osd_set_clipboard_text(std::string_view text) noexcept // osd_getpid //============================================================ -int osd_getpid() +int osd_getpid() noexcept { return GetCurrentProcessId(); } @@ -324,13 +324,13 @@ private: } // anonymous namespace -bool invalidate_instruction_cache(void const *start, std::size_t size) +bool invalidate_instruction_cache(void const *start, std::size_t size) noexcept { return FlushInstructionCache(GetCurrentProcess(), start, size) != 0; } -void *virtual_memory_allocation::do_alloc(std::initializer_list<std::size_t> blocks, unsigned intent, std::size_t &size, std::size_t &page_size) +void *virtual_memory_allocation::do_alloc(std::initializer_list<std::size_t> blocks, unsigned intent, std::size_t &size, std::size_t &page_size) noexcept { SYSTEM_INFO info; GetSystemInfo(&info); @@ -349,12 +349,12 @@ void *virtual_memory_allocation::do_alloc(std::initializer_list<std::size_t> blo return result; } -void virtual_memory_allocation::do_free(void *start, std::size_t size) +void virtual_memory_allocation::do_free(void *start, std::size_t size) noexcept { VirtualFree(start, 0, MEM_RELEASE); } -bool virtual_memory_allocation::do_set_access(void *start, std::size_t size, unsigned access) +bool virtual_memory_allocation::do_set_access(void *start, std::size_t size, unsigned access) noexcept { DWORD p; if (access & EXECUTE) |