Browse Source

[drivers/ipc] fix the recursive including if legacy enabled

Meco Man 1 year ago
parent
commit
bfe9fd3c13

+ 2 - 1
components/drivers/include/ipc/completion.h

@@ -9,7 +9,8 @@
 #ifndef COMPLETION_H_
 #ifndef COMPLETION_H_
 #define COMPLETION_H_
 #define COMPLETION_H_
 
 
-#include <rtthread.h>
+#include <rtdef.h>
+#include <rtconfig.h>
 
 
 /**
 /**
  * Completion
  * Completion

+ 2 - 1
components/drivers/include/ipc/dataqueue.h

@@ -9,7 +9,8 @@
 #ifndef DATAQUEUE_H__
 #ifndef DATAQUEUE_H__
 #define DATAQUEUE_H__
 #define DATAQUEUE_H__
 
 
-#include <rtthread.h>
+#include <rtdef.h>
+#include <rtconfig.h>
 
 
 #define RT_DATAQUEUE_EVENT_UNKNOWN   0x00
 #define RT_DATAQUEUE_EVENT_UNKNOWN   0x00
 #define RT_DATAQUEUE_EVENT_POP       0x01
 #define RT_DATAQUEUE_EVENT_POP       0x01

+ 2 - 1
components/drivers/include/ipc/pipe.h

@@ -10,7 +10,8 @@
 #ifndef PIPE_H__
 #ifndef PIPE_H__
 #define PIPE_H__
 #define PIPE_H__
 
 
-#include <rtthread.h>
+#include <rtdef.h>
+#include <rtconfig.h>
 
 
 /**
 /**
  * Pipe Device
  * Pipe Device

+ 3 - 0
components/drivers/include/ipc/poll.h

@@ -11,6 +11,9 @@
 #ifndef IPC_POLL_H__
 #ifndef IPC_POLL_H__
 #define IPC_POLL_H__
 #define IPC_POLL_H__
 
 
+#include <rtdef.h>
+#include <rtconfig.h>
+
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
 #endif
 #endif

+ 3 - 0
components/drivers/include/ipc/ringblk_buf.h

@@ -11,6 +11,9 @@
 #ifndef _RINGBLK_BUF_H_
 #ifndef _RINGBLK_BUF_H_
 #define _RINGBLK_BUF_H_
 #define _RINGBLK_BUF_H_
 
 
+#include <rtdef.h>
+#include <rtconfig.h>
+
 /*
 /*
  * Introduction:
  * Introduction:
  * The rbb is the ring buffer which is composed with many blocks. It is different from the ring buffer.
  * The rbb is the ring buffer which is composed with many blocks. It is different from the ring buffer.

+ 3 - 2
components/drivers/include/ipc/ringbuffer.h

@@ -10,12 +10,13 @@
 #ifndef RINGBUFFER_H__
 #ifndef RINGBUFFER_H__
 #define RINGBUFFER_H__
 #define RINGBUFFER_H__
 
 
+#include <rtdef.h>
+#include <rtconfig.h>
+
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-#include <rtthread.h>
-
 /* ring buffer */
 /* ring buffer */
 struct rt_ringbuffer
 struct rt_ringbuffer
 {
 {

+ 2 - 2
components/drivers/include/ipc/waitqueue.h

@@ -12,7 +12,8 @@
 #ifndef WAITQUEUE_H__
 #ifndef WAITQUEUE_H__
 #define WAITQUEUE_H__
 #define WAITQUEUE_H__
 
 
-#include <rtthread.h>
+#include <rtdef.h>
+#include <rtconfig.h>
 
 
 #define RT_WQ_FLAG_CLEAN    0x00
 #define RT_WQ_FLAG_CLEAN    0x00
 #define RT_WQ_FLAG_WAKEUP   0x01
 #define RT_WQ_FLAG_WAKEUP   0x01
@@ -51,7 +52,6 @@ void rt_wqueue_wakeup(rt_wqueue_t *queue, void *key);
     struct rt_wqueue_node name = {                      \
     struct rt_wqueue_node name = {                      \
         rt_current_thread,                              \
         rt_current_thread,                              \
         RT_LIST_OBJECT_INIT(((name).list)),             \
         RT_LIST_OBJECT_INIT(((name).list)),             \
-                                                        \
         function,                                       \
         function,                                       \
         0                                               \
         0                                               \
     }
     }

+ 2 - 1
components/drivers/include/ipc/workqueue.h

@@ -11,7 +11,8 @@
 #ifndef WORKQUEUE_H__
 #ifndef WORKQUEUE_H__
 #define WORKQUEUE_H__
 #define WORKQUEUE_H__
 
 
-#include <rtthread.h>
+#include <rtdef.h>
+#include <rtconfig.h>
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {

+ 0 - 1
components/drivers/ipc/completion.c

@@ -10,7 +10,6 @@
  */
  */
 
 
 #include <rthw.h>
 #include <rthw.h>
-#include <rtthread.h>
 #include <rtdevice.h>
 #include <rtdevice.h>
 
 
 #define RT_COMPLETED    1
 #define RT_COMPLETED    1

+ 1 - 2
components/drivers/ipc/dataqueue.c

@@ -9,9 +9,8 @@
  * 2016-10-31     armink       fix some resume push and pop thread bugs
  * 2016-10-31     armink       fix some resume push and pop thread bugs
  */
  */
 
 
-#include <rtthread.h>
-#include <rtdevice.h>
 #include <rthw.h>
 #include <rthw.h>
+#include <rtdevice.h>
 
 
 #define DATAQUEUE_MAGIC  0xbead0e0e
 #define DATAQUEUE_MAGIC  0xbead0e0e
 
 

+ 0 - 1
components/drivers/ipc/ringblk_buf.c

@@ -9,7 +9,6 @@
  */
  */
 
 
 #include <rthw.h>
 #include <rthw.h>
-#include <rtthread.h>
 #include <rtdevice.h>
 #include <rtdevice.h>
 
 
 /**
 /**

+ 0 - 1
components/drivers/ipc/ringbuffer.c

@@ -12,7 +12,6 @@
  * 2021-08-14     Jackistang   add comments for function interface.
  * 2021-08-14     Jackistang   add comments for function interface.
  */
  */
 
 
-#include <rtthread.h>
 #include <rtdevice.h>
 #include <rtdevice.h>
 #include <string.h>
 #include <string.h>
 
 

+ 0 - 2
components/drivers/ipc/waitqueue.c

@@ -11,10 +11,8 @@
  */
  */
 
 
 #include <stdint.h>
 #include <stdint.h>
-
 #include <rthw.h>
 #include <rthw.h>
 #include <rtdevice.h>
 #include <rtdevice.h>
-#include <rtservice.h>
 
 
 /**
 /**
  * @brief    This function will insert a node to the wait queue.
  * @brief    This function will insert a node to the wait queue.

+ 0 - 1
components/drivers/ipc/workqueue.c

@@ -12,7 +12,6 @@
  */
  */
 
 
 #include <rthw.h>
 #include <rthw.h>
-#include <rtthread.h>
 #include <rtdevice.h>
 #include <rtdevice.h>
 
 
 #ifdef RT_USING_HEAP
 #ifdef RT_USING_HEAP