mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
is_true_threads() on win32 case
This commit is contained in:
parent
2b855884a0
commit
c489fbeefc
@ -40,6 +40,7 @@ typedef void ContextFunction(struct ThreadContext *from_context, void *);
|
|||||||
typedef void ThreadFunction(void *);
|
typedef void ThreadFunction(void *);
|
||||||
|
|
||||||
extern const int needs_stack_prealloc;
|
extern const int needs_stack_prealloc;
|
||||||
|
extern const int is_os_threads;
|
||||||
|
|
||||||
/* Call this to fill in the appropriate values in context. If
|
/* Call this to fill in the appropriate values in context. If
|
||||||
needs_stack_prealloc (above) is true, the stack must already have
|
needs_stack_prealloc (above) is true, the stack must already have
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
which is necessary if setcontext() is not available. */
|
which is necessary if setcontext() is not available. */
|
||||||
|
|
||||||
const int needs_stack_prealloc = 1;
|
const int needs_stack_prealloc = 1;
|
||||||
|
const int is_os_threads = 0;
|
||||||
|
|
||||||
#if defined(_M_IX86) || defined(__i386__)
|
#if defined(_M_IX86) || defined(__i386__)
|
||||||
/* Maybe we can implement our own setjmp/longjmp in assembly code.
|
/* Maybe we can implement our own setjmp/longjmp in assembly code.
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int needs_stack_prealloc = 1;
|
const int needs_stack_prealloc = 1;
|
||||||
|
const int is_os_threads = 0;
|
||||||
|
|
||||||
struct ThreadContext {
|
struct ThreadContext {
|
||||||
ucontext_t _ucontext;
|
ucontext_t _ucontext;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
/* The Windows implementation doesn't use the stack pointer. */
|
/* The Windows implementation doesn't use the stack pointer. */
|
||||||
const int needs_stack_prealloc = 0;
|
const int needs_stack_prealloc = 0;
|
||||||
|
const int is_os_threads = 1;
|
||||||
|
|
||||||
static struct ThreadContext *current_context = NULL;
|
static struct ThreadContext *current_context = NULL;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ is_threading_supported() {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE bool ThreadSimpleImpl::
|
INLINE bool ThreadSimpleImpl::
|
||||||
is_true_threads() {
|
is_true_threads() {
|
||||||
return false;
|
return (is_os_threads != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user