Files
rtems/testsuites/psxtests/psx12/task.c
Joel Sherrill e6e75e20f7 2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1867/cpukit
	* Makefile.am, configure.ac, psx12/task.c, psxrwlock01/test.c: Correct
	implementation of pthread_exit() and pthread_join() to support the
	case where a thread is joinable but calls pthread_exit() before a
	thread has attempted to join.
	* psx16/.cvsignore, psx16/Makefile.am, psx16/init.c, psx16/psx16.doc,
	psx16/psx16.scn: New files.
2011-07-31 16:17:02 +00:00

39 lines
817 B
C

/* Task_1
*
* This routine serves as a test task. It verifies the basic task
* switching capabilities of the executive.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#include "system.h"
#include <time.h>
#include <sched.h>
void *Task_1(
void *argument
)
{
/*
* Detach ourselves so we don't wait for a join that won't happen.
*/
pthread_detach( pthread_self() );
puts( "Task_1: exitting" );
pthread_exit( NULL );
return NULL; /* just so the compiler thinks we returned something */
}