Decouple the user-space work queue from the kernel space work queues

This commit is contained in:
Gregory Nutt
2014-10-11 15:50:22 -06:00
parent c38b81431f
commit 9292e3d9de
16 changed files with 202 additions and 205 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
#
############################################################################
ifeq ($(CONFIG_SCHED_WORKQUEUE),y)
ifeq ($(CONFIG_SCHED_USRWORK),y)
# Add the work queue C files to the build
+2 -3
View File
@@ -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__ */
+2 -3
View File
@@ -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__*/
+2 -3
View File
@@ -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__ */
+1 -2
View File
@@ -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 */
+2 -3
View File
@@ -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__*/
+2 -7
View File
@@ -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 */