mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Decouple the user-space work queue from the kernel space work queues
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_SCHED_WORKQUEUE),y)
|
||||
ifeq ($(CONFIG_SCHED_USRWORK),y)
|
||||
|
||||
# Add the work queue C files to the build
|
||||
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
|
||||
#include "wqueue/wqueue.h"
|
||||
|
||||
#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_USRWORK) && \
|
||||
!defined(__KERNEL__)
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -163,4 +162,4 @@ int work_cancel(int qid, FAR struct work_s *work)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SCHED_WORKQUEUE && CONFIG_SCHED_USRWORK && !__KERNEL__ */
|
||||
#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ */
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
|
||||
#include "wqueue/wqueue.h"
|
||||
|
||||
#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_USRWORK) && \
|
||||
!defined(__KERNEL__)
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -136,4 +135,4 @@ void work_unlock(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SCHED_WORKQUEUE && CONFIG_SCHED_USRWORK && !__KERNEL__*/
|
||||
#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__*/
|
||||
|
||||
@@ -50,8 +50,7 @@
|
||||
|
||||
#include "wqueue/wqueue.h"
|
||||
|
||||
#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_USRWORK) && \
|
||||
!defined(__KERNEL__)
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -175,4 +174,4 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SCHED_WORKQUEUE && CONFIG_SCHED_USRWORK && !__KERNEL__ */
|
||||
#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ */
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
#include "wqueue/wqueue.h"
|
||||
|
||||
#ifdef CONFIG_SCHED_WORKQUEUE
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -113,4 +113,3 @@ int work_signal(int qid)
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__ */
|
||||
#endif /* CONFIG_SCHED_WORKQUEUE */
|
||||
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
#include "wqueue/wqueue.h"
|
||||
|
||||
#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_USRWORK) && \
|
||||
!defined(__KERNEL__)
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -404,4 +403,4 @@ int work_usrstart(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SCHED_WORKQUEUE && CONFIG_SCHED_USRWORK && !__KERNEL__*/
|
||||
#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__*/
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#include <nuttx/wqueue.h>
|
||||
|
||||
#ifdef CONFIG_SCHED_WORKQUEUE
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -70,7 +70,6 @@ struct usr_wqueue_s
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
/* The state of the user mode work queue */
|
||||
|
||||
extern struct usr_wqueue_s g_usrwork;
|
||||
@@ -105,9 +104,7 @@ extern pthread_mutex_t g_usrmutex;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
int work_lock(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: work_unlock
|
||||
@@ -123,9 +120,7 @@ int work_lock(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SCHED_USRWORK) && !defined(__KERNEL__)
|
||||
void work_unlock(void);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_SCHED_WORKQUEUE */
|
||||
#endif /* CONFIG_SCHED_USRWORK && !__KERNEL__*/
|
||||
#endif /* __LIBC_WQUEUE_WQUEUE_H */
|
||||
|
||||
Reference in New Issue
Block a user