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
@@ -123,7 +123,6 @@ class Io_during_interrupt
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
#define CONFIGURE_TICKS_PER_TIMESLICE 100
#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-69
View File
@@ -259,75 +259,6 @@ void Task1::screen2(void)
task_2.set_priority(current_priority, priority);
printf("%s, priority was %" PRIirtems_task_priority "\n", task_2.last_status_string(), priority);
uint32_t current_note;
uint32_t note;
// notepad registers for this object
printf("%s - get note - ", name_string());
get_note(0, current_note);
printf("%s, note is %" PRIi32 "\n", last_status_string(), current_note);
printf("%s - get with bad notepad number - ", name_string());
get_note(100, current_note);
printf("%s, note is %" PRIi32 "\n", last_status_string(), current_note);
printf("%s - set note to 0xDEADBEEF - ", name_string());
set_note(0, 0xDEADBEEF);
printf("%s\n", last_status_string());
printf("%s - get note - ", name_string());
get_note(0, note);
printf("%s, note is 0x%08" PRIX32 "\n", last_status_string(), note);
printf("%s - set note to original value - ", name_string());
set_note(0, current_note);
printf("%s\n", last_status_string());
// notepad registers for connected object
printf("%s - connected object get note - ", task_1.name_string());
task_1.get_note(0, current_note);
printf("%s, notepad is %" PRIi32 "\n", task_1.last_status_string(), current_note);
printf("%s - connected object get with bad notepad number - ", task_1.name_string());
task_1.get_note(100, current_note);
printf("%s, note is %" PRIi32 "\n", task_1.last_status_string(), current_note);
printf("%s - connected object set note to 0xDEADBEEF - ", task_1.name_string());
task_1.set_note(0, 0xDEADBEEF);
printf("%s\n", task_1.last_status_string());
printf("%s - connected object get note - ", task_1.name_string());
task_1.get_note(0, note);
printf("%s, note is 0x%08" PRIX32 "\n", task_1.last_status_string(), note);
printf("%s - connected object set note to original value - ", task_1.name_string());
task_1.set_note(0, current_note);
printf("%s\n", task_1.last_status_string());
// notepad registers for self object
printf("%s - self object get note - ", task_2.name_string());
task_2.get_note(0, current_note);
printf("%s, note is %" PRIi32 "\n", task_2.last_status_string(), current_note);
printf("%s - self object get with bad notepad number - ", task_2.name_string());
task_2.get_note(100, current_note);
printf("%s, note is %" PRIi32 "\n", task_2.last_status_string(), current_note);
printf("%s - self object set note to 0xDEADBEEF - ", task_2.name_string());
task_2.set_note(0, 0xDEADBEEF);
printf("%s\n", task_2.last_status_string());
printf("%s - self object get note - ", task_2.name_string());
task_2.get_note(0, note);
printf("%s, notepad is 0x%08" PRIX32 "\n", task_2.last_status_string(), note);
printf("%s - self object set note to original value - ", task_2.name_string());
task_2.set_note(0, current_note);
printf("%s\n", task_2.last_status_string());
printf(" END Task Class test\n");
}
-15
View File
@@ -44,21 +44,6 @@ SELF - self object get priority - RTEMS[00] successful completion, priority is 1
SELF - self object set priority to 512 - RTEMS[19] invalid thread priority
SELF - self object set priority to 25 - RTEMS[00] successful completion
SELF - self object set priority to original - RTEMS[00] successful completion, priority was 25
TA1 - get note - RTEMS[00] successful completion, note is 0
TA1 - get with bad notepad number - RTEMS[10] number was invalid, note is 0
TA1 - set note to 0xDEADBEEF - RTEMS[00] successful completion
TA1 - get note - RTEMS[00] successful completion, note is 0xDEADBEEF
TA1 - set note to original value - RTEMS[00] successful completion
TA1 - connected object get note - RTEMS[00] successful completion, notepad is 0
TA1 - connected object get with bad notepad number - RTEMS[10] number was invalid, note is 0
TA1 - connected object set note to 0xDEADBEEF - RTEMS[00] successful completion
TA1 - connected object get note - RTEMS[00] successful completion, note is 0xDEADBEEF
TA1 - connected object set note to original value - RTEMS[00] successful completion
SELF - self object get note - RTEMS[00] successful completion, note is 0
SELF - self object get with bad notepad number - RTEMS[10] number was invalid, note is 0
SELF - self object set note to 0xDEADBEEF - RTEMS[00] successful completion
SELF - self object get note - RTEMS[00] successful completion, notepad is 0xDEADBEEF
SELF - self object set note to original value - RTEMS[00] successful completion
END Task Class test
<pause - screen 3>
START TaskMode Class test