summaryrefslogtreecommitdiffstats
path: root/c/src/ada-tests/sptests/sp07/sptest.adb
diff options
context:
space:
mode:
authorAun-Ali Zaidi <admin@kodeit.net>2015-12-23 14:44:02 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-12-24 16:52:34 -0600
commitd5154d0f6a04f3b7ed59d9a09038576fe2640756 (patch)
tree4b6dcf6e9b116223903afbc1b1141d28fb751848 /c/src/ada-tests/sptests/sp07/sptest.adb
parentscore: Fix watchdog removal (diff)
downloadrtems-d5154d0f6a04f3b7ed59d9a09038576fe2640756.tar.bz2
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.
Diffstat (limited to 'c/src/ada-tests/sptests/sp07/sptest.adb')
-rw-r--r--c/src/ada-tests/sptests/sp07/sptest.adb46
1 files changed, 0 insertions, 46 deletions
diff --git a/c/src/ada-tests/sptests/sp07/sptest.adb b/c/src/ada-tests/sptests/sp07/sptest.adb
index 300ad90d50..d55aa73bf8 100644
--- a/c/src/ada-tests/sptests/sp07/sptest.adb
+++ b/c/src/ada-tests/sptests/sp07/sptest.adb
@@ -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);