diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-01-21 20:48:20 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-01-21 20:48:20 +0000 |
commit | ecf19d14b3defdae63819d6bdacec1c2b5dbba81 (patch) | |
tree | e6e690a773a029e5b79786a0655566777a17e7c1 | |
parent | 2bcccf73c0dd992b24a3594c62edfdf13103de1c (diff) |
2009-01-21 Nickolay Kolchin <nbkolchin@gmail.com>
Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1357/cpukit
* rtems/src/tasks.c: Ensure creating a task with no ASR is honored.
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/rtems/src/tasks.c | 2 | ||||
-rw-r--r-- | testsuites/sptests/ChangeLog | 9 | ||||
-rw-r--r-- | testsuites/sptests/Makefile.am | 2 | ||||
-rw-r--r-- | testsuites/sptests/configure.ac | 1 | ||||
-rw-r--r-- | testsuites/sptests/sp47/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp47/Makefile.am | 28 | ||||
-rw-r--r-- | testsuites/sptests/sp47/init.c | 68 | ||||
-rw-r--r-- | testsuites/sptests/sp47/sp47.doc | 23 | ||||
-rw-r--r-- | testsuites/sptests/sp47/sp47.scn | 3 |
10 files changed, 141 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e31ec79914..cd2ca9e78a 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2009-01-21 Nickolay Kolchin <nbkolchin@gmail.com> + Joel Sherrill <joel.sherrill@oarcorp.com> + + PR 1357/cpukit + * rtems/src/tasks.c: Ensure creating a task with no ASR is honored. + 2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> PR 1348/cpukit diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index 78d50db831..3fbefc94f7 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -85,8 +85,6 @@ User_extensions_routine _RTEMS_tasks_Start_extension( api = started->API_Extensions[ THREAD_API_RTEMS ]; api->pending_events = EVENT_SETS_NONE_PENDING; - - _ASR_Initialize( &api->Signal ); } /*PAGE diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 25aa6bd872..fcfe0dbdf7 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,12 @@ +2009-01-21 Nickolay Kolchin <nbkolchin@gmail.com> + Joel Sherrill <joel.sherrill@oarcorp.com> + + PR 1357/cpukit + * Makefile.am, configure.ac: Ensure creating a task with no ASR is + honored. + * sp47/.cvsignore, sp47/Makefile.am, sp47/init.c, sp47/sp47.doc, + sp47/sp47.scn: New files. + 2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> PR 1348/cpukit diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 66f78f1d6b..c44b79683c 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal ## spfatal is not included for now SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \ sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \ - sp30 sp31 sp32 sp33 sp34 sp35 sp44 sp46 spsize + sp30 sp31 sp32 sp33 sp34 sp35 sp44 sp46 sp47 spsize DIST_SUBDIRS = $(SUBDIRS) spfatal include $(top_srcdir)/../automake/subdirs.am diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index 587785b15e..64c621834b 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -62,6 +62,7 @@ sp34/Makefile sp35/Makefile sp44/Makefile sp46/Makefile +sp47/Makefile spsize/Makefile spfatal/Makefile ]) diff --git a/testsuites/sptests/sp47/.cvsignore b/testsuites/sptests/sp47/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp47/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp47/Makefile.am b/testsuites/sptests/sp47/Makefile.am new file mode 100644 index 0000000000..c0a1f04335 --- /dev/null +++ b/testsuites/sptests/sp47/Makefile.am @@ -0,0 +1,28 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp47.exe +sp47_exe_SOURCES = init.c + +dist_rtems_tests_DATA = sp47.scn +dist_rtems_tests_DATA += sp47.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +sp47_exe_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sp47_exe_OBJECTS) $(sp47_exe_LDADD) +LINK_LIBS = $(sp47_exe_LDLIBS) + +sp47.exe$(EXEEXT): $(sp47_exe_OBJECTS) $(sp47_exe_DEPENDENCIES) + @rm -f sp47.exe$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp47/init.c b/testsuites/sptests/sp47/init.c new file mode 100644 index 0000000000..d0115fab0f --- /dev/null +++ b/testsuites/sptests/sp47/init.c @@ -0,0 +1,68 @@ +/* + * Submitted as part of PR1357 + * + * $Id$ + */ + +#include <tmacros.h> + +rtems_task test_asr(rtems_task_argument unused) +{ + rtems_mode mode; + + rtems_task_mode(0, RTEMS_CURRENT_MODE, &mode); + + if ( (mode & RTEMS_NO_ASR) == 0 ) { + puts( "ERROR - disable ASR not honored" ); + printf( + "mode = 0x%08X asr = %s\n", mode, + (mode & RTEMS_NO_ASR) ? "OFF" : "ON" + ); + } else + puts( "Creating task with ASR disable mode honored" ); + + puts( "*** END OF TEST 47 ***" ); + rtems_test_exit( 0 ); +} + +rtems_task Init(rtems_task_argument ignored) +{ + rtems_status_code sc; + rtems_id ti; + + puts( "\n\n*** TEST 47 ***" ); + sc = rtems_task_create( + rtems_build_name('t', 's', 't', '0'), + 100, + RTEMS_MINIMUM_STACK_SIZE, + RTEMS_NO_ASR, + RTEMS_DEFAULT_ATTRIBUTES, + &ti + ); + + if (sc != RTEMS_SUCCESSFUL) { + printf("rtems_task_create failed: %i\n", sc); + exit(0); + } + + rtems_task_start(ti, test_asr, 0); + + rtems_task_delete(RTEMS_SELF); +} + +/* configuration stuff */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MICROSECONDS_PER_TICK 10000 + +#define CONFIGURE_MAXIMUM_TASKS 64 +#define CONFIGURE_MAXIMUM_PERIODS 10 + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM + +#define CONFIGURE_INIT +#include <rtems/confdefs.h> diff --git a/testsuites/sptests/sp47/sp47.doc b/testsuites/sptests/sp47/sp47.doc new file mode 100644 index 0000000000..0ad61fe107 --- /dev/null +++ b/testsuites/sptests/sp47/sp47.doc @@ -0,0 +1,23 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2008. +# 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. +# + +This file describes the directives and concepts tested by this test set. + +test set name: sp47 + +directives: + + rtems_task_create + rtems_task_mode + +concepts: + ++ Ensure that setting the initial ASR mode of a task is honored. (PR1357) diff --git a/testsuites/sptests/sp47/sp47.scn b/testsuites/sptests/sp47/sp47.scn new file mode 100644 index 0000000000..fb41a47057 --- /dev/null +++ b/testsuites/sptests/sp47/sp47.scn @@ -0,0 +1,3 @@ +*** TEST 47 *** +Creating task with ASR disable mode honored +*** END OF TEST 47 *** |