diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-01-21 20:48:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-01-21 20:48:28 +0000 |
commit | 4a1d51b1020b51ed1cd801911a7c2c8c28e806a3 (patch) | |
tree | c58142b67edbb7635c7f26e854ff3dc621cb0c24 | |
parent | 1595171d96ab7c799ac6a4468a0832f4a618ef01 (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 e7bbf9c9ee..d7fa6ca608 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-11-03 Joel Sherrill <joel.sherrill@OARcorp.com> PR 1333/cpukit diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index 5805cf7823..d7e380c1df 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -86,8 +86,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 e2aa83319d..340905c8c2 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-08-05 Xudong Guan <xudong.guan@criticalsoftware.com> PR 1212/cpukit diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index ab7103ff1c..3f2e0823f7 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 sp44 spsize + sp30 sp31 sp32 sp44 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 7b319349e7..0a4a4060c5 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -58,6 +58,7 @@ sp30/Makefile sp31/Makefile sp32/Makefile sp44/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 *** |