summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psxcancel
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/tests/psxtests/psxcancel/.cvsignore2
-rw-r--r--c/src/tests/psxtests/psxcancel/Makefile.am44
-rw-r--r--c/src/tests/psxtests/psxcancel/init.c127
-rw-r--r--c/src/tests/psxtests/psxcancel/psxcancel.scn14
4 files changed, 0 insertions, 187 deletions
diff --git a/c/src/tests/psxtests/psxcancel/.cvsignore b/c/src/tests/psxtests/psxcancel/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/c/src/tests/psxtests/psxcancel/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/c/src/tests/psxtests/psxcancel/Makefile.am b/c/src/tests/psxtests/psxcancel/Makefile.am
deleted file mode 100644
index ec6783c7be..0000000000
--- a/c/src/tests/psxtests/psxcancel/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-##
-## $Id$
-##
-
-
-TEST = psxcancel
-
-MANAGERS = all
-
-C_FILES = init.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT))
-
-H_FILES =
-noinst_HEADERS = $(H_FILES)
-
-DOCTYPES = scn
-DOCS = $(DOCTYPES:%=$(TEST).%)
-
-SRCS = $(DOCS) $(C_FILES) $(H_FILES)
-OBJS = $(C_O_FILES)
-
-PRINT_SRCS = $(DOCS)
-
-PGM = ${ARCH}/$(TEST).exe
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-include $(top_srcdir)/psxtests.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-AM_CPPFLAGS += -I$(top_srcdir)/include
-
-${PGM}: $(OBJS) $(LINK_FILES)
- $(make-exe)
-
-all-local: $(ARCH) $(TMPINSTALL_FILES)
-
-EXTRA_DIST = $(C_FILES) $(DOCS)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/c/src/tests/psxtests/psxcancel/init.c b/c/src/tests/psxtests/psxcancel/init.c
deleted file mode 100644
index 3cf857fafa..0000000000
--- a/c/src/tests/psxtests/psxcancel/init.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Thread Test Program
- *
- * - test of POSIX's pthread_init() function from rtemstask Init()
- *
- * ott@linux.thai.net
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <sys/time.h>
-
-#ifdef __rtems__
-#include <rtems.h>
-/* configuration information */
-
-#define CONFIGURE_INIT
-
-#include <unistd.h>
-#include <errno.h>
-#include <sched.h>
-
-#include <bsp.h> /* for device driver prototypes */
-#include <pmacros.h>
-
-rtems_task Init( rtems_task_argument argument);
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 3
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
-
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 5
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 5
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 5
-
-#include <console.h>
-#include <confdefs.h>
-
-#endif /* __rtems__ */
-
-void countTaskDeferred() {
- int i=0;
- int type,state;
-
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &type);
- pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &state);
- while (1) {
- printf("countTaskDeferred: elapsed time (second): %2d\n", i++ );
- sleep(1);
- pthread_testcancel();
- }
-}
-
-void countTaskAsync() {
- int i=0;
- int type,state;
-
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &type);
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &state);
- while (1) {
- printf("countTaskAsync: elapsed time (second): %2d\n", i++ );
- sleep(1);
- }
-}
-
-#ifdef __linux__
-int main(){
-#else
- rtems_task Init( rtems_task_argument ignored ) {
-#endif
-
- pthread_t count;
- int taskparameter = 0;
-
- puts( "\n\n*** POSIX CANCEL TEST ***" );
-
- /* Start countTask deferred */
- {
- int task_ret;
- task_ret = pthread_create(&count, NULL, (void *) countTaskDeferred, (void *) &taskparameter);
- if (task_ret) {
- perror("pthread_create: countTask");
- rtems_test_exit(EXIT_FAILURE);
- }
- /* sleep for 5 seconds, then cancel it */
- sleep(5);
- pthread_cancel(count);
- pthread_join(count,NULL);
- }
-
- /* Start countTask asynchronous */
- {
- int task_ret;
- task_ret = pthread_create(&count, NULL, (void *) countTaskAsync, (void *) &taskparameter);
- if (task_ret) {
- perror("pthread_create: countTask");
- rtems_test_exit(EXIT_FAILURE);
- }
- /* sleep for 5 seconds, then cancel it */
- sleep(5);
- pthread_cancel(count);
- pthread_join(count,NULL);
- }
-
-
- puts( "*** END OF POSIX CANCEL TEST ***" );
-
-#ifdef __linux__
- return 0;
-#else
- rtems_test_exit(EXIT_SUCCESS);
-#endif
-}
-
diff --git a/c/src/tests/psxtests/psxcancel/psxcancel.scn b/c/src/tests/psxtests/psxcancel/psxcancel.scn
deleted file mode 100644
index bb5c7d58e0..0000000000
--- a/c/src/tests/psxtests/psxcancel/psxcancel.scn
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-*** POSIX CANCEL TEST ***
-countTaskDeferred: elapsed time (second): 0
-countTaskDeferred: elapsed time (second): 1
-countTaskDeferred: elapsed time (second): 2
-countTaskDeferred: elapsed time (second): 3
-countTaskDeferred: elapsed time (second): 4
-countTaskAsync: elapsed time (second): 0
-countTaskAsync: elapsed time (second): 1
-countTaskAsync: elapsed time (second): 2
-countTaskAsync: elapsed time (second): 3
-countTaskAsync: elapsed time (second): 4
-*** END OF POSIX CANCEL TEST ***