michael@0: /* michael@0: This file is provided under a dual BSD/GPLv2 license. When using or michael@0: redistributing this file, you may do so under either license. michael@0: michael@0: GPL LICENSE SUMMARY michael@0: michael@0: Copyright (c) 2005-2012 Intel Corporation. All rights reserved. michael@0: michael@0: This program is free software; you can redistribute it and/or modify michael@0: it under the terms of version 2 of the GNU General Public License as michael@0: published by the Free Software Foundation. michael@0: michael@0: This program is distributed in the hope that it will be useful, but michael@0: WITHOUT ANY WARRANTY; without even the implied warranty of michael@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU michael@0: General Public License for more details. michael@0: michael@0: You should have received a copy of the GNU General Public License michael@0: along with this program; if not, write to the Free Software michael@0: Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. michael@0: The full GNU General Public License is included in this distribution michael@0: in the file called LICENSE.GPL. michael@0: michael@0: Contact Information: michael@0: http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/ michael@0: michael@0: BSD LICENSE michael@0: michael@0: Copyright (c) 2005-2012 Intel Corporation. All rights reserved. michael@0: All rights reserved. michael@0: michael@0: Redistribution and use in source and binary forms, with or without michael@0: modification, are permitted provided that the following conditions michael@0: are met: michael@0: michael@0: * Redistributions of source code must retain the above copyright michael@0: notice, this list of conditions and the following disclaimer. michael@0: * Redistributions in binary form must reproduce the above copyright michael@0: notice, this list of conditions and the following disclaimer in michael@0: the documentation and/or other materials provided with the michael@0: distribution. michael@0: * Neither the name of Intel Corporation nor the names of its michael@0: contributors may be used to endorse or promote products derived michael@0: from this software without specific prior written permission. michael@0: michael@0: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS michael@0: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT michael@0: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR michael@0: A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT michael@0: OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@0: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@0: LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, michael@0: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY michael@0: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT michael@0: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE michael@0: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: */ michael@0: #ifndef _ITTNOTIFY_CONFIG_H_ michael@0: #define _ITTNOTIFY_CONFIG_H_ michael@0: michael@0: /** @cond exclude_from_documentation */ michael@0: #ifndef ITT_OS_WIN michael@0: # define ITT_OS_WIN 1 michael@0: #endif /* ITT_OS_WIN */ michael@0: michael@0: #ifndef ITT_OS_LINUX michael@0: # define ITT_OS_LINUX 2 michael@0: #endif /* ITT_OS_LINUX */ michael@0: michael@0: #ifndef ITT_OS_MAC michael@0: # define ITT_OS_MAC 3 michael@0: #endif /* ITT_OS_MAC */ michael@0: michael@0: #ifndef ITT_OS michael@0: # if defined WIN32 || defined _WIN32 michael@0: # define ITT_OS ITT_OS_WIN michael@0: # elif defined( __APPLE__ ) && defined( __MACH__ ) michael@0: # define ITT_OS ITT_OS_MAC michael@0: # else michael@0: # define ITT_OS ITT_OS_LINUX michael@0: # endif michael@0: #endif /* ITT_OS */ michael@0: michael@0: #ifndef ITT_PLATFORM_WIN michael@0: # define ITT_PLATFORM_WIN 1 michael@0: #endif /* ITT_PLATFORM_WIN */ michael@0: michael@0: #ifndef ITT_PLATFORM_POSIX michael@0: # define ITT_PLATFORM_POSIX 2 michael@0: #endif /* ITT_PLATFORM_POSIX */ michael@0: michael@0: #ifndef ITT_PLATFORM michael@0: # if ITT_OS==ITT_OS_WIN michael@0: # define ITT_PLATFORM ITT_PLATFORM_WIN michael@0: # else michael@0: # define ITT_PLATFORM ITT_PLATFORM_POSIX michael@0: # endif /* _WIN32 */ michael@0: #endif /* ITT_PLATFORM */ michael@0: michael@0: #if defined(_UNICODE) && !defined(UNICODE) michael@0: #define UNICODE michael@0: #endif michael@0: michael@0: #include michael@0: #if ITT_PLATFORM==ITT_PLATFORM_WIN michael@0: #include michael@0: #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: #include michael@0: #if defined(UNICODE) || defined(_UNICODE) michael@0: #include michael@0: #endif /* UNICODE || _UNICODE */ michael@0: #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: michael@0: #ifndef CDECL michael@0: # if ITT_PLATFORM==ITT_PLATFORM_WIN michael@0: # define CDECL __cdecl michael@0: # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: # if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ michael@0: # define CDECL /* not actual on x86_64 platform */ michael@0: # else /* _M_X64 || _M_AMD64 || __x86_64__ */ michael@0: # define CDECL __attribute__ ((cdecl)) michael@0: # endif /* _M_X64 || _M_AMD64 || __x86_64__ */ michael@0: # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: #endif /* CDECL */ michael@0: michael@0: #ifndef STDCALL michael@0: # if ITT_PLATFORM==ITT_PLATFORM_WIN michael@0: # define STDCALL __stdcall michael@0: # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: # if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ michael@0: # define STDCALL /* not supported on x86_64 platform */ michael@0: # else /* _M_X64 || _M_AMD64 || __x86_64__ */ michael@0: # define STDCALL __attribute__ ((stdcall)) michael@0: # endif /* _M_X64 || _M_AMD64 || __x86_64__ */ michael@0: # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: #endif /* STDCALL */ michael@0: michael@0: #define ITTAPI CDECL michael@0: #define LIBITTAPI CDECL michael@0: michael@0: /* TODO: Temporary for compatibility! */ michael@0: #define ITTAPI_CALL CDECL michael@0: #define LIBITTAPI_CALL CDECL michael@0: michael@0: #if ITT_PLATFORM==ITT_PLATFORM_WIN michael@0: /* use __forceinline (VC++ specific) */ michael@0: #define ITT_INLINE __forceinline michael@0: #define ITT_INLINE_ATTRIBUTE /* nothing */ michael@0: #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: /* michael@0: * Generally, functions are not inlined unless optimization is specified. michael@0: * For functions declared inline, this attribute inlines the function even michael@0: * if no optimization level was specified. michael@0: */ michael@0: #ifdef __STRICT_ANSI__ michael@0: #define ITT_INLINE static michael@0: #else /* __STRICT_ANSI__ */ michael@0: #define ITT_INLINE static inline michael@0: #endif /* __STRICT_ANSI__ */ michael@0: #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline)) michael@0: #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: /** @endcond */ michael@0: michael@0: #ifndef ITT_ARCH_IA32 michael@0: # define ITT_ARCH_IA32 1 michael@0: #endif /* ITT_ARCH_IA32 */ michael@0: michael@0: #ifndef ITT_ARCH_IA32E michael@0: # define ITT_ARCH_IA32E 2 michael@0: #endif /* ITT_ARCH_IA32E */ michael@0: michael@0: #ifndef ITT_ARCH_IA64 michael@0: # define ITT_ARCH_IA64 3 michael@0: #endif /* ITT_ARCH_IA64 */ michael@0: michael@0: #ifndef ITT_ARCH michael@0: # if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ michael@0: # define ITT_ARCH ITT_ARCH_IA32E michael@0: # elif defined _M_IA64 || defined __ia64 michael@0: # define ITT_ARCH ITT_ARCH_IA64 michael@0: # else michael@0: # define ITT_ARCH ITT_ARCH_IA32 michael@0: # endif michael@0: #endif michael@0: michael@0: #ifdef __cplusplus michael@0: # define ITT_EXTERN_C extern "C" michael@0: #else michael@0: # define ITT_EXTERN_C /* nothing */ michael@0: #endif /* __cplusplus */ michael@0: michael@0: #define ITT_TO_STR_AUX(x) #x michael@0: #define ITT_TO_STR(x) ITT_TO_STR_AUX(x) michael@0: michael@0: #define __ITT_BUILD_ASSERT(expr, suffix) do { \ michael@0: static char __itt_build_check_##suffix[(expr) ? 1 : -1]; \ michael@0: __itt_build_check_##suffix[0] = 0; \ michael@0: } while(0) michael@0: #define _ITT_BUILD_ASSERT(expr, suffix) __ITT_BUILD_ASSERT((expr), suffix) michael@0: #define ITT_BUILD_ASSERT(expr) _ITT_BUILD_ASSERT((expr), __LINE__) michael@0: michael@0: #define ITT_MAGIC { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 } michael@0: michael@0: /* Replace with snapshot date YYYYMMDD for promotion build. */ michael@0: #define API_VERSION_BUILD 20111111 michael@0: michael@0: #ifndef API_VERSION_NUM michael@0: #define API_VERSION_NUM 0.0.0 michael@0: #endif /* API_VERSION_NUM */ michael@0: michael@0: #define API_VERSION "ITT-API-Version " ITT_TO_STR(API_VERSION_NUM) \ michael@0: " (" ITT_TO_STR(API_VERSION_BUILD) ")" michael@0: michael@0: /* OS communication functions */ michael@0: #if ITT_PLATFORM==ITT_PLATFORM_WIN michael@0: #include michael@0: typedef HMODULE lib_t; michael@0: typedef DWORD TIDT; michael@0: typedef CRITICAL_SECTION mutex_t; michael@0: #define MUTEX_INITIALIZER { 0 } michael@0: #define strong_alias(name, aliasname) /* empty for Windows */ michael@0: #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: #include michael@0: #if defined(UNICODE) || defined(_UNICODE) michael@0: #include michael@0: #endif /* UNICODE */ michael@0: #ifndef _GNU_SOURCE michael@0: #define _GNU_SOURCE 1 /* need for PTHREAD_MUTEX_RECURSIVE */ michael@0: #endif /* _GNU_SOURCE */ michael@0: #include michael@0: typedef void* lib_t; michael@0: typedef pthread_t TIDT; michael@0: typedef pthread_mutex_t mutex_t; michael@0: #define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER michael@0: #define _strong_alias(name, aliasname) \ michael@0: extern __typeof (name) aliasname __attribute__ ((alias (#name))); michael@0: #define strong_alias(name, aliasname) _strong_alias(name, aliasname) michael@0: #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: michael@0: #if ITT_PLATFORM==ITT_PLATFORM_WIN michael@0: #define __itt_get_proc(lib, name) GetProcAddress(lib, name) michael@0: #define __itt_mutex_init(mutex) InitializeCriticalSection(mutex) michael@0: #define __itt_mutex_lock(mutex) EnterCriticalSection(mutex) michael@0: #define __itt_mutex_unlock(mutex) LeaveCriticalSection(mutex) michael@0: #define __itt_load_lib(name) LoadLibraryA(name) michael@0: #define __itt_unload_lib(handle) FreeLibrary(handle) michael@0: #define __itt_system_error() (int)GetLastError() michael@0: #define __itt_fstrcmp(s1, s2) lstrcmpA(s1, s2) michael@0: #define __itt_fstrlen(s) lstrlenA(s) michael@0: #define __itt_fstrcpyn(s1, s2, l) lstrcpynA(s1, s2, l) michael@0: #define __itt_fstrdup(s) _strdup(s) michael@0: #define __itt_thread_id() GetCurrentThreadId() michael@0: #define __itt_thread_yield() SwitchToThread() michael@0: #ifndef ITT_SIMPLE_INIT michael@0: ITT_INLINE long michael@0: __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE; michael@0: ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) michael@0: { michael@0: return InterlockedIncrement(ptr); michael@0: } michael@0: #endif /* ITT_SIMPLE_INIT */ michael@0: #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ michael@0: #define __itt_get_proc(lib, name) dlsym(lib, name) michael@0: #define __itt_mutex_init(mutex) {\ michael@0: pthread_mutexattr_t mutex_attr; \ michael@0: int error_code = pthread_mutexattr_init(&mutex_attr); \ michael@0: if (error_code) \ michael@0: __itt_report_error(__itt_error_system, "pthread_mutexattr_init", \ michael@0: error_code); \ michael@0: error_code = pthread_mutexattr_settype(&mutex_attr, \ michael@0: PTHREAD_MUTEX_RECURSIVE); \ michael@0: if (error_code) \ michael@0: __itt_report_error(__itt_error_system, "pthread_mutexattr_settype", \ michael@0: error_code); \ michael@0: error_code = pthread_mutex_init(mutex, &mutex_attr); \ michael@0: if (error_code) \ michael@0: __itt_report_error(__itt_error_system, "pthread_mutex_init", \ michael@0: error_code); \ michael@0: error_code = pthread_mutexattr_destroy(&mutex_attr); \ michael@0: if (error_code) \ michael@0: __itt_report_error(__itt_error_system, "pthread_mutexattr_destroy", \ michael@0: error_code); \ michael@0: } michael@0: #define __itt_mutex_lock(mutex) pthread_mutex_lock(mutex) michael@0: #define __itt_mutex_unlock(mutex) pthread_mutex_unlock(mutex) michael@0: #define __itt_load_lib(name) dlopen(name, RTLD_LAZY) michael@0: #define __itt_unload_lib(handle) dlclose(handle) michael@0: #define __itt_system_error() errno michael@0: #define __itt_fstrcmp(s1, s2) strcmp(s1, s2) michael@0: #define __itt_fstrlen(s) strlen(s) michael@0: #define __itt_fstrcpyn(s1, s2, l) strncpy(s1, s2, l) michael@0: #define __itt_fstrdup(s) strdup(s) michael@0: #define __itt_thread_id() pthread_self() michael@0: #define __itt_thread_yield() sched_yield() michael@0: #if ITT_ARCH==ITT_ARCH_IA64 michael@0: #ifdef __INTEL_COMPILER michael@0: #define __TBB_machine_fetchadd4(addr, val) __fetchadd4_acq((void *)addr, val) michael@0: #else /* __INTEL_COMPILER */ michael@0: /* TODO: Add Support for not Intel compilers for IA64 */ michael@0: #endif /* __INTEL_COMPILER */ michael@0: #else /* ITT_ARCH!=ITT_ARCH_IA64 */ michael@0: ITT_INLINE long michael@0: __TBB_machine_fetchadd4(volatile void* ptr, long addend) ITT_INLINE_ATTRIBUTE; michael@0: ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) michael@0: { michael@0: long result; michael@0: __asm__ __volatile__("lock\nxadd %0,%1" michael@0: : "=r"(result),"=m"(*(long*)ptr) michael@0: : "0"(addend), "m"(*(long*)ptr) michael@0: : "memory"); michael@0: return result; michael@0: } michael@0: #endif /* ITT_ARCH==ITT_ARCH_IA64 */ michael@0: #ifndef ITT_SIMPLE_INIT michael@0: ITT_INLINE long michael@0: __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE; michael@0: ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) michael@0: { michael@0: return __TBB_machine_fetchadd4(ptr, 1) + 1L; michael@0: } michael@0: #endif /* ITT_SIMPLE_INIT */ michael@0: #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ michael@0: michael@0: typedef enum { michael@0: __itt_collection_normal = 0, michael@0: __itt_collection_paused = 1 michael@0: } __itt_collection_state; michael@0: michael@0: typedef enum { michael@0: __itt_thread_normal = 0, michael@0: __itt_thread_ignored = 1 michael@0: } __itt_thread_state; michael@0: michael@0: #pragma pack(push, 8) michael@0: michael@0: typedef struct ___itt_thread_info michael@0: { michael@0: const char* nameA; /*!< Copy of original name in ASCII. */ michael@0: #if defined(UNICODE) || defined(_UNICODE) michael@0: const wchar_t* nameW; /*!< Copy of original name in UNICODE. */ michael@0: #else /* UNICODE || _UNICODE */ michael@0: void* nameW; michael@0: #endif /* UNICODE || _UNICODE */ michael@0: TIDT tid; michael@0: __itt_thread_state state; /*!< Thread state (paused or normal) */ michael@0: int extra1; /*!< Reserved to the runtime */ michael@0: void* extra2; /*!< Reserved to the runtime */ michael@0: struct ___itt_thread_info* next; michael@0: } __itt_thread_info; michael@0: michael@0: #include "ittnotify_types.h" /* For __itt_group_id definition */ michael@0: michael@0: typedef struct ___itt_api_info_20101001 michael@0: { michael@0: const char* name; michael@0: void** func_ptr; michael@0: void* init_func; michael@0: __itt_group_id group; michael@0: } __itt_api_info_20101001; michael@0: michael@0: typedef struct ___itt_api_info michael@0: { michael@0: const char* name; michael@0: void** func_ptr; michael@0: void* init_func; michael@0: void* null_func; michael@0: __itt_group_id group; michael@0: } __itt_api_info; michael@0: michael@0: struct ___itt_domain; michael@0: struct ___itt_string_handle; michael@0: michael@0: typedef struct ___itt_global michael@0: { michael@0: unsigned char magic[8]; michael@0: unsigned long version_major; michael@0: unsigned long version_minor; michael@0: unsigned long version_build; michael@0: volatile long api_initialized; michael@0: volatile long mutex_initialized; michael@0: volatile long atomic_counter; michael@0: mutex_t mutex; michael@0: lib_t lib; michael@0: void* error_handler; michael@0: const char** dll_path_ptr; michael@0: __itt_api_info* api_list_ptr; michael@0: struct ___itt_global* next; michael@0: /* Joinable structures below */ michael@0: __itt_thread_info* thread_list; michael@0: struct ___itt_domain* domain_list; michael@0: struct ___itt_string_handle* string_list; michael@0: __itt_collection_state state; michael@0: } __itt_global; michael@0: michael@0: #pragma pack(pop) michael@0: michael@0: #define NEW_THREAD_INFO_W(gptr,h,h_tail,t,s,n) { \ michael@0: h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \ michael@0: if (h != NULL) { \ michael@0: h->tid = t; \ michael@0: h->nameA = NULL; \ michael@0: h->nameW = n ? _wcsdup(n) : NULL; \ michael@0: h->state = s; \ michael@0: h->extra1 = 0; /* reserved */ \ michael@0: h->extra2 = NULL; /* reserved */ \ michael@0: h->next = NULL; \ michael@0: if (h_tail == NULL) \ michael@0: (gptr)->thread_list = h; \ michael@0: else \ michael@0: h_tail->next = h; \ michael@0: } \ michael@0: } michael@0: michael@0: #define NEW_THREAD_INFO_A(gptr,h,h_tail,t,s,n) { \ michael@0: h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \ michael@0: if (h != NULL) { \ michael@0: h->tid = t; \ michael@0: h->nameA = n ? __itt_fstrdup(n) : NULL; \ michael@0: h->nameW = NULL; \ michael@0: h->state = s; \ michael@0: h->extra1 = 0; /* reserved */ \ michael@0: h->extra2 = NULL; /* reserved */ \ michael@0: h->next = NULL; \ michael@0: if (h_tail == NULL) \ michael@0: (gptr)->thread_list = h; \ michael@0: else \ michael@0: h_tail->next = h; \ michael@0: } \ michael@0: } michael@0: michael@0: #define NEW_DOMAIN_W(gptr,h,h_tail,name) { \ michael@0: h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ michael@0: if (h != NULL) { \ michael@0: h->flags = 0; /* domain is disabled by default */ \ michael@0: h->nameA = NULL; \ michael@0: h->nameW = name ? _wcsdup(name) : NULL; \ michael@0: h->extra1 = 0; /* reserved */ \ michael@0: h->extra2 = NULL; /* reserved */ \ michael@0: h->next = NULL; \ michael@0: if (h_tail == NULL) \ michael@0: (gptr)->domain_list = h; \ michael@0: else \ michael@0: h_tail->next = h; \ michael@0: } \ michael@0: } michael@0: michael@0: #define NEW_DOMAIN_A(gptr,h,h_tail,name) { \ michael@0: h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ michael@0: if (h != NULL) { \ michael@0: h->flags = 0; /* domain is disabled by default */ \ michael@0: h->nameA = name ? __itt_fstrdup(name) : NULL; \ michael@0: h->nameW = NULL; \ michael@0: h->extra1 = 0; /* reserved */ \ michael@0: h->extra2 = NULL; /* reserved */ \ michael@0: h->next = NULL; \ michael@0: if (h_tail == NULL) \ michael@0: (gptr)->domain_list = h; \ michael@0: else \ michael@0: h_tail->next = h; \ michael@0: } \ michael@0: } michael@0: michael@0: #define NEW_STRING_HANDLE_W(gptr,h,h_tail,name) { \ michael@0: h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \ michael@0: if (h != NULL) { \ michael@0: h->strA = NULL; \ michael@0: h->strW = name ? _wcsdup(name) : NULL; \ michael@0: h->extra1 = 0; /* reserved */ \ michael@0: h->extra2 = NULL; /* reserved */ \ michael@0: h->next = NULL; \ michael@0: if (h_tail == NULL) \ michael@0: (gptr)->string_list = h; \ michael@0: else \ michael@0: h_tail->next = h; \ michael@0: } \ michael@0: } michael@0: michael@0: #define NEW_STRING_HANDLE_A(gptr,h,h_tail,name) { \ michael@0: h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \ michael@0: if (h != NULL) { \ michael@0: h->strA = name ? __itt_fstrdup(name) : NULL; \ michael@0: h->strW = NULL; \ michael@0: h->extra1 = 0; /* reserved */ \ michael@0: h->extra2 = NULL; /* reserved */ \ michael@0: h->next = NULL; \ michael@0: if (h_tail == NULL) \ michael@0: (gptr)->string_list = h; \ michael@0: else \ michael@0: h_tail->next = h; \ michael@0: } \ michael@0: } michael@0: michael@0: #endif /* _ITTNOTIFY_CONFIG_H_ */