win-pvdrivers

view liblfds.6/test/src/abstraction_thread_wait.c @ 1025:aa2e51f67f7c

Fix hibernate under Win8. Change debugprints.
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 19 15:14:53 2013 +1100 (2013-02-19)
parents 6300617040e0
children
line source
1 #include "internal.h"
7 /****************************************************************************/
8 #if (defined _WIN32 && defined _MSC_VER && !defined WIN_KERNEL_BUILD)
10 /* TRD : any Windows (user-mode) on any CPU with the Microsoft C compiler
12 _WIN32 indicates 64-bit or 32-bit Windows
13 _MSC_VER indicates Microsoft C compiler
14 !WIN_KERNEL_BUILD indicates Windows user-mode
15 */
17 void abstraction_thread_wait( thread_state_t thread_state )
18 {
19 WaitForSingleObject( thread_state, INFINITE );
21 return;
22 }
24 #endif
30 /****************************************************************************/
31 #if (defined _WIN32 && defined _MSC_VER && defined WIN_KERNEL_BUILD)
33 /* TRD : any Windows on any CPU with the Microsoft C compiler
35 _WIN32 indicates 64-bit or 32-bit Windows
36 _MSC_VER indicates Microsoft C compiler
37 WIN_KERNEL_BUILD indicates Windows kernel
38 */
40 void abstraction_thread_wait( thread_state_t thread_state )
41 {
42 KeWaitForSingleObject( thread_state, Executive, KernelMode, FALSE, NULL );
44 return;
45 }
47 #endif
53 /****************************************************************************/
54 #if (defined __unix__)
56 /* TRD : any UNIX on any CPU with any compiler
58 I assumed pthreads is available on any UNIX.
60 __unix__ indicates Solaris, Linux, HPUX, etc
61 */
63 void abstraction_thread_wait( thread_state_t thread_state )
64 {
65 pthread_join( thread_state, NULL );
67 return;
68 }
70 #endif