Skip to content

Commit

Permalink
[kenel] add static name for rt_object
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterywolf committed Sep 12, 2022
1 parent 19106eb commit 43d2763
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/rtdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,11 @@ typedef struct rt_slist_node rt_slist_t; /**< Type for single lis
*/
struct rt_object
{
char name[RT_NAME_MAX]; /**< name of kernel object */
#if RT_NAME_MAX == 0
const char *name; /**< static name of kernel object */
#else
char name[RT_NAME_MAX]; /**< dynamic name of kernel object */
#endif
rt_uint8_t type; /**< type of kernel object */
rt_uint8_t flag; /**< flag of kernel object */

Expand Down

0 comments on commit 43d2763

Please sign in to comment.