14 #ifndef CONTEXTSWITCH_H 15 #define CONTEXTSWITCH_H 30 #ifdef THREAD_SIMPLE_IMPL 38 typedef void ContextFunction(
struct ThreadContext *from_context,
void *);
39 typedef void ThreadFunction(
void *);
41 extern const int needs_stack_prealloc;
42 extern const int is_os_threads;
51 void init_thread_context(
struct ThreadContext *context,
52 unsigned char *stack,
size_t stack_size,
53 ThreadFunction *thread_func,
void *data);
58 void save_thread_context(
struct ThreadContext *context,
59 ContextFunction *next_context,
void *data);
66 void switch_to_thread_context(
struct ThreadContext *from_context,
67 struct ThreadContext *to_context);
74 struct ThreadContext *alloc_thread_context();
75 void free_thread_context(
struct ThreadContext *context);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.