Skip to content

Commit d61f3a7

Browse files
pawpawhecarlescufi
authored andcommitted
samples: metairq_dispatch: use name msgdev.h instead of main.h
Normally main.c file doesn't have a header, beacuse it doesn't need to be declared to other modules. And in this sample it makes more sense to use name msgdev.h instead of main.h as the header file for msgdev.c. Signed-off-by: Paul He <[email protected]>
1 parent 82925a8 commit d61f3a7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

samples/kernel/metairq_dispatch/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#include <zephyr.h>
7-
#include "main.h"
7+
#include "msgdev.h"
88

99
#include <logging/log.h>
1010
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);

samples/kernel/metairq_dispatch/src/msgdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#include <timeout_q.h>
7-
#include "main.h"
7+
#include "msgdev.h"
88

99
/* This file implements a fake device that creates and enqueues
1010
* "struct msg" messages for handling by the rest of the test. It's

samples/kernel/metairq_dispatch/src/main.h renamed to samples/kernel/metairq_dispatch/src/msgdev.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
#ifndef SAMPLE_METAIRQ_MAIN_H
6+
#ifndef __MSGDEV_H__
7+
#define __MSGDEV_H__
78

89
/* Define this to enable logging of every event as it is processed to
910
* carefully inspect behavior. Note that at high event rates (see
@@ -67,4 +68,4 @@ void message_dev_init(void);
6768
*/
6869
void message_dev_fetch(struct msg *m);
6970

70-
#endif
71+
#endif /* __MSGDEV_H__ */

0 commit comments

Comments
 (0)