diff packages/kernel/current/tests/kthread1.c @ 2:443894e2e912 ecos-v1_2_1-release

Block commit of eCos version 1.2.1
author jlarmour
date Tue, 11 May 1999 12:24:34 +0000
parents 3111d98ba7b3
children c38311975d4f
line wrap: on
line diff
--- a/packages/kernel/current/tests/kthread1.c
+++ b/packages/kernel/current/tests/kthread1.c
@@ -22,7 +22,7 @@
 // September 30, 1998.
 // 
 // The Initial Developer of the Original Code is Cygnus.  Portions created
-// by Cygnus are Copyright (C) 1998 Cygnus Solutions.  All Rights Reserved.
+// by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions.  All Rights Reserved.
 // -------------------------------------------
 //
 //####COPYRIGHTEND####
@@ -44,7 +44,13 @@
 
 #include "testaux.h"
 
+#include <cyg/hal/hal_arch.h>           // for CYGNUM_HAL_STACK_SIZE_TYPICAL
+
+#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL
+#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
+#else
 #define STACKSIZE 2000
+#endif
 
 static char stack[2][STACKSIZE];
 
@@ -80,7 +86,7 @@ static void entry1( cyg_addrword_t data 
 
     cyg_thread_suspend(pt1);
 
-    cyg_thread_exit();		// no guarantee this will be called
+    cyg_thread_exit();          // no guarantee this will be called
 }
 
 void kthread1_main( void )
@@ -88,9 +94,9 @@ void kthread1_main( void )
     CYG_TEST_INIT();
 
     cyg_thread_create(4, entry0, (cyg_addrword_t)222, "kthread1-0",
-    	(void *)stack[0], STACKSIZE, &pt0, &thread[0] );
+        (void *)stack[0], STACKSIZE, &pt0, &thread[0] );
     cyg_thread_create(4, entry1, (cyg_addrword_t)333, "kthread1-1",
-    	(void *)stack[1], STACKSIZE, &pt1, &thread[1] );
+        (void *)stack[1], STACKSIZE, &pt1, &thread[1] );
 
     cyg_thread_resume(pt0);
     cyg_thread_resume(pt1);
@@ -112,7 +118,7 @@ externC void
 cyg_start( void )
 {
     CYG_TEST_INIT();
-    CYG_TEST_PASS_FINISH("Kernel C API layer disabled");
+    CYG_TEST_NA("Kernel C API layer disabled");
 }
 #endif /* def CYGFUN_KERNEL_API_C */