Beispiel #1
0
static void* DThread_Wrapper( void *p )
{
	DThread *self = (DThread*) p;
	if( self->thdSpecData == NULL ){
		self->thdSpecData = (DThreadData*)dao_calloc( 1, sizeof(DThreadData) );
		self->thdSpecData->thdObject = self;
	}
	self->thdSpecData->state = 0;
	pthread_setspecific( thdSpecKey, self->thdSpecData );

	if( self->cleaner ){
		pthread_cleanup_push( self->cleaner, self->taskArg );
		if( self->taskFunc ) self->taskFunc( self->taskArg );
		pthread_cleanup_pop( 1 );
	}else{
		if( self->taskFunc ) self->taskFunc( self->taskArg );
	}
	pthread_exit( 0 );
	return NULL;
}
Beispiel #2
0
static void* DThread_Wrapper( void *p )
{
	DThread *self = (DThread*) p;
	if( self->thdSpecData == NULL ){
		self->thdSpecData = DThreadData_New();
		self->thdSpecData->thdObject = self;
	}
	self->state = 0;
	self->vmpause = 0;
	self->vmpaused = 0;
	self->vmstop = 0;
	self->vmstopped = 0;

	if( self->cleaner ){
		pthread_cleanup_push( self->cleaner, self->taskArg );
		if( self->taskFunc ) self->taskFunc( self->taskArg );
		pthread_cleanup_pop( 1 );
	}else{
		if( self->taskFunc ) self->taskFunc( self->taskArg );
	}
	pthread_exit( 0 );
	return NULL;
}
Beispiel #3
0
void DThread_Wrapper( void *object )
{
	DThread *self = (DThread*)object;
	self->running = 1;

	if( self->thdSpecData == NULL ){
		self->thdSpecData = (DThreadData*)GlobalAlloc( GPTR, sizeof(DThreadData) );
		self->thdSpecData->thdObject = self;
	}
	self->thdSpecData->state = 0;
	TlsSetValue( thdSpecKey, self->thdSpecData );

	if( self->taskFunc ) self->taskFunc( self->taskArg );
	DThread_Exit( self );
}
Beispiel #4
0
void DThread_Wrapper( void *object )
{
	DThread *self = (DThread*)object;
	self->running = 1;

	if( self->thdSpecData == NULL ){
		self->thdSpecData = DThreadData_New();
		self->thdSpecData->thdObject = self;
	}
	self->state = 0;
	self->vmpause = 0;
	self->vmpaused = 0;
	self->vmstop = 0;
	self->vmstopped = 0;

	if( self->taskFunc ) self->taskFunc( self->taskArg );
	DThread_Exit( self );
}