32 #ifndef _ODE_THREADING_H_
33 #define _ODE_THREADING_H_
35 #include <ode/odeconfig.h>
45 struct dxThreadingImplementation;
46 typedef struct dxThreadingImplementation *dThreadingImplementationID;
48 typedef unsigned dmutexindex_t;
50 typedef struct dxMutexGroup *dMutexGroupID;
69 typedef dMutexGroupID dMutexGroupAllocFunction (dThreadingImplementationID impl, dmutexindex_t Mutex_count,
const char *
const *Mutex_names_ptr);
82 typedef void dMutexGroupFreeFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group);
101 typedef void dMutexGroupMutexLockFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group, dmutexindex_t mutex_index);
139 typedef void dMutexGroupMutexUnlockFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group, dmutexindex_t mutex_index);
142 struct dxCallReleasee;
143 typedef struct dxCallReleasee *dCallReleaseeID;
146 typedef struct dxCallWait *dCallWaitID;
148 typedef size_t ddependencycount_t;
149 typedef ptrdiff_t ddependencychange_t;
150 typedef size_t dcallindex_t;
151 typedef int dThreadedCallFunction(
void *call_context, dcallindex_t instance_index,
152 dCallReleaseeID this_releasee);
157 unsigned long wait_nsec;
174 typedef dCallWaitID dThreadedCallWaitAllocFunction(dThreadingImplementationID impl);
188 typedef void dThreadedCallWaitResetFunction(dThreadingImplementationID impl, dCallWaitID call_wait);
201 typedef void dThreadedCallWaitFreeFunction(dThreadingImplementationID impl, dCallWaitID call_wait);
265 typedef void dThreadedCallPostFunction(dThreadingImplementationID impl,
int *out_summary_fault,
266 dCallReleaseeID *out_post_releasee, ddependencycount_t dependencies_count, dCallReleaseeID dependent_releasee,
267 dCallWaitID call_wait,
268 dThreadedCallFunction *call_func,
void *call_context, dcallindex_t instance_index,
269 const char *call_name);
292 typedef void dThreadedCallDependenciesCountAlterFunction(dThreadingImplementationID impl, dCallReleaseeID target_releasee,
293 ddependencychange_t dependencies_count_change);
327 typedef void dThreadedCallWaitFunction(dThreadingImplementationID impl,
int *out_wait_status,
329 const char *wait_name);
339 typedef unsigned dThreadingImplThreadCountRetrieveFunction(dThreadingImplementationID impl);
363 typedef int dThreadingImplResourcesForCallsPreallocateFunction(dThreadingImplementationID impl,
364 ddependencycount_t max_simultaneous_calls_estimate);
372 unsigned struct_size;
374 dMutexGroupAllocFunction *alloc_mutex_group;
375 dMutexGroupFreeFunction *free_mutex_group;
376 dMutexGroupMutexLockFunction *lock_group_mutex;
377 dMutexGroupMutexUnlockFunction *unlock_group_mutex;
379 dThreadedCallWaitAllocFunction *alloc_call_wait;
380 dThreadedCallWaitResetFunction *reset_call_wait;
381 dThreadedCallWaitFreeFunction *free_call_wait;
383 dThreadedCallPostFunction *post_call;
384 dThreadedCallDependenciesCountAlterFunction *alter_call_dependencies_count;
385 dThreadedCallWaitFunction *wait_call;
387 dThreadingImplThreadCountRetrieveFunction *retrieve_thread_count;
388 dThreadingImplResourcesForCallsPreallocateFunction *preallocate_resources_for_calls;
Definition: threading.h:154
An interface structure with function pointers to be provided by threading implementation.
Definition: threading.h:370