summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-04 21:02:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-04 21:02:15 +0000
commitf83c9b840d045664f99114a3c71bbdab5744367c (patch)
tree3602ca8c7183758518ccac50565e03c50a0cbec0
parent07bac0e795ae446d6a2f1e9ab3da5d9f7cdfef0a (diff)
downloadnuttx-f83c9b840d045664f99114a3c71bbdab5744367c.tar.gz
nuttx-f83c9b840d045664f99114a3c71bbdab5744367c.tar.bz2
nuttx-f83c9b840d045664f99114a3c71bbdab5744367c.zip
Fix a couple of recently introduced build problems
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3463 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--apps/Makefile4
-rw-r--r--nuttx/drivers/Makefile6
-rw-r--r--nuttx/include/nuttx/pthread.h5
-rw-r--r--nuttx/lib/pthread/pthread_attrinit.c10
4 files changed, 18 insertions, 7 deletions
diff --git a/apps/Makefile b/apps/Makefile
index f440827b0..43778e76d 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -76,9 +76,7 @@ all: $(BIN)
.PHONY: $(BUILTIN_APPS_DIR) context depend clean distclean
$(BUILTIN_APPS_DIR):
- @for dir in $(BUILTIN_APPS_DIR) ; do \
- $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \
- done
+ @$(MAKE) -C $@ TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR);
$(BIN): $(BUILTIN_APPS_DIR)
@( for obj in $(OBJS) ; do \
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile
index 01143a071..68f342754 100644
--- a/nuttx/drivers/Makefile
+++ b/nuttx/drivers/Makefile
@@ -115,7 +115,7 @@ endif
endif
CSRCS += $(SERIAL_CSRCS) $(NET_CSRCS) $(PIPE_CSRCS) $(USBDEV_CSRCS) \
$(USBHOST_CSRCS) $(MMCSD_CSRCS) $(LCD_CSRCS) $(BCH_CSRCS) \
- $(MTD_CSRCS)
+ $(MTD_CSRCS) $(I2C_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
@@ -123,7 +123,7 @@ OBJS = $(AOBJS) $(COBJS)
BIN = libdrivers$(LIBEXT)
-VPATH = serial:net:pipes:usbdev:usbhost:mmcsd:lcd:bch:mtd
+VPATH = serial:net:pipes:usbdev:usbhost:mmcsd:lcd:bch:mtd:i2c
all: $(BIN)
@@ -141,7 +141,7 @@ $(BIN): $(OBJS)
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(SERIALDEPPATH) $(NETDEPPATH) $(PIPEDEPPATH) \
$(USBDEVDEPPATH) $(USBHOSTDEPPATH) $(MMCSDDEPPATH) $(LCDDEPPATH) \
- $(BCHDEPPATH) $(MTDDEPPATH) \
+ $(BCHDEPPATH) $(MTDDEPPATH) $(I2CDEPPATH)\
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
diff --git a/nuttx/include/nuttx/pthread.h b/nuttx/include/nuttx/pthread.h
index 449c189cb..8165f1b84 100644
--- a/nuttx/include/nuttx/pthread.h
+++ b/nuttx/include/nuttx/pthread.h
@@ -43,6 +43,7 @@
#include <nuttx/config.h>
#include <pthread.h>
+#include <sched.h>
/****************************************************************************
* Pre-Processor Definitions
@@ -62,7 +63,9 @@
* Public Data
****************************************************************************/
-/* Default pthread attributes (see sched/pthread_create.c) */
+/* Default pthread attributes (see sched/pthread_create.c). This global
+ * can only be shared within the kernel- or within the user- address space.
+ */
extern pthread_attr_t g_default_pthread_attr;
diff --git a/nuttx/lib/pthread/pthread_attrinit.c b/nuttx/lib/pthread/pthread_attrinit.c
index fc9ee0274..7df73e54b 100644
--- a/nuttx/lib/pthread/pthread_attrinit.c
+++ b/nuttx/lib/pthread/pthread_attrinit.c
@@ -58,6 +58,16 @@
* Global Variables
****************************************************************************/
+/* Default pthread attributes (see included/nuttx/pthread.h). When configured
+ * to build separate kernel- and user-address spaces, this global is
+ * duplicated in each address spaced. This copy can only be shared within
+ * the user address space.
+ */
+
+#if defined(CONFIG_NUTTX_KERNEL) && !defined(__KERNEL__)
+pthread_attr_t g_default_pthread_attr = PTHREAD_ATTR_INITIALIZER;
+#endif
+
/****************************************************************************
* Private Variables
****************************************************************************/