summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/watchdog.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-03-02 21:49:49 +0100
committer ImJezze <jezze@gmx.net>2016-03-02 21:49:49 +0100
commit9fe9f6d93e672bcd926f9e7461774bc9cc22e094 (patch)
tree3911b611dd010a4108b90fb8b8c82116eec21117 /src/osd/sdl/watchdog.cpp
parentdbdf21ee465acadf3e643d62d6bedfcc297ada85 (diff)
parent1914702e6fae052668df5b068a502bca57c9a3b0 (diff)
Merge remote-tracking branch 'refs/remotes/mamedev/master'
# Resolved Conflicts: # src/osd/modules/render/d3d/d3dhlsl.cpp # src/osd/windows/winmain.cpp
Diffstat (limited to 'src/osd/sdl/watchdog.cpp')
-rw-r--r--src/osd/sdl/watchdog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osd/sdl/watchdog.cpp b/src/osd/sdl/watchdog.cpp
index 01d98f460dc..eaa216dd0f8 100644
--- a/src/osd/sdl/watchdog.cpp
+++ b/src/osd/sdl/watchdog.cpp
@@ -45,15 +45,16 @@ watchdog::watchdog(void)
{
m_do_exit = 0;
m_event = osd_event_alloc(1, 0);
- m_thread = osd_thread_create(watchdog_thread, this);
+ m_thread = new std::thread(watchdog_thread, this);
m_timeout = 60 * osd_ticks_per_second();
}
watchdog::~watchdog(void)
{
- atomic_exchange32(&m_do_exit, 1);
+ m_do_exit = 1;
osd_event_set(m_event);
- osd_thread_wait_free(m_thread);
+ m_thread->join();
+ delete m_thread;
osd_event_free(m_event);
}