15 #ifndef PIPELINECYCLERTRUEIMPL_H
16 #define PIPELINECYCLERTRUEIMPL_H
18 #include "pandabase.h"
19 #include "selectThreadImpl.h"
21 #ifdef THREADED_PIPELINE
23 #include "pipelineCyclerLinks.h"
24 #include "cycleData.h"
25 #include "pointerTo.h"
26 #include "nodePointerTo.h"
29 #include "reMutexHolder.h"
50 PipelineCyclerTrueImpl();
53 PipelineCyclerTrueImpl(
const PipelineCyclerTrueImpl ©);
54 void operator = (
const PipelineCyclerTrueImpl ©);
55 ~PipelineCyclerTrueImpl();
57 INLINE
void acquire();
58 INLINE
void acquire(
Thread *current_thread);
59 INLINE
void release();
64 INLINE
void increment_read(
const CycleData *pointer)
const;
65 INLINE
void release_read(
const CycleData *pointer)
const;
68 INLINE
CycleData *write_upstream(
bool force_to_0,
Thread *current_thread);
71 INLINE
void increment_write(
CycleData *pointer)
const;
72 INLINE
void release_write(
CycleData *pointer);
74 INLINE
int get_num_stages();
75 INLINE
const CycleData *read_stage_unlocked(
int pipeline_stage)
const;
76 INLINE
const CycleData *read_stage(
int pipeline_stage,
Thread *current_thread)
const;
77 INLINE
void release_read_stage(
int pipeline_stage,
const CycleData *pointer)
const;
79 CycleData *write_stage_upstream(
int pipeline_stage,
bool force_to_0,
83 INLINE
CycleData *elevate_read_stage_upstream(
int pipeline_stage,
const CycleData *pointer,
84 bool force_to_0,
Thread *current_thread);
85 INLINE
void release_write_stage(
int pipeline_stage,
CycleData *pointer);
90 INLINE
int get_read_count()
const;
91 INLINE
int get_write_count()
const;
97 class CyclerMutex :
public ReMutex {
99 INLINE CyclerMutex(PipelineCyclerTrueImpl *cycler);
102 virtual void output(ostream &out)
const;
103 PipelineCyclerTrueImpl *_cycler;
104 #endif // DEBUG_THREADS
111 void set_num_stages(
int num_stages);
120 INLINE CycleDataNode();
121 INLINE CycleDataNode(
const CycleDataNode ©);
122 INLINE ~CycleDataNode();
123 INLINE
void operator = (
const CycleDataNode ©);
126 int _writes_outstanding;
128 CycleDataNode *_data;
137 #include "pipelineCyclerTrueImpl.I"
139 #endif // THREADED_PIPELINE
A single page of data maintained by a PipelineCycler.
This just stores the pointers to implement a doubly-linked list of PipelineCyclers for a particular P...
This class is intended to be the base class of all objects in Panda that might be allocated and delet...
This class manages a staged pipeline of data, for instance the render pipeline, so that each stage of...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.