[PATCH 1/2] cpukit/task{set,get}note.c: Remove obsolete Notepads

Joel Sherrill joel at rtems.org
Mon Dec 21 19:15:00 UTC 2015


On Dec 21, 2015 1:07 PM, "Sebastian Huber" <
sebastian.huber at embedded-brains.de> wrote:
>
> Do we want to remove the task note functions so that an application gets
compiler and linker errors or warnings? Or do we make the functions empty
and return an error status code?

These were really bad APIs long before SMP was a consideration. I would be
happy to see them completely gone.

We need to capture their removal in a 4.12 release notes with transition
info. We weren't good at this for 4.11.  Perhaps the manual can replace the
text section on them with a note they are gone as of 4.12 and you should
use TLS or keys.

>
> ----- Am 21. Dez 2015 um 19:32 schrieb Joel Sherrill joel at rtems.org:
>
> > To remove notepads fully, the documentation and testsuites
> > should also be touched. There should be more in the patch.
> >
> > --joel
> >
> > On Mon, Dec 21, 2015 at 1:15 AM, Sebastian Huber <
> > sebastian.huber at embedded-brains.de> wrote:
> >
> >> On 21/12/15 02:13, Aun-Ali Zaidi wrote:
> >>
> >>> updates #2493.
> >>> ---
> >>>   cpukit/rtems/include/rtems/rtems/tasks.h | 2 +-
> >>>   cpukit/rtems/src/taskgetnote.c           | 2 --
> >>>   cpukit/rtems/src/tasksetnote.c           | 2 --
> >>>   3 files changed, 1 insertion(+), 5 deletions(-)
> >>>
> >>> diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h
> >>> b/cpukit/rtems/include/rtems/rtems/tasks.h
> >>> index 1ad537d..114624d 100644
> >>> --- a/cpukit/rtems/include/rtems/rtems/tasks.h
> >>> +++ b/cpukit/rtems/include/rtems/rtems/tasks.h
> >>> @@ -678,7 +678,7 @@ typedef struct {
> >>>      *
> >>>      *  @note MUST BE LAST ENTRY.
> >>>      */
> >>> -  uint32_t Notepads[ RTEMS_ZERO_LENGTH_ARRAY ] RTEMS_DEPRECATED;
> >>> +  //uint32_t Notepads[ RTEMS_ZERO_LENGTH_ARRAY ] RTEMS_DEPRECATED;
> >>>
> >>
> >> Please don't use comments or #if 0 to remove things.
> >>
> >>   }  RTEMS_API_Control;
> >>>     /**
> >>> diff --git a/cpukit/rtems/src/taskgetnote.c
> >>> b/cpukit/rtems/src/taskgetnote.c
> >>> index c097d9c..ba40d2e 100644
> >>> --- a/cpukit/rtems/src/taskgetnote.c
> >>> +++ b/cpukit/rtems/src/taskgetnote.c
> >>> @@ -60,7 +60,6 @@ rtems_status_code rtems_task_get_note(
> >>>     if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
> >>>          _Objects_Are_ids_equal( id, executing->Object.id ) ) {
> >>>         api = executing->API_Extensions[ THREAD_API_RTEMS ];
> >>> -      *note = api->Notepads[ notepad ];
> >>>         return RTEMS_SUCCESSFUL;
> >>>     }
> >>>   @@ -69,7 +68,6 @@ rtems_status_code rtems_task_get_note(
> >>>         case OBJECTS_LOCAL:
> >>>         api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
> >>> -      *note = api->Notepads[ notepad ];
> >>>         _Objects_Put( &the_thread->Object );
> >>>         return RTEMS_SUCCESSFUL;
> >>>
> >>>
> >>
> >> What is the purpose of this function after your change?
> >>
> >> --
> >> Sebastian Huber, embedded brains GmbH
> >>
> >> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> >> Phone   : +49 89 189 47 41-16
> >> Fax     : +49 89 189 47 41-09
> >> E-Mail  : sebastian.huber at embedded-brains.de
> >> PGP     : Public key available on request.
> >>
> >> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> >>
> >>
> >> _______________________________________________
> >> devel mailing list
> >> devel at rtems.org
> >> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20151221/b26e8de4/attachment-0002.html>


More information about the devel mailing list