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