X-Git-Url: http://git.maemo.org/git/?p=mardrone;a=blobdiff_plain;f=mardrone%2FARDrone_SDK_Version_1_8_20110726%2FARDroneLib%2FVP_SDK%2FVP_Os%2Fwin32%2Fvp_os_signal_dep.h;fp=mardrone%2FARDrone_SDK_Version_1_8_20110726%2FARDroneLib%2FVP_SDK%2FVP_Os%2Fwin32%2Fvp_os_signal_dep.h;h=8da0a8c5605307578eb8caa5cd816fde870620a3;hp=0000000000000000000000000000000000000000;hb=9ec9bc13b75d30bc45535c54a652934debfcea92;hpb=ae0a3c2dc0898400aca0dd6b439c5db8044db7b2 diff --git a/mardrone/ARDrone_SDK_Version_1_8_20110726/ARDroneLib/VP_SDK/VP_Os/win32/vp_os_signal_dep.h b/mardrone/ARDrone_SDK_Version_1_8_20110726/ARDroneLib/VP_SDK/VP_Os/win32/vp_os_signal_dep.h new file mode 100644 index 0000000..8da0a8c --- /dev/null +++ b/mardrone/ARDrone_SDK_Version_1_8_20110726/ARDroneLib/VP_SDK/VP_Os/win32/vp_os_signal_dep.h @@ -0,0 +1,59 @@ +/** + * \brief OS Api for video sdk. Public definitions. + * \author Aurelien Morelle + * \author Sylvain Gaeremynck + * \version 2.0 + * \date 2006/12/15 + */ + +#ifndef _SIGNAL_INCLUDE_OS_DEP_ +#define _SIGNAL_INCLUDE_OS_DEP_ + +/* +IMPORTANT - select here whether to use condition variables from + the Windows SDK (Vista and later) or from the 'Pthread for Win32' library (XP and earlier). +*/ +#define USE_WINDOWS_CONDITION_VARIABLES +//#define USE_PTHREAD_FOR_WIN32 + + + +#include + + + + +#if defined USE_WINDOWS_CONDITION_VARIABLES + /* CONDITION_VARIABLE only work on VISTA/SEVEN/Server 2008 */ + typedef CRITICAL_SECTION vp_os_mutex_t; + + typedef struct + { + CONDITION_VARIABLE cond; + vp_os_mutex_t *mutex; + } + vp_os_cond_t; + + +#elif defined USE_PTHREAD_FOR_WIN32 + #include + + typedef pthread_mutex_t vp_os_mutex_t; + + typedef struct _vp_os_cond_t_ + { + pthread_cond_t cond; + vp_os_mutex_t *mutex; + } + vp_os_cond_t; + +#else + + typedef CRITICAL_SECTION vp_os_cond_t; + typedef CRITICAL_SECTION vp_os_mutex_t; + +#endif + + +#endif // ! _SIGNAL_INCLUDE_OS_DEP_ +