Lines Matching defs:the_spu

84         SPU *the_spu;
89 the_spu = (SPU*)crAlloc( sizeof( *the_spu ) );
91 * NOTE: what actually MUST be zero at this point is the_spu->superSPU, otherwise
93 crMemset(the_spu, 0, sizeof (*the_spu));
94 the_spu->id = id;
95 the_spu->privatePtr = NULL;
97 the_spu->dll = crDLLOpen( path, 0/*resolveGlobal*/ );
99 crDbgCmdSymLoadPrint(path, the_spu->dll->hinstLib);
101 the_spu->entry_point =
102 (SPULoadFunction) crDLLGetNoError( the_spu->dll, SPU_ENTRY_POINT_NAME );
103 if (!the_spu->entry_point)
107 crSPUUnloadChain(the_spu);
112 if (!the_spu->entry_point( &(the_spu->name), &(the_spu->super_name),
113 &(the_spu->init), &(the_spu->self),
114 &(the_spu->cleanup),
115 &(the_spu->options),
116 &(the_spu->spu_flags)) )
119 crSPUUnloadChain(the_spu);
123 if (crStrcmp(the_spu->name,"error"))
126 if (the_spu->super_name == NULL)
128 the_spu->super_name = "error";
130 the_spu->superSPU = crSPULoad( child, id, the_spu->super_name, dir, server );
133 if (crStrcmp(the_spu->name,"hosterror"))
136 if (the_spu->super_name == NULL)
138 the_spu->super_name = "hosterror";
140 the_spu->superSPU = crSPULoad( child, id, the_spu->super_name, dir, server );
145 the_spu->superSPU = NULL;
148 the_spu->function_table = the_spu->init( id, child, the_spu, 0, 1 );
149 if (!the_spu->function_table) {
151 crSPUUnloadChain(the_spu);
154 __buildDispatch( the_spu );
155 /*crDebug( "initializing dispatch table %p (for SPU %s)", (void*)&(the_spu->dispatch_table), name );*/
156 crSPUInitDispatchTable( &(the_spu->dispatch_table) );
159 the_spu->dispatch_table.server = server;
160 the_spu->self( &(the_spu->dispatch_table) );
163 return the_spu;
181 SPU *the_spu, *temp;
186 the_spu = crSPULoad( child_spu, spu_id, spu_name, dir, server );
187 if (!the_spu) {
195 for (temp = the_spu ; temp ; temp = temp->superSPU )
203 child_spu = the_spu;
261 SPU *the_spu = headSPU, *next_spu;
263 while (the_spu)
265 crDebug("Cleaning up SPU %s", the_spu->name);
267 if (the_spu->cleanup)
268 the_spu->cleanup();
270 next_spu = the_spu->superSPU;
271 crDLLClose(the_spu->dll);
272 crFree(the_spu);
273 the_spu = next_spu;