Changeset 80b3c938 in rtems


Ignore:
Timestamp:
May 17, 2021, 2:55:15 PM (5 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d45f87c
Parents:
9918735
git-author:
Sebastian Huber <sebastian.huber@…> (05/17/21 14:55:15)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/17/21 15:30:39)
Message:

score: Move _Thread_queue_Queue_get_name_and_id()

Move this diagnostic function to a separate file since it does not
provide a core function of the system.

Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    r9918735 r80b3c938  
    986986librtemscpu_a_SOURCES += score/src/threadqfirst.c
    987987librtemscpu_a_SOURCES += score/src/threadqflush.c
     988librtemscpu_a_SOURCES += score/src/threadqgetnameandid.c
    988989librtemscpu_a_SOURCES += score/src/threadqops.c
    989990librtemscpu_a_SOURCES += score/src/threadqtimeout.c
  • cpukit/score/src/threadq.c

    r9918735 r80b3c938  
    2626#endif
    2727
    28 #include <string.h>
    29 
    3028#include <rtems/score/threadqimpl.h>
    31 #include <rtems/score/rbtreeimpl.h>
    32 #include <rtems/score/threadimpl.h>
    3329
    3430RTEMS_STATIC_ASSERT(
     
    167163}
    168164#endif
    169 
    170 size_t _Thread_queue_Queue_get_name_and_id(
    171   const Thread_queue_Queue *queue,
    172   char                     *buffer,
    173   size_t                    buffer_size,
    174   Objects_Id               *id
    175 )
    176 {
    177   const char *name;
    178 
    179   name = queue->name;
    180 
    181   if ( name == _Thread_queue_Object_name ) {
    182     const Thread_queue_Object *queue_object;
    183 
    184     queue_object = THREAD_QUEUE_QUEUE_TO_OBJECT( queue );
    185     *id = queue_object->Object.id;
    186     return _Objects_Name_to_string(
    187       queue_object->Object.name,
    188       false,
    189       buffer,
    190       buffer_size
    191     );
    192   } else {
    193     if ( name == NULL ) {
    194       name = _Thread_queue_Object_name;
    195     }
    196 
    197     *id = 0;
    198     return strlcpy( buffer, name, buffer_size );
    199   }
    200 }
  • spec/build/cpukit/librtemscpu.yml

    r9918735 r80b3c938  
    15441544- cpukit/score/src/threadqfirst.c
    15451545- cpukit/score/src/threadqflush.c
     1546- cpukit/score/src/threadqgetnameandid.c
    15461547- cpukit/score/src/threadqops.c
    15471548- cpukit/score/src/threadqtimeout.c
Note: See TracChangeset for help on using the changeset viewer.