4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
8 * Jaewon Lim <jaewon81.lim@samsung.com>
9 * Woojin Jung <woojin2.jung@samsung.com>
10 * Juyoung Kim <j0.kim@samsung.com>
12 * This library is free software; you can redistribute it and/or modify it under
13 * the terms of the GNU Lesser General Public License as published by the
14 * Free Software Foundation; either version 2.1 of the License, or (at your option)
17 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20 * License for more details.
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this library; if not, write to the Free Software Foundation, Inc., 51
24 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 #ifndef __BADA_PROBE_H__
32 #define __BADA_PROBE_H__
41 #define GET_REAL_FUNC_OSP(FUNCNAME, LIBNAME, FUNCTIONPOINTER) \
43 if(!FUNCTIONPOINTER) { \
45 if(lib_handle[LIBNAME] == NULL) { \
46 lib_handle[LIBNAME] = dlopen(lib_string[LIBNAME], RTLD_LAZY); \
47 if(lib_handle[LIBNAME] == NULL) { \
48 char perror_msg[PERROR_MSG_MAX]; \
49 sprintf(perror_msg, "dlopen failed : %s", lib_string[LIBNAME]); \
54 void* funcp = dlsym(lib_handle[LIBNAME], #FUNCNAME); \
55 if(funcp == NULL || dlerror() != NULL) { \
56 perror("dlsym failed : " #FUNCNAME); \
59 memcpy(&FUNCTIONPOINTER, &funcp, sizeof(void*)); \
64 #define PRE_PROBEBLOCK_OSP(FILTER) \
66 if((blockresult = preBlockBegin(CALLER_ADDRESS, FILTER, _sopt)) != 0) { \
67 setProbePoint(&probeInfo); \
72 extern int SceneManagerUsed;