Files
openairinterface5g/openair2/UTIL/LFDS/liblfds6.1.1/test/src/abstraction_thread_wait.c
T
Lionel Gauthier 059a0a3fdc astyle --recursive --indent=spaces=2 --style=kr --indent-col1-comments --break-blocks --convert-tabs --max-code-length=200
This is done for better merging branch/LG_PRE_RELEASE_0.3 into trunk (same process is applied on this branch)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7073 818b1a75-f10b-46b9-bf7c-635c3b92a50f
2015-04-09 09:29:12 +00:00

72 lines
1.5 KiB
C

#include "internal.h"
/****************************************************************************/
#if (defined _WIN32 && defined _MSC_VER && !defined WIN_KERNEL_BUILD)
/* TRD : any Windows (user-mode) on any CPU with the Microsoft C compiler
_WIN32 indicates 64-bit or 32-bit Windows
_MSC_VER indicates Microsoft C compiler
!WIN_KERNEL_BUILD indicates Windows user-mode
*/
void abstraction_thread_wait( thread_state_t thread_state )
{
WaitForSingleObject( thread_state, INFINITE );
return;
}
#endif
/****************************************************************************/
#if (defined _WIN32 && defined _MSC_VER && defined WIN_KERNEL_BUILD)
/* TRD : any Windows on any CPU with the Microsoft C compiler
_WIN32 indicates 64-bit or 32-bit Windows
_MSC_VER indicates Microsoft C compiler
WIN_KERNEL_BUILD indicates Windows kernel
*/
void abstraction_thread_wait( thread_state_t thread_state )
{
KeWaitForSingleObject( thread_state, Executive, KernelMode, FALSE, NULL );
return;
}
#endif
/****************************************************************************/
#if (defined __unix__)
/* TRD : any UNIX on any CPU with any compiler
I assumed pthreads is available on any UNIX.
__unix__ indicates Solaris, Linux, HPUX, etc
*/
void abstraction_thread_wait( thread_state_t thread_state )
{
pthread_join( thread_state, NULL );
return;
}
#endif