[FIX] Stop takes long time
authorVitaliy Cherepanov <v.cherepanov@samsung.com>
Mon, 21 Oct 2013 10:10:24 +0000 (14:10 +0400)
committerVitaliy Cherepanov <v.cherepanov@samsung.com>
Mon, 21 Oct 2013 10:53:18 +0000 (14:53 +0400)
merge dynamic-analysis-probe
eaaa5255eb87e8a887fdb170a263f5066d1f5689
70343d43a50d1f49fb60607c6167a2f706ccb2c8

Change-Id: I70471af6f4a4c8862087cf4787334f6801b2887f
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
Makefile
helper/appfw-capi.c [new file with mode: 0644]
helper/appfw-tizen.cpp [new file with mode: 0644]
helper/libdaprobe.c
include/dahelper.h

index c546ac3..959a458 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,11 +42,13 @@ COMMON_SRCS =       ./helper/libdaprobe.c \
                                ./probe_file/da_io_stdc.c
 
 CAPI_SRCS =$(COMMON_SRCS) \
+                       ./helper/appfw-capi.c \
                        ./helper/addr-capi.c \
                        ./probe_capi/capi_appfw.c \
                        ./probe_ui/capi_capture.c
 
 TIZEN_SRCS =   $(COMMON_SRCS) \
+                       ./helper/appfw-tizen.cpp \
                        ./helper/addr-tizen.c \
                        ./probe_memory/libdanew.cpp \
                        ./probe_tizenapi/tizen_file.cpp \
diff --git a/helper/appfw-capi.c b/helper/appfw-capi.c
new file mode 100644 (file)
index 0000000..03d2929
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ *  DA probe
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include <app.h>
+
+void application_exit()
+{
+       app_efl_exit();
+}
+
diff --git a/helper/appfw-tizen.cpp b/helper/appfw-tizen.cpp
new file mode 100644 (file)
index 0000000..46405bf
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ *  DA probe
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include <app.h>
+#include <FApp.h>
+using namespace Tizen::App;
+
+#define UNKNOWN_USER_EVENT     5873
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+void application_exit()
+{
+       App* self = App::GetInstance();
+       if(self != NULL)
+       {
+               self->Terminate();
+               // send unknown user event to main thread
+               // because this cause that main thread execute terminating routine without block
+               self->SendUserEvent(UNKNOWN_USER_EVENT, NULL);
+       }
+       else
+       {
+               app_efl_exit();
+       }
+}
+
+#ifdef __cplusplus
+}
+#endif
+
index 767b738..d9a5ba6 100755 (executable)
@@ -278,7 +278,7 @@ static void* recvThread(void* data)
                                }
                                else if(log.type == MSG_STOP)
                                {
-                                       app_efl_exit();
+                                       application_exit();
                                }
                                else
                                {
index 0839821..625be2c 100755 (executable)
@@ -213,6 +213,8 @@ int __profil(int mode);
 //wchar_t* -> char*
 void WcharToChar(char* pstrDest, const wchar_t* pwstrSrc);
 
+void application_exit();
+
 // screen capture functions
 int initialize_screencapture();
 int finalize_screencapture();