is_true_threads() on win32 case

This commit is contained in:
David Rose 2010-04-28 18:22:46 +00:00
parent 2b855884a0
commit c489fbeefc
5 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,7 @@ typedef void ContextFunction(struct ThreadContext *from_context, void *);
typedef void ThreadFunction(void *);
extern const int needs_stack_prealloc;
extern const int is_os_threads;
/* Call this to fill in the appropriate values in context. If
needs_stack_prealloc (above) is true, the stack must already have

View File

@ -17,6 +17,7 @@
which is necessary if setcontext() is not available. */
const int needs_stack_prealloc = 1;
const int is_os_threads = 0;
#if defined(_M_IX86) || defined(__i386__)
/* Maybe we can implement our own setjmp/longjmp in assembly code.

View File

@ -24,6 +24,7 @@
#endif
const int needs_stack_prealloc = 1;
const int is_os_threads = 0;
struct ThreadContext {
ucontext_t _ucontext;

View File

@ -26,6 +26,7 @@
/* The Windows implementation doesn't use the stack pointer. */
const int needs_stack_prealloc = 0;
const int is_os_threads = 1;
static struct ThreadContext *current_context = NULL;

View File

@ -69,7 +69,7 @@ is_threading_supported() {
////////////////////////////////////////////////////////////////////
INLINE bool ThreadSimpleImpl::
is_true_threads() {
return false;
return (is_os_threads != 0);
}
////////////////////////////////////////////////////////////////////