diff options
-rw-r--r-- | apps/Makefile | 4 | ||||
-rw-r--r-- | nuttx/drivers/Makefile | 6 | ||||
-rw-r--r-- | nuttx/include/nuttx/pthread.h | 5 | ||||
-rw-r--r-- | nuttx/lib/pthread/pthread_attrinit.c | 10 |
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 ****************************************************************************/ |