summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-07 14:27:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-07 14:27:47 +0000
commit24151ccd83ce2d0d75bb9c45b137215c24c821c3 (patch)
treed9adb44a8128e7f408bbd16450f40f80da9e0e92 /nuttx/include
parentce376ed9e145fe7b9c0215e93bfebf0893ecf7b3 (diff)
downloadpx4-nuttx-24151ccd83ce2d0d75bb9c45b137215c24c821c3.tar.gz
px4-nuttx-24151ccd83ce2d0d75bb9c45b137215c24c821c3.tar.bz2
px4-nuttx-24151ccd83ce2d0d75bb9c45b137215c24c821c3.zip
More kernel build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5716 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/sdio.h12
-rw-r--r--nuttx/include/nuttx/wqueue.h4
2 files changed, 14 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/sdio.h b/nuttx/include/nuttx/sdio.h
index 10612db85..d5b15370d 100644
--- a/nuttx/include/nuttx/sdio.h
+++ b/nuttx/include/nuttx/sdio.h
@@ -45,6 +45,7 @@
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
+
#include <nuttx/wqueue.h>
/****************************************************************************
@@ -658,7 +659,9 @@
* thread.
*
* When this method is called, all callbacks should be disabled until they
- * are enabled via a call to SDIO_CALLBACKENABLE
+ * are enabled via a call to SDIO_CALLBACKENABLE.
+ *
+ * NOTE: High-priority work queue support is required.
*
* Input Parameters:
* dev - Device-specific state data
@@ -670,7 +673,9 @@
*
****************************************************************************/
-#define SDIO_REGISTERCALLBACK(d,c,a) ((d)->registercallback(d,c,a))
+#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_HPWORK)
+# define SDIO_REGISTERCALLBACK(d,c,a) ((d)->registercallback(d,c,a))
+#endif
/****************************************************************************
* Name: SDIO_DMASUPPORTED
@@ -819,8 +824,11 @@ struct sdio_dev_s
sdio_eventset_t (*eventwait)(FAR struct sdio_dev_s *dev, uint32_t timeout);
void (*callbackenable)(FAR struct sdio_dev_s *dev,
sdio_eventset_t eventset);
+
+#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_HPWORK)
int (*registercallback)(FAR struct sdio_dev_s *dev,
worker_t callback, void *arg);
+#endif
/* DMA. CONFIG_SDIO_DMA should be set if the driver supports BOTH DMA
* and non-DMA transfer modes. If the driver supports only one mode
diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h
index e76cdfd28..e1b9de91c 100644
--- a/nuttx/include/nuttx/wqueue.h
+++ b/nuttx/include/nuttx/wqueue.h
@@ -116,6 +116,10 @@
/* To preserve legacy behavior, CONFIG_SCHED_HPWORK is assumed to be true
* in a flat build (CONFIG_SCHED_KERNEL=n) but must be defined in kernel
* mode in order to build the high priority work queue.
+ *
+ * In the kernel build, it is possible that no kernel work queues will be
+ * built. But in the flat build, the high priority work queue will always
+ * be built.
*/
# undef CONFIG_SCHED_HPWORK