api: Remove deprecated Notepads

Notepads where a feature of RTEMS' tasks that simply functioned in
the same way as POSIX keys or threaded local storage (TLS). They were
introduced well before per task variables, which are also deprecated,
and were barely used in favor of their POSIX alternatives.

In addition to their scarce usage, Notepads took up unnecessary memory.
For each task:

 - 16 32-bit integers were allocated.
 - A total of 64 bytes per task per thread.

This is especially critical in low memory and safety-critical applications.

They are also defined as uint32_t, and therefore are not guaranteed to
hold a pointer.

Lastly, they are not portable solutions for SMP and uniprocessor systems,
like POSIX keys and TLS.

updates #2493.
This commit is contained in:
Aun-Ali Zaidi
2015-12-24 16:52:34 -06:00
committed by Joel Sherrill
parent a48b7c442d
commit d5154d0f6a
128 changed files with 119 additions and 2595 deletions
-1
View File
@@ -11,7 +11,6 @@ done <<EOF
./sptests/sp17/sp17.scn
./sptests/sp19/sp19.scn
./sptests/sp09/sp09.scn
./sptests/sp07/sp07.scn
./sptests/sp12/sp12.scn
./sptests/sp14/sp14.scn
./sptests/sp03/sp03.scn
-3
View File
@@ -117,9 +117,6 @@ mptests/Makefile
mptests/mp01/Makefile
mptests/mp01/node1/Makefile
mptests/mp01/node2/Makefile
mptests/mp02/Makefile
mptests/mp02/node1/Makefile
mptests/mp02/node2/Makefile
mptests/mp03/Makefile
mptests/mp03/node1/Makefile
mptests/mp03/node2/Makefile
-1
View File
@@ -1,6 +1,5 @@
SUBDIRS =
SUBDIRS += mp01
SUBDIRS += mp02
SUBDIRS += mp03
SUBDIRS += mp04
SUBDIRS += mp05
-4
View File
@@ -1,4 +0,0 @@
SUBDIRS = node1 node2
include $(top_srcdir)/../../../testsuites/automake/subdirs.am
include $(top_srcdir)/../../../testsuites/automake/local.am
@@ -1,30 +0,0 @@
/* config_base.h
*
* This include file defines all of the Configuration Table for this test
* EXCEPT the NODE NUMBER.
*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
/* end of include file */
-207
View File
@@ -1,207 +0,0 @@
--
-- MPTEST / BODY
--
-- DESCRIPTION:
--
-- This package is the implementation for Test 2 of the RTEMS
-- Multiprocessor Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.rtems.org/license/LICENSE.
--
with INTERFACES; use INTERFACES;
with RTEMS;
with RTEMS.TASKS;
with TEST_SUPPORT;
with TEXT_IO;
with UNSIGNED32_IO;
package body MPTEST is
--
-- INIT
--
procedure INIT (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
) is
STATUS : RTEMS.STATUS_CODES;
begin
TEXT_IO.NEW_LINE( 2 );
TEXT_IO.PUT( "*** TEST 2 -- NODE " );
UNSIGNED32_IO.PUT(
TEST_SUPPORT.NODE,
WIDTH => 1
);
TEXT_IO.PUT_LINE( " ***" );
MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( '1', '1', '1', ' ' );
MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( '2', '2', '2', ' ' );
TEXT_IO.PUT_LINE( "Creating test task (Global)" );
RTEMS.TASKS.CREATE(
MPTEST.TASK_NAME( TEST_SUPPORT.NODE ),
1,
2048,
RTEMS.NO_PREEMPT,
RTEMS.GLOBAL,
MPTEST.TASK_ID( 1 ),
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
RTEMS.TASKS.START(
MPTEST.TASK_ID( 1 ),
MPTEST.TEST_TASK'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
end INIT;
--
-- TEST_TASK
--
procedure TEST_TASK (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
) is
TID : RTEMS.ID;
TEST_TID : RTEMS.ID;
REMOTE_TID : RTEMS.ID;
REMOTE_NODE : RTEMS.UNSIGNED32;
NOTE : RTEMS.UNSIGNED32;
STATUS : RTEMS.STATUS_CODES;
begin
RTEMS.TASKS.IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
if TEST_SUPPORT.NODE = 1 then
REMOTE_NODE := 2;
else
REMOTE_NODE := 1;
end if;
TEXT_IO.PUT_LINE( "Getting TID of remote task (all nodes)" );
loop
RTEMS.TASKS.IDENT(
MPTEST.TASK_NAME( REMOTE_NODE ),
RTEMS.SEARCH_ALL_NODES,
REMOTE_TID,
STATUS
);
exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
end loop;
--
-- We just got this ID above so looping is not necessary.
--
TEXT_IO.PUT_LINE( "Getting TID of remote task (1 node)" );
RTEMS.TASKS.IDENT(
MPTEST.TASK_NAME( REMOTE_NODE ),
REMOTE_NODE,
TEST_TID,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT" );
if TEST_TID /= REMOTE_TID then
TEXT_IO.PUT_LINE( "task_ident tid's do not match!!" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end if;
RTEMS.TASKS.DELETE( REMOTE_TID, STATUS );
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
"task_delete of remote task"
);
TEXT_IO.PUT_LINE(
"task_delete of remote task returned the correct error"
);
RTEMS.TASKS.START( REMOTE_TID, MPTEST.TEST_TASK'ACCESS, 0, STATUS );
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
"task_start of remote task"
);
TEXT_IO.PUT_LINE(
"task_start of remote task returned the correct error"
);
RTEMS.TASKS.RESTART( REMOTE_TID, 0, STATUS );
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
"task_restart of remote task"
);
TEXT_IO.PUT_LINE(
"task_restart of remote task returned the correct error"
);
TEXT_IO.PUT( "Setting notepad " );
UNSIGNED32_IO.PUT( RTEMS.GET_NODE( TID ), WIDTH=>1 );
TEXT_IO.PUT( " of the remote task to " );
UNSIGNED32_IO.PUT( RTEMS.GET_NODE( TID ), WIDTH=>1 );
TEXT_IO.NEW_LINE;
RTEMS.TASKS.SET_NOTE(
REMOTE_TID,
RTEMS.GET_NODE( TID ),
RTEMS.GET_NODE( TID ),
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE" );
TEXT_IO.PUT_LINE( "Getting a notepad of the remote task" );
RTEMS.TASKS.GET_NOTE(
REMOTE_TID,
RTEMS.GET_NODE( TID ),
NOTE,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_GET_NOTE" );
if NOTE = RTEMS.GET_NODE( TID ) then
TEXT_IO.PUT_LINE( "Remote notepad set and read correctly" );
else
TEXT_IO.PUT(
"FAILURE!!! Remote notepad was not set and read correctly ("
);
UNSIGNED32_IO.PUT( NOTE );
TEXT_IO.PUT( ", " );
UNSIGNED32_IO.PUT( RTEMS.GET_NODE( TID ) );
TEXT_IO.PUT_LINE( ")" );
end if;
RTEMS.TASKS.DELETE( REMOTE_TID, STATUS );
TEXT_IO.PUT_LINE( "*** END OF TEST 2 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TEST_TASK;
end MPTEST;
-60
View File
@@ -1,60 +0,0 @@
--
-- MPTEST / SPECIFICATION
--
-- DESCRIPTION:
--
-- This package is the specification for Test 2 of the RTEMS
-- Multiprocessor Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.rtems.org/license/LICENSE.
--
with RTEMS;
with RTEMS.TASKS;
package MPTEST is
--
-- These arrays contain the IDs and NAMEs of all RTEMS tasks created
-- by this test.
--
TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
--
-- INIT
--
-- DESCRIPTION:
--
-- This RTEMS task initializes the application.
--
procedure INIT (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
);
pragma Convention (C, INIT);
--
-- TEST_TASK
--
-- DESCRIPTION:
--
-- This is the body of the RTEMS tasks which constitute this test.
--
procedure TEST_TASK (
ARGUMENT : in RTEMS.TASKS.ARGUMENT
);
pragma Convention (C, TEST_TASK);
end MPTEST;
@@ -1,19 +0,0 @@
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../testsuites/automake/compile.am
include $(top_srcdir)/ada.am
AM_ADAFLAGS += -I$(srcdir)/..
noinst_PROGRAMS = mp02_ada_mp02_node1
mp02_ada_mp02_node1_SOURCES = mp02_node1.adb ../mptest.adb config.h
mp02_ada_mp02_node1_SOURCES += ../mptest.ads
mp02_ada_mp02_node1_SOURCES += ../../../support/init.c
mp02_ada_mp02_node1$(EXEEXT): mp02_node1.adb ../mptest.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_mp02-node1.scn
include $(top_srcdir)/../../../testsuites/automake/local.am
@@ -1,11 +0,0 @@
*** TEST 2 -- NODE 1 ***
Creating test task (Global)
Getting TID of remote task (all nodes)
Getting TID of remote task (1 node)
task_delete of remote task returned the correct error
task_start of remote task returned the correct error
task_restart of remote task returned the correct error
Setting notepad 1 of the remote task to 1
Getting a notepad of the remote task
Remote notepad set and read correctly
*** END OF TEST 2 ***
@@ -1,21 +0,0 @@
/* config.h
*
* This include file defines the Configuration Table for this test.
*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
/* configuration information */
#define CONFIGURE_MP_APPLICATION
#define CONFIGURE_MP_NODE_NUMBER 1
#include "../config_base.h"
/* end of include file */
@@ -1,56 +0,0 @@
--
-- MAIN / BODY
--
-- DESCRIPTION:
--
-- This is the entry point for Test MP02_NODE1 of the Multiprocessor
-- Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.rtems.org/license/LICENSE.
--
with RTEMS;
with RTEMS.TASKS;
with MPTEST;
with TEST_SUPPORT;
procedure MP02_NODE1 is
INIT_ID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
begin
RTEMS.TASKS.CREATE(
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
1,
RTEMS.MINIMUM_STACK_SIZE,
RTEMS.NO_PREEMPT,
RTEMS.DEFAULT_ATTRIBUTES,
INIT_ID,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
RTEMS.TASKS.START(
INIT_ID,
MPTEST.INIT'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
loop
delay 120.0;
end loop;
end MP02_NODE1;
@@ -1,19 +0,0 @@
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../testsuites/automake/compile.am
include $(top_srcdir)/ada.am
AM_ADAFLAGS += -I$(srcdir)/..
noinst_PROGRAMS = mp02_ada_mp02_node2
mp02_ada_mp02_node2_SOURCES = mp02_node2.adb ../mptest.adb config.h
mp02_ada_mp02_node2_SOURCES += ../mptest.ads
mp02_ada_mp02_node2_SOURCES += ../../../support/init.c
mp02_ada_mp02_node2$(EXEEXT): mp02_node2.adb ../mptest.adb init.$(OBJEXT)
$(GNATCOMPILE) -margs -a $< -o $@
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = ada_mp02-node2.scn
include $(top_srcdir)/../../../testsuites/automake/local.am
@@ -1,11 +0,0 @@
*** TEST 2 -- NODE 2 ***
Creating test task (Global)
Getting TID of remote task (all nodes)
Getting TID of remote task (1 node)
task_delete of remote task returned the correct error
task_start of remote task returned the correct error
task_restart of remote task returned the correct error
Setting notepad 2 of the remote task to 2
Getting a notepad of the remote task
Remote notepad set and read correctly
*** END OF TEST 2 ***
@@ -1,21 +0,0 @@
/* config.h
*
* This include file defines the Configuration Table for this test.
*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
/* configuration information */
#define CONFIGURE_MP_APPLICATION
#define CONFIGURE_MP_NODE_NUMBER 2
#include "../config_base.h"
/* end of include file */
@@ -1,56 +0,0 @@
--
-- MAIN / BODY
--
-- DESCRIPTION:
--
-- This is the entry point for Test MP02_NODE2 of the Multiprocessor
-- Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-2011.
-- On-Line Applications Research Corporation (OAR).
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.rtems.org/license/LICENSE.
--
with RTEMS;
with RTEMS.TASKS;
with MPTEST;
with TEST_SUPPORT;
procedure MP02_NODE2 is
INIT_ID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
begin
RTEMS.TASKS.CREATE(
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
1,
RTEMS.MINIMUM_STACK_SIZE,
RTEMS.NO_PREEMPT,
RTEMS.DEFAULT_ATTRIBUTES,
INIT_ID,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
RTEMS.TASKS.START(
INIT_ID,
MPTEST.INIT'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
loop
delay 120.0;
end loop;
end MP02_NODE2;
@@ -8,20 +8,11 @@ TASKS_START - TA2 - started.
TASKS_START - TA3 - started.
TASKS_START - TA4 - started.
TASKS_RESTART - TA3 - restarted.
INIT - task_set_note - set TA1's NOTEPAD_8 to TA1's initial priority: 4
INIT - task_set_note - set TA2's NOTEPAD_8 to TA2's initial priority: 4
<pause>
TA1 - task_set_priority - get initial priority of self: 4
TA1 - task_get_note - get NOTEPAD_8 - current priority: 4
TA1 - task_set_note - set TA2's NOTEPAD_8: 3
TA1 - task_set_priority - set TA2's priority: 3
TA2 - task_get_note - get NOTEPAD_8 - current priority: 3
TA2 - task_set_note - set TA1's NOTEPAD_8: 2
TA2 - task_set_priority - set TA1's priority: 2
TA1 - task_get_note - get NOTEPAD_8 - current priority: 2
TA1 - task_set_note - set TA2's NOTEPAD_8: 1
TA1 - task_set_priority - set TA2's priority: 1
TA2 - task_get_note - get NOTEPAD_8 - current priority: 1
TA2 - task_suspend - suspend TA1
TA2 - task_set_priority - set priority of TA1 ( blocked )
TASKS_DELETE - TA2 deleting TA1
-46
View File
@@ -229,16 +229,6 @@ package body SPTEST is
Flush_Task_Event_Log;
RTEMS.TASKS.SET_NOTE( SPTEST.TASK_ID( 1 ), 8, 4, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE OF TA1" );
TEXT_IO.PUT( "INIT - task_set_note - set TA1's NOTEPAD_8" );
TEXT_IO.PUT_LINE( " to TA1's initial priority: 4" );
RTEMS.TASKS.SET_NOTE( SPTEST.TASK_ID( 2 ), 8, 4, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE OF TA2" );
TEXT_IO.PUT( "INIT - task_set_note - set TA2's NOTEPAD_8" );
TEXT_IO.PUT_LINE( " to TA2's initial priority: 4" );
RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
@@ -273,13 +263,6 @@ package body SPTEST is
loop
RTEMS.TASKS.GET_NOTE( RTEMS.SELF, 8, THE_PRIORITY, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_GET_NOTE" );
TEXT_IO.PUT( "TA1 - task_get_note - ");
TEXT_IO.PUT( "get NOTEPAD_8 - current priority: " );
UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
TEXT_IO.NEW_LINE;
THE_PRIORITY := THE_PRIORITY - 1;
if THE_PRIORITY = 0 then
@@ -305,17 +288,6 @@ package body SPTEST is
end if;
TEXT_IO.PUT( "TA1 - task_set_note - set TA2's NOTEPAD_8: " );
UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
TEXT_IO.NEW_LINE;
RTEMS.TASKS.SET_NOTE(
SPTEST.TASK_ID( 2 ),
8,
THE_PRIORITY,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE" );
TEXT_IO.PUT("TA1 - task_set_priority - set TA2's priority: ");
UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
TEXT_IO.NEW_LINE;
@@ -346,13 +318,6 @@ package body SPTEST is
loop
RTEMS.TASKS.GET_NOTE( RTEMS.SELF, 8, THE_PRIORITY, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_GET_NOTE" );
TEXT_IO.PUT( "TA2 - task_get_note - ");
TEXT_IO.PUT( "get NOTEPAD_8 - current priority: " );
UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
TEXT_IO.NEW_LINE;
THE_PRIORITY := THE_PRIORITY - 1;
if THE_PRIORITY = 0 then
@@ -387,17 +352,6 @@ package body SPTEST is
else
TEXT_IO.PUT( "TA2 - task_set_note - set TA1's NOTEPAD_8: " );
UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2 );
TEXT_IO.NEW_LINE;
RTEMS.TASKS.SET_NOTE(
SPTEST.TASK_ID( 1 ),
8,
THE_PRIORITY,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_NOTE" );
TEXT_IO.PUT( "TA2 - task_set_priority - ");
TEXT_IO.PUT( "set TA1's priority: ");
UNSIGNED32_IO.PUT( THE_PRIORITY, BASE => 10, WIDTH => 2);
@@ -2,8 +2,6 @@
INIT - task_create - INVALID_PRIORITY
INIT - task_restart - INCORRECT_STATE
TA1 - task_delete - INVALID_ID
TA1 - task_get_note - INVALID_NUMBER
TA1 - task_get_note - INVALID_ID
TA1 - task_ident - current task SUCCESSFUL
TA1 - task_ident - global INVALID_NAME
TA1 - task_ident - local INVALID_NAME
@@ -13,8 +11,6 @@ TA1 - task_resume - INVALID_ID
TA1 - task_resume - INCORRECT_STATE
TA1 - task_set_priority - INVALID_PRIORITY
TA1 - task_set_priority - INVALID_ID
TA1 - task_set_note - INVALID_NUMBER
TA1 - task_set_note - INVALID_ID
TA1 - task_start - INVALID_ID
TA1 - task_start - INCORRECT_STATE
TA1 - task_suspend - INVALID_ID
-65
View File
@@ -148,7 +148,6 @@ package body SPTEST is
procedure SCREEN_1
is
NOTEPAD_VALUE : RTEMS.UNSIGNED32 := 0;
SELF_ID : RTEMS.ID;
PREVIOUS_PRIORITY : RTEMS.TASKS.PRIORITY;
STATUS : RTEMS.STATUS_CODES;
@@ -162,38 +161,6 @@ package body SPTEST is
);
TEXT_IO.PUT_LINE( "TA1 - task_delete - INVALID_ID" );
begin
RTEMS.TASKS.GET_NOTE( RTEMS.SELF,
RTEMS.NOTEPAD_INDEX'LAST + 10,
NOTEPAD_VALUE,
STATUS
);
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.INVALID_NUMBER,
"TASK_GET_NOTE WITH ILLEGAL NOTEPAD"
);
TEXT_IO.PUT_LINE( "TA1 - task_get_note - INVALID_NUMBER" );
exception
when others =>
TEXT_IO.PUT_LINE(
"TA1 - task_get_note - INVALID_NUMBER -- constraint error"
);
end;
RTEMS.TASKS.GET_NOTE(
100,
RTEMS.NOTEPAD_INDEX'LAST,
NOTEPAD_VALUE,
STATUS
);
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.INVALID_ID,
"TASK_GET_NOTE WITH ILLEGAL ID"
);
TEXT_IO.PUT_LINE( "TA1 - task_get_note - INVALID_ID" );
RTEMS.TASKS.IDENT(
RTEMS.SELF,
RTEMS.SEARCH_ALL_NODES,
@@ -295,38 +262,6 @@ package body SPTEST is
);
TEXT_IO.PUT_LINE( "TA1 - task_set_priority - INVALID_ID" );
begin
RTEMS.TASKS.SET_NOTE( RTEMS.SELF,
RTEMS.NOTEPAD_INDEX'LAST + 10,
NOTEPAD_VALUE,
STATUS
);
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.INVALID_NUMBER,
"TASK_SET_NOTE WITH ILLEGAL NOTEPAD"
);
TEXT_IO.PUT_LINE( "TA1 - task_set_note - INVALID_NUMBER" );
exception
when others =>
TEXT_IO.PUT_LINE(
"TA1 - task_set_note - INVALID_NUMBER -- constraint error"
);
end;
RTEMS.TASKS.SET_NOTE(
100,
RTEMS.NOTEPAD_INDEX'LAST,
NOTEPAD_VALUE,
STATUS
);
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
RTEMS.INVALID_ID,
"TASK_SET_NOTE WITH ILLEGAL ID"
);
TEXT_IO.PUT_LINE( "TA1 - task_set_note - INVALID_ID" );
RTEMS.TASKS.START( 100, SPTEST.TASK_1'ACCESS, 0, STATUS );
TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
STATUS,
+1 -1
View File
@@ -47,7 +47,7 @@ rtems_id tcb_to_id(
Thread_Control *tcb
)
{
return tcb->Object.id; /* Only for sp04 and sp07 */
return tcb->Object.id; /* Only for sp04 */
}
uint32_t milliseconds_per_tick(void)
-39
View File
@@ -99,7 +99,6 @@ package body TMTEST is
OVERHEAD : RTEMS.UNSIGNED32;
OLD_PRIORITY : RTEMS.TASKS.PRIORITY;
OLD_MODE : RTEMS.MODE;
OLD_NOTE : RTEMS.NOTEPAD_INDEX;
TIME : RTEMS.TIME_OF_DAY;
STATUS : RTEMS.STATUS_CODES;
begin
@@ -233,44 +232,6 @@ package body TMTEST is
STATUS
);
TIMER_DRIVER.INITIALIZE;
for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
loop
RTEMS.TASKS.SET_NOTE(
TMTEST.TASK_ID,
8,
10,
STATUS
);
end loop;
TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"TASK_SET_NOTE ",
TMTEST.END_TIME,
TIME_TEST_SUPPORT.OPERATION_COUNT,
OVERHEAD,
RTEMS_CALLING_OVERHEAD.TASK_SET_NOTE
);
TIMER_DRIVER.INITIALIZE;
for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
loop
RTEMS.TASKS.GET_NOTE(
TMTEST.TASK_ID,
8,
OLD_NOTE,
STATUS
);
end loop;
TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"TASK_GET_NOTE ",
TMTEST.END_TIME,
TIME_TEST_SUPPORT.OPERATION_COUNT,
OVERHEAD,
RTEMS_CALLING_OVERHEAD.TASK_GET_NOTE
);
TIME := (1988, 1, 1, 0, 0, 0, 0 );
TIMER_DRIVER.INITIALIZE;
-2
View File
@@ -69,8 +69,6 @@ package TMTEST is
-- + TASK_MODE which does not require a reschedule
-- + TASK_MODE which does require a reschedule
-- + TASK_MODE which causes a preemption *** TEST_TASK1 executes
-- + TASK_SET_NOTE
-- + TASK_GET_NOTE
-- + CLOCK_SET
-- + CLOCK_GET
--
@@ -150,36 +150,6 @@ package body DUMMY_RTEMS is
end TASK_MODE;
procedure TASK_GET_NOTE (
ID : in RTEMS.ID;
NOTEPAD : in RTEMS.NOTEPAD_INDEX;
NOTE : out RTEMS.UNSIGNED32;
RESULT : out RTEMS.STATUS_CODES
) is
pragma Unreferenced(ID);
pragma Unreferenced(NOTEPAD);
begin
NOTE := 0;
RESULT := RTEMS.SUCCESSFUL;
end TASK_GET_NOTE;
procedure TASK_SET_NOTE (
ID : in RTEMS.ID;
NOTEPAD : in RTEMS.NOTEPAD_INDEX;
NOTE : in RTEMS.UNSIGNED32;
RESULT : out RTEMS.STATUS_CODES
) is
pragma Unreferenced(ID);
pragma Unreferenced(NOTEPAD);
pragma Unreferenced(NOTE);
begin
RESULT := RTEMS.SUCCESSFUL;
end TASK_SET_NOTE;
procedure TASK_WAKE_WHEN (
TIME_BUFFER : in RTEMS.TIME_OF_DAY;
RESULT : out RTEMS.STATUS_CODES
@@ -87,20 +87,6 @@ package DUMMY_RTEMS is
RESULT : out RTEMS.STATUS_CODES
);
procedure TASK_GET_NOTE (
ID : in RTEMS.ID;
NOTEPAD : in RTEMS.NOTEPAD_INDEX;
NOTE : out RTEMS.UNSIGNED32;
RESULT : out RTEMS.STATUS_CODES
);
procedure TASK_SET_NOTE (
ID : in RTEMS.ID;
NOTEPAD : in RTEMS.NOTEPAD_INDEX;
NOTE : in RTEMS.UNSIGNED32;
RESULT : out RTEMS.STATUS_CODES
);
procedure TASK_WAKE_WHEN (
TIME_BUFFER : in RTEMS.TIME_OF_DAY;
RESULT : out RTEMS.STATUS_CODES
@@ -130,7 +130,6 @@ package body TMTEST is
IN_MODE : RTEMS.MODE;
MASK : RTEMS.MODE;
OUT_MODE : RTEMS.MODE;
NOTE : RTEMS.UNSIGNED32;
TIME : RTEMS.TIME_OF_DAY;
TIMEOUT : RTEMS.INTERVAL;
SIGNALS : RTEMS.SIGNAL_SET;
@@ -331,40 +330,6 @@ package body TMTEST is
0
);
-- TASK_GET_NOTE
TIMER_DRIVER.INITIALIZE;
for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
loop
DUMMY_RTEMS.TASK_GET_NOTE( ID, 1, NOTE, STATUS );
end loop;
TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"TASK_GET_NOTE",
TMTEST.END_TIME,
TIME_TEST_SUPPORT.OPERATION_COUNT,
OVERHEAD,
0
);
-- TASK_SET_NOTE
TIMER_DRIVER.INITIALIZE;
for INDEX in 1 .. TIME_TEST_SUPPORT.OPERATION_COUNT
loop
DUMMY_RTEMS.TASK_SET_NOTE( ID, 1, NOTE, STATUS );
end loop;
TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"TASK_SET_NOTE",
TMTEST.END_TIME,
TIME_TEST_SUPPORT.OPERATION_COUNT,
OVERHEAD,
0
);
-- TASK_WAKE_WHEN
TIME.YEAR := 2000;
-38
View File
@@ -203,44 +203,6 @@ package body RTEMS.Tasks is
end Mode;
procedure Get_Note
(ID : in RTEMS.ID;
Notepad : in RTEMS.Notepad_Index;
Note : out RTEMS.Unsigned32;
Result : out RTEMS.Status_Codes)
is
function Get_Note_Base
(ID : RTEMS.ID;
Notepad : RTEMS.Notepad_Index;
Note : access RTEMS.Unsigned32)
return RTEMS.Status_Codes;
pragma Import (C, Get_Note_Base, "rtems_task_get_note");
Note_Base : aliased RTEMS.Unsigned32;
begin
Result := Get_Note_Base (ID, Notepad, Note_Base'Access);
Note := Note_Base;
end Get_Note;
procedure Set_Note
(ID : in RTEMS.ID;
Notepad : in RTEMS.Notepad_Index;
Note : in RTEMS.Unsigned32;
Result : out RTEMS.Status_Codes)
is
function Set_Note_Base
(ID : RTEMS.ID;
Notepad : RTEMS.Notepad_Index;
Note : RTEMS.Unsigned32)
return RTEMS.Status_Codes;
pragma Import (C, Set_Note_Base, "rtems_task_set_note");
begin
Result := Set_Note_Base (ID, Notepad, Note);
end Set_Note;
procedure Variable_Add
(ID : in RTEMS.ID;
Task_Variable : in RTEMS.Address;
-2
View File
@@ -55,8 +55,6 @@ Both instruction and data caches are enabled.
8 rtems_task_mode: no reschedule 0
8 rtems_task_mode: reschedule -- returns to caller 3
8 rtems_task_mode: reschedule -- preempts caller 13
8 rtems_task_set_note 1
8 rtems_task_get_note 1
8 rtems_clock_set 4
8 rtems_clock_get 0
-2
View File
@@ -54,8 +54,6 @@ All tests were compiled with VARIANT=DEBUG
8 rtems_task_mode: no reschedule 5998 5995 2645
8 rtems_task_mode: reschedule -- returns to caller 12110 11764 6055
8 rtems_task_mode: reschedule -- preempts caller 33043 34773 18338
8 rtems_task_set_note 11869 11871 4356
8 rtems_task_get_note 12092 12087 4397
8 rtems_clock_set 33141 33145 10160
8 rtems_clock_get 2920 2921 811
-3
View File
@@ -54,8 +54,6 @@ Timer Source: Timer 2, 512KHz timer rate
rtems_task_mode: no reschedule 2
rtems_task_mode: reschedule -- returns to caller 15
rtems_task_mode: reschedule -- preempts caller 52
rtems_task_set_note 4
rtems_task_get_note 4
rtems_clock_set 14
rtems_clock_get 1
@@ -186,4 +184,3 @@ Timer Source: Timer 2, 512KHz timer rate
rtems_rate_monotonic_delete: inactive 25
rtems_rate_monotonic_delete: active 21
rtems_rate_monotonic_period: conclude periods -- caller blocks 23
+1 -16
View File
@@ -35,23 +35,9 @@ rtems_task_resume: task readied -- returns to caller 1
rtems_task_delete: ready task 15
*** END OF TEST 6 ***
*** TIME TEST 7 ***
*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priorityrtems_task_mode: reschedule -- preempts caller 0
rtems_task_set_priority: returns to caller 2
rtems_task_mode: obtain current mode101 0
rtems_task_mode: no reschedule 0
rtems_task_mode: reschedule -- returns to caller
2
rtems_task_set_note 1
rtems_task_get_note 0
rtems_clock_set 2
rtems_clock_get_tod 12
*** END OF TEST 8 ***
*** TIME TEST 9 ***
rtems_message_queue_create 43
rtems_message_queue_send: no waiting tasks 2
@@ -173,4 +159,3 @@ rtems_rate_monotonic_delete: active 3
rtems_rate_monotonic_period: conclude periods -- caller blocks 9
*** END OF TEST 29 ***
-2
View File
@@ -54,8 +54,6 @@ Column C: -o4 optimization
rtems_task_mode: no reschedule NC 6 6
rtems_task_mode: reschedule -- returns to caller NC 8 8
rtems_task_mode: reschedule -- preempts caller NC 31 30
rtems_task_set_note NC 8 8
rtems_task_get_note NC 9 8
rtems_clock_set NC 25 25
rtems_clock_get NC 2 2
-2
View File
@@ -53,8 +53,6 @@ Column B: 3.5.17 pre-release
rtems_task_mode: no reschedule 4 4
rtems_task_mode: reschedule -- returns to caller 20 17
rtems_task_mode: reschedule -- preempts caller 39 37
rtems_task_set_note 7 5
rtems_task_get_note 7 5
rtems_clock_set 17 16
rtems_clock_get 2 1
-2
View File
@@ -58,8 +58,6 @@ Column Y: unused
rtems_task_mode: no reschedule 114
rtems_task_mode: reschedule -- returns to caller 264
rtems_task_mode: reschedule -- preempts caller 836
rtems_task_set_note 236
rtems_task_get_note 232
rtems_clock_set 569
rtems_clock_get 107
-15
View File
@@ -176,19 +176,6 @@ rtems_task_delete: ready task 106
rtems_task_restart: suspended task -- preempts caller 68
*** END OF TEST 7 ***
*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priority 9
rtems_task_set_priority: returns to caller 21
rtems_task_mode: obtain current mode 4
rtems_task_mode: no reschedule 4
rtems_task_mode: reschedule -- returns to caller 13
rtems_task_mode: reschedule -- preempts caller 35
rtems_task_set_note 7
rtems_task_get_note 9
rtems_clock_set 30
rtems_clock_get 0
*** END OF TEST 8 ***
*** TIME TEST 9 ***
rtems_message_queue_create 81
rtems_message_queue_send: no waiting tasks 30
@@ -386,8 +373,6 @@ rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 1
rtems_task_wake_after 0
rtems_interrupt_catch 0
-2
View File
@@ -51,8 +51,6 @@ Instruction cache is enabled.
8 rtems_task_mode: no reschedule 6
8 rtems_task_mode: reschedule -- returns to caller 13
8 rtems_task_mode: reschedule -- preempts caller 35
8 rtems_task_set_note 12
8 rtems_task_get_note 13
8 rtems_clock_set 32
8 rtems_clock_get 3
-2
View File
@@ -55,8 +55,6 @@ Column B: unused
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 39
rtems_task_set_note 13
rtems_task_get_note 13
rtems_clock_set 33
rtems_clock_get 3
-2
View File
@@ -135,8 +135,6 @@ Timing tests:
rtems_task_mode: no reschedule 15
rtems_task_mode: reschedule -- returns to caller 20
rtems_task_mode: reschedule -- preempts caller 67
rtems_task_get_note 28
rtems_task_set_note 27
rtems_task_wake_after: yield -- returns to caller 16
rtems_task_wake_after: yields -- preempts caller 65
rtems_task_wake_when 116
-2
View File
@@ -55,8 +55,6 @@ Column B: unused
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 39
rtems_task_set_note 13
rtems_task_get_note 13
rtems_clock_set 33
rtems_clock_get 3
-2
View File
@@ -30,8 +30,6 @@ rtems_task_mode: obtain current mode 4
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 11
rtems_task_mode: reschedule -- preempts caller 27
rtems_task_set_note 9
rtems_task_get_note 10
rtems_task_set_priority: preempts caller 36
rtems_task_delete: calling task 92
rtems_task_ident 115
-3
View File
@@ -26,7 +26,6 @@ you need for this BSP!
In you project before you include confdefs.h, define some or all of the
following:
#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
#define CONFIGURE_INIT_TASK_STACK_SIZE x
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE x
#define CONFIGURE_INTERRUPT_STACK_SIZE x
@@ -88,8 +87,6 @@ rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 0
rtems_task_wake_after 0
rtems_interrupt_catch 0
-4
View File
@@ -29,8 +29,6 @@ you need for this BSP!
In you project before you include confdefs.h, define some or all of the
following:
#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
#define CONFIGURE_DISABLE_CLASSIC_NOTEPADS
#define CONFIGURE_INIT_TASK_STACK_SIZE x
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE x
#define CONFIGURE_INTERRUPT_STACK_SIZE x
@@ -92,8 +90,6 @@ rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 0
rtems_task_wake_after 0
rtems_interrupt_catch 0
-15
View File
@@ -182,19 +182,6 @@ rtems_task_delete: ready task 34
rtems_task_restart: suspended task -- preempts caller 22
*** END OF TEST 7 ***
*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priority 4
rtems_task_set_priority: returns to caller 9
rtems_task_mode: obtain current mode 1
rtems_task_mode: no reschedule 1
rtems_task_mode: reschedule -- returns to caller 3
rtems_task_mode: reschedule -- preempts caller 11
rtems_task_set_note 3
rtems_task_get_note 3
rtems_clock_set 9
rtems_clock_get 0
*** END OF TEST 8 ***
*** TIME TEST 9 ***
rtems_message_queue_create 37
rtems_message_queue_send: no waiting tasks 11
@@ -392,8 +379,6 @@ rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 0
rtems_task_wake_after 0
rtems_interrupt_catch 0
-15
View File
@@ -92,19 +92,6 @@ rtems_task_delete: ready task 19
rtems_task_restart: suspended task -- preempts caller 15
*** END OF TEST 7 ***
*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priority 1
rtems_task_set_priority: returns to caller 2
rtems_task_mode: obtain current mode 0
rtems_task_mode: no reschedule 0
rtems_task_mode: reschedule -- returns to caller 1
rtems_task_mode: reschedule -- preempts caller 13
rtems_task_set_note 1
rtems_task_get_note 1
rtems_clock_set 1
rtems_clock_get 4
*** END OF TEST 8 ***
*** TIME TEST 9 ***
rtems_message_queue_create 45
rtems_message_queue_send: no waiting tasks 2
@@ -289,8 +276,6 @@ rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 0
rtems_task_wake_after 0
rtems_interrupt_catch 0
-2
View File
@@ -57,8 +57,6 @@ Column B: unused
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 39
rtems_task_set_note 13
rtems_task_get_note 13
rtems_clock_set 33
rtems_clock_get 3
-2
View File
@@ -55,8 +55,6 @@ Column B: unused
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 39
rtems_task_set_note 13
rtems_task_get_note 13
rtems_clock_set 33
rtems_clock_get 3
-15
View File
@@ -63,19 +63,6 @@ rtems_task_delete: ready task 61
rtems_task_restart: suspended task -- preempts caller 44
*** END OF TEST 7 ***
*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priority 7
rtems_task_set_priority: returns to caller 16
rtems_task_mode: obtain current mode 4
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 11
rtems_task_mode: reschedule -- preempts caller 29
rtems_task_set_note 7
rtems_task_get_note 7
rtems_clock_set 21
rtems_clock_get 0
*** END OF TEST 8 ***
*** TIME TEST 9 ***
rtems_message_queue_create 89
@@ -299,8 +286,6 @@ rtems_task_suspend 0
rtems_task_resume 0
rtems_task_set_priority 0
rtems_task_mode 0
rtems_task_get_note 0
rtems_task_set_note 0
rtems_task_wake_when 1
rtems_task_wake_after 0
rtems_interrupt_catch 0
-13
View File
@@ -46,19 +46,6 @@ rtems_task_delete: ready task 69
rtems_task_restart: suspended task -- preempts caller 44
*** END OF TEST 7 ***
*** TIME TEST 8 ***
rtems_task_set_priority: obtain current priority 6
rtems_task_set_priority: returns to caller 17
rtems_task_mode: obtain current mode 3
rtems_task_mode: no reschedule 3
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 22
rtems_task_set_note 6
rtems_task_get_note 6
rtems_clock_set 22
rtems_clock_get 1
*** END OF TEST 8 ***
*** TIME TEST 9 ***
rtems_message_queue_create 55
rtems_message_queue_send: no waiting tasks 20
-2
View File
@@ -54,8 +54,6 @@ All tests were compiled with VARIANT=DEBUG
8 rtems_task_mode: no reschedule 847
8 rtems_task_mode: reschedule -- returns to caller 7803
8 rtems_task_mode: reschedule -- preempts caller 18542
8 rtems_task_set_note 1044
8 rtems_task_get_note 1046
8 rtems_clock_set 2777
8 rtems_clock_get 161
-2
View File
@@ -60,8 +60,6 @@ Column B:RTEMS compiled with 32 bit pointers and 32 bit unsigned32 types
rtems_task_mode: no reschedule 0 49
rtems_task_mode: reschedule -- returns to caller 0 232
rtems_task_mode: reschedule -- preempts caller 0 687
rtems_task_set_note 0 101
rtems_task_get_note 0 103
rtems_clock_set 0 237
rtems_clock_get 0 16
-2
View File
@@ -55,8 +55,6 @@ Column Y:
rtems_task_mode: no reschedule 5
rtems_task_mode: reschedule -- returns to caller 8
rtems_task_mode: reschedule -- preempts caller 39
rtems_task_set_note 13
rtems_task_get_note 13
rtems_clock_set 33
rtems_clock_get 3

Some files were not shown because too many files have changed in this diff Show More