forked from Imagelibrary/rtems
tm07: Split some code into new spnotepad02.
Use of deprecated notepads in sp07 needs further work. Updates #2305.
This commit is contained in:
@@ -12,7 +12,7 @@ _SUBDIRS = \
|
||||
sp60 sp62 sp63 sp64 sp65 sp66 sp67 sp68 sp69 \
|
||||
sp70 sp71 sp72 sp73 sp74 sp75 sp76 sp77 sp2038 \
|
||||
spassoc01 spchain spclockget spcoverage spobjgetnext \
|
||||
spnotepad01 spprintk spprivenv01 sprbtree01 spsize spstkalloc \
|
||||
spnotepad01 spnotepad02 spprintk spprivenv01 sprbtree01 spsize spstkalloc \
|
||||
spstkalloc02 spthreadq01 spwatchdog spwkspace \
|
||||
sperror01 sperror02 sperror03 \
|
||||
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
|
||||
|
||||
@@ -209,6 +209,7 @@ spmountmgr01/Makefile
|
||||
spmsgq_err01/Makefile
|
||||
spmsgq_err02/Makefile
|
||||
spnotepad01/Makefile
|
||||
spnotepad02/Makefile
|
||||
spnsext01/Makefile
|
||||
spobjgetnext/Makefile
|
||||
sppagesize/Makefile
|
||||
|
||||
@@ -210,25 +210,23 @@ rtems_task Init(
|
||||
directive_failed( status, "rtems_task_restart of TA3" );
|
||||
assert_extension_counts( &Task_restarted[ 0 ], 0x0 );
|
||||
|
||||
status = rtems_task_set_note( rtems_task_self(), RTEMS_NOTEPAD_4, 32 );
|
||||
directive_failed( status, "task_set_node of Self id" );
|
||||
printf( "INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
/*
|
||||
* We know this is deprecated and don't want a warning on every BSP built.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
status = rtems_task_set_note( RTEMS_SELF, RTEMS_NOTEPAD_4, 32 );
|
||||
directive_failed( status, "task_set_node of Self 0" );
|
||||
printf( "INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 );
|
||||
directive_failed( status, "task_set_node of TA1" );
|
||||
printf( "INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
|
||||
status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 );
|
||||
directive_failed( status, "task_set_node of TA1" );
|
||||
printf( "INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, 4 );
|
||||
directive_failed( status, "task_set_node of TA2" );
|
||||
printf( "INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 " );
|
||||
puts ( "to TA2's priority: 04");
|
||||
|
||||
status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, 4 );
|
||||
directive_failed( status, "task_set_node of TA2" );
|
||||
printf( "INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 " );
|
||||
puts ( "to TA2's priority: 04");
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
|
||||
@@ -10,8 +10,6 @@ rtems_extension_ident -- OK
|
||||
rtems_extension_ident - bad name -- RTEMS_INVALID_NAME
|
||||
rtems_extension_ident - bad name -- RTEMS_INVALID_ADDRESS
|
||||
rtems_extension_create - harmless -- OK
|
||||
INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 to TA1's priority: 04
|
||||
INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 to TA2's priority: 04
|
||||
<pause>
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
/*
|
||||
* We know this is deprecated and don't want a warning on every BSP built.
|
||||
*/
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
rtems_task Task_1(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
/*
|
||||
* We know this is deprecated and don't want a warning on every BSP built.
|
||||
*/
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
rtems_task Task_2(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
|
||||
22
testsuites/sptests/spnotepad02/Makefile.am
Normal file
22
testsuites/sptests/spnotepad02/Makefile.am
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
rtems_tests_PROGRAMS = spnotepad02
|
||||
spnotepad02_SOURCES = init.c
|
||||
|
||||
dist_rtems_tests_DATA = spnotepad02.scn
|
||||
dist_rtems_tests_DATA += spnotepad02.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(spnotepad02_OBJECTS)
|
||||
LINK_LIBS = $(spnotepad02_LDLIBS)
|
||||
|
||||
spnotepad02$(EXEEXT): $(spnotepad02_OBJECTS) $(spnotepad02_DEPENDENCIES)
|
||||
@rm -f spnotepad02$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
65
testsuites/sptests/spnotepad02/init.c
Normal file
65
testsuites/sptests/spnotepad02/init.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2015.
|
||||
* 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.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SPNOTEPAD 2";
|
||||
|
||||
/*
|
||||
* We know this is deprecated and don't want a warning on every BSP built.
|
||||
*/
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
status = rtems_task_set_note( rtems_task_self(), RTEMS_NOTEPAD_4, 32 );
|
||||
directive_failed( status, "task_set_node of Self id" );
|
||||
printf( "INIT - rtems_task_set_note - set my (id) RTEMS_NOTEPAD_4 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
|
||||
status = rtems_task_set_note( RTEMS_SELF, RTEMS_NOTEPAD_4, 32 );
|
||||
directive_failed( status, "task_set_node of Self 0" );
|
||||
printf( "INIT - rtems_task_set_note - set my (SELF) RTEMS_NOTEPAD_4 " );
|
||||
puts ( "to TA1's priority: 04" );
|
||||
|
||||
|
||||
TEST_END();
|
||||
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
0
testsuites/sptests/spnotepad02/spnotepad02.doc
Normal file
0
testsuites/sptests/spnotepad02/spnotepad02.doc
Normal file
0
testsuites/sptests/spnotepad02/spnotepad02.scn
Normal file
0
testsuites/sptests/spnotepad02/spnotepad02.scn
Normal file
Reference in New Issue
Block a user