mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
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.
This commit is contained in:
@@ -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>
|
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
PR 1348/cpukit
|
PR 1348/cpukit
|
||||||
|
|||||||
@@ -85,8 +85,6 @@ User_extensions_routine _RTEMS_tasks_Start_extension(
|
|||||||
api = started->API_Extensions[ THREAD_API_RTEMS ];
|
api = started->API_Extensions[ THREAD_API_RTEMS ];
|
||||||
|
|
||||||
api->pending_events = EVENT_SETS_NONE_PENDING;
|
api->pending_events = EVENT_SETS_NONE_PENDING;
|
||||||
|
|
||||||
_ASR_Initialize( &api->Signal );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -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>
|
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
PR 1348/cpukit
|
PR 1348/cpukit
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
|
|||||||
## spfatal is not included for now
|
## spfatal is not included for now
|
||||||
SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
|
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 \
|
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
|
DIST_SUBDIRS = $(SUBDIRS) spfatal
|
||||||
|
|
||||||
include $(top_srcdir)/../automake/subdirs.am
|
include $(top_srcdir)/../automake/subdirs.am
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ sp34/Makefile
|
|||||||
sp35/Makefile
|
sp35/Makefile
|
||||||
sp44/Makefile
|
sp44/Makefile
|
||||||
sp46/Makefile
|
sp46/Makefile
|
||||||
|
sp47/Makefile
|
||||||
spsize/Makefile
|
spsize/Makefile
|
||||||
spfatal/Makefile
|
spfatal/Makefile
|
||||||
])
|
])
|
||||||
|
|||||||
2
testsuites/sptests/sp47/.cvsignore
Normal file
2
testsuites/sptests/sp47/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
28
testsuites/sptests/sp47/Makefile.am
Normal file
28
testsuites/sptests/sp47/Makefile.am
Normal file
@@ -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
|
||||||
68
testsuites/sptests/sp47/init.c
Normal file
68
testsuites/sptests/sp47/init.c
Normal file
@@ -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>
|
||||||
23
testsuites/sptests/sp47/sp47.doc
Normal file
23
testsuites/sptests/sp47/sp47.doc
Normal file
@@ -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)
|
||||||
3
testsuites/sptests/sp47/sp47.scn
Normal file
3
testsuites/sptests/sp47/sp47.scn
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*** TEST 47 ***
|
||||||
|
Creating task with ASR disable mode honored
|
||||||
|
*** END OF TEST 47 ***
|
||||||
Reference in New Issue
Block a user