From 04e934a89e46f668c770c063a6969ceafd213731 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 11 Nov 2003 00:54:36 +0000 Subject: 2003-11-10 Ralf Corsepius * cpuuse/.cvsignore: Remove. * cpuuse/Makefile.am: Remove. * cpuuse/cpuuse.scn: Remove. * cpuuse/init.c: Remove. * cpuuse/system.h: Remove. * cpuuse/task1.c: Remove. * cpuuse/task2.c: Remove. * cpuuse/task3.c: Remove. * cpuuse/tswitch.c: Remove. * .cvsignore: Remove. * ChangeLog: Remove. * Makefile.am: Remove. * README: Remove. * configure.ac: Remove. * libtests.am: Remove. * malloctest/.cvsignore: Remove. * malloctest/Makefile.am: Remove. * malloctest/init.c: Remove. * malloctest/malloctest.scn: Remove. * malloctest/system.h: Remove. * malloctest/task1.c: Remove. * monitor/.cvsignore: Remove. * monitor/Makefile.am: Remove. * monitor/init.c: Remove. * monitor/system.h: Remove. * putenvtest/.cvsignore: Remove. * putenvtest/Makefile.am: Remove. * putenvtest/init.c: Remove. * rtems++/.cvsignore: Remove. * rtems++/Init.cc: Remove. * rtems++/Makefile.am: Remove. * rtems++/System.h: Remove. * rtems++/Task1.cc: Remove. * rtems++/Task2.cc: Remove. * rtems++/Task3.cc: Remove. * rtems++/rtems++.doc: Remove. * rtems++/rtems++.scn: Remove. * rtmonuse/.cvsignore: Remove. * rtmonuse/Makefile.am: Remove. * rtmonuse/getall.c: Remove. * rtmonuse/init.c: Remove. * rtmonuse/rtmonuse.scn: Remove. * rtmonuse/system.h: Remove. * rtmonuse/task1.c: Remove. * stackchk/.cvsignore: Remove. * stackchk/Makefile.am: Remove. * stackchk/blow.c: Remove. * stackchk/init.c: Remove. * stackchk/stackchk.scn: Remove. * stackchk/system.h: Remove. * stackchk/task1.c: Remove. * termios/.cvsignore: Remove. * termios/Makefile.am: Remove. * termios/README: Remove. * termios/init.c: Remove. --- c/src/tests/libtests/malloctest/task1.c | 72 --------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 c/src/tests/libtests/malloctest/task1.c (limited to 'c/src/tests/libtests/malloctest/task1.c') diff --git a/c/src/tests/libtests/malloctest/task1.c b/c/src/tests/libtests/malloctest/task1.c deleted file mode 100644 index 575dc5189b..0000000000 --- a/c/src/tests/libtests/malloctest/task1.c +++ /dev/null @@ -1,72 +0,0 @@ -/* task1.c - * - * This set of three tasks do some simple task switching for about - * 15 seconds and then call a routine to "blow the stack". - * - * 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 /* for malloc_dump, malloc_walk */ -#include /* for memset */ -#include - -#define NUM_PASSES 100 - -rtems_task Task_1_through_5( - rtems_task_argument argument -) -{ - int i; - unsigned int passes = 0; - rtems_id tid; - rtems_time_of_day time; - rtems_status_code status; - unsigned char *mem_ptr; - int mem_amt; - - status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - directive_failed( status, "rtems_task_ident" ); - - while (TRUE) - { - if ( passes++ > NUM_PASSES ) { - puts("*** END OF MALLOC TEST ***"); - rtems_test_exit(0); - } - - status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); - directive_failed( status, "rtems_clock_get" ); - - put_name( Task_name[ task_number( tid ) ], FALSE ); - print_time( " - rtems_clock_get - ", &time, "\n" ); - - mem_amt = ((int)((float)rand()*1000.0/(float)RAND_MAX)); - while (!(mem_ptr = malloc ( mem_amt))) { - printf("out of memory... trying again.\n"); - mem_amt = ((int)((float)rand()*1000.0/(float)RAND_MAX)); - } - printf("mallocing %d bytes\n",mem_amt); - memset( mem_ptr, mem_amt, mem_amt ); - malloc_dump(); - malloc_walk(1,FALSE); - status = rtems_task_wake_after( task_number( tid ) * 1 * TICKS_PER_SECOND/4 ); - for (i=0; i < mem_amt; i++) - { - if ( mem_ptr[i] != (mem_amt & 0xff)) - { - printf("failed %d, %d, 0x%x, 0x%x\n",i,mem_amt,mem_ptr[i],mem_amt&0xff); - rtems_test_exit(1); - } - } - directive_failed( status, "rtems_task_wake_after" ); - free( mem_ptr ); - } -} -- cgit v1.2.3