aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-07-15 11:19:33 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-07-15 11:19:33 +0000
commit1429d2c659ab9b84dee673e7697da7eab44a8f90 (patch)
tree03230f43a7404b1e22f0ffdafb69e41196808b30 /src/server
parent32c6d70f6acd41dd1af5ea73051dd6c8a46eac14 (diff)
downloadriscv-openocd-1429d2c659ab9b84dee673e7697da7eab44a8f90.zip
riscv-openocd-1429d2c659ab9b84dee673e7697da7eab44a8f90.tar.gz
riscv-openocd-1429d2c659ab9b84dee673e7697da7eab44a8f90.tar.bz2
- added support for Asix Presto JTAG interface (thanks to Pavel Chromy and Asix for making this addition possible)
- added support for usbprog (thanks to Benedikt Sauter) - make OpenOCD listen for WM_QUIT messages on windows (thanks to Pavel Chromy) - register at_exit handler to do necessary unregistering (thanks to Pavel Chromy) - added dummy ETM capture driver to allow ETM to be registered without a capture driver git-svn-id: svn://svn.berlios.de/openocd/trunk@180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server')
-rw-r--r--src/server/server.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/server.c b/src/server/server.c
index ac5e17e..4c4fdec 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -382,6 +382,12 @@ int server_loop(command_context_t *command_context)
shutdown_openocd = 1;
}
}
+#else
+ MSG msg;
+ while (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
+ {
+ if (msg.message==WM_QUIT) shutdown_openocd = 1;
+ }
#endif
}
@@ -394,6 +400,10 @@ BOOL WINAPI ControlHandler(DWORD dwCtrlType)
shutdown_openocd = 1;
return TRUE;
}
+
+void sig_handler(int sig) {
+ shutdown_openocd = 1;
+}
#endif
int server_init()
@@ -411,6 +421,11 @@ int server_init()
}
SetConsoleCtrlHandler( ControlHandler, TRUE );
+
+ signal(SIGINT, sig_handler);
+ signal(SIGTERM, sig_handler);
+ signal(SIGBREAK, sig_handler);
+ signal(SIGABRT, sig_handler);
#endif