rtems object name

Philippe Simons loki_666 at fastmail.fm
Wed Jan 12 20:50:05 UTC 2005


i'm currently porting SDL (www.libsdl.org) which include a framework for
creating SDL tasks, which look like this

int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{
	rtems_status_code   status;
	/*create the task*/
	status = rtems_task_create(rtems_build_name( 'S', 'D', 'L', 'T' ),
					1,
					RTEMS_MINIMUM_STACK_SIZE * 4,
					RTEMS_DEFAULT_MODES,
					RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
					&thread->handle
					);
	if ( status ) {
		SDL_SetError("Couldn't initialize thread");
		return(-1);
	}

	/*start the task*/
	status = rtems_task_start ( thread->handle, RunThread,(rtems_task_argument) args);
	if ( status != 0 ) {
		SDL_SetError("Not enough resources to create thread");
		return(-1);
	}
	return(0);
}

ofcourse i dont know how many SDL_Thread will be created by the
application using SDL...
so, my question is,can differents object share a common name?

Philippe



More information about the users mailing list