summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-05 18:57:51 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-05 18:57:51 +0000
commit7b06c73d1d766cd3376be29dccbd28a16e3f385b (patch)
tree20b00664065816849ca8f29e46281759085270ba
parenteb573ac290c8f1a6bcb0816c8552ca88278cda11 (diff)
downloadnuttx-7b06c73d1d766cd3376be29dccbd28a16e3f385b.tar.gz
nuttx-7b06c73d1d766cd3376be29dccbd28a16e3f385b.tar.bz2
nuttx-7b06c73d1d766cd3376be29dccbd28a16e3f385b.zip
Move work queue logic from sched/ to libc/wqueue. It is not core logic and will be extended to support user-space work queues
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5711 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/ChangeLog8
-rw-r--r--nuttx/arch/arm/src/lpc17xx/Kconfig41
-rw-r--r--nuttx/configs/lincoln60/README.txt2
-rw-r--r--nuttx/configs/lincoln60/nsh/defconfig2
-rw-r--r--nuttx/configs/lincoln60/ostest/defconfig2
-rw-r--r--nuttx/configs/lpcxpresso-lpc1768/README.txt2
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig2
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nsh/defconfig2
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nx/defconfig2
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/ostest/defconfig2
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig2
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig2
-rw-r--r--nuttx/configs/mbed/README.txt2
-rw-r--r--nuttx/configs/mbed/hidkbd/defconfig2
-rwxr-xr-xnuttx/configs/mbed/nsh/defconfig2
-rw-r--r--nuttx/configs/nucleus2g/README.txt2
-rwxr-xr-xnuttx/configs/nucleus2g/nsh/defconfig2
-rwxr-xr-xnuttx/configs/nucleus2g/ostest/defconfig2
-rwxr-xr-xnuttx/configs/nucleus2g/usbserial/defconfig2
-rwxr-xr-xnuttx/configs/nucleus2g/usbstorage/defconfig2
-rw-r--r--nuttx/configs/olimex-lpc1766stk/README.txt2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/ftpc/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/hidkbd/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nettest/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nsh/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nx/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/ostest/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/thttpd/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/usbserial/defconfig2
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/usbstorage/defconfig2
-rw-r--r--nuttx/configs/open1788/nsh/defconfig10
-rw-r--r--nuttx/configs/open1788/ostest/defconfig2
-rw-r--r--nuttx/configs/zkit-arm-1769/README.txt2
-rw-r--r--nuttx/configs/zkit-arm-1769/hello/defconfig2
-rw-r--r--nuttx/configs/zkit-arm-1769/nsh/defconfig2
-rw-r--r--nuttx/configs/zkit-arm-1769/thttpd/defconfig2
-rw-r--r--nuttx/include/nuttx/kmalloc.h26
-rw-r--r--nuttx/include/nuttx/wqueue.h78
-rw-r--r--nuttx/libc/Makefile3
-rw-r--r--nuttx/libc/wqueue/Make.defs47
-rw-r--r--nuttx/libc/wqueue/work_cancel.c (renamed from nuttx/sched/work_cancel.c)6
-rw-r--r--nuttx/libc/wqueue/work_queue.c (renamed from nuttx/sched/work_queue.c)6
-rw-r--r--nuttx/libc/wqueue/work_signal.c (renamed from nuttx/sched/work_signal.c)6
-rw-r--r--nuttx/libc/wqueue/work_thread.c (renamed from nuttx/sched/work_thread.c)8
-rw-r--r--nuttx/sched/Makefile6
-rw-r--r--nuttx/sched/os_bringup.c3
-rw-r--r--nuttx/sched/os_internal.h1
-rw-r--r--nuttx/sched/work_internal.h114
49 files changed, 230 insertions, 201 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index f345af811..abfdcf6da 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -4246,8 +4246,14 @@
file (2013-03-04).
* configs/open1788: Enable LED support in all configurations.
(2013-03-04)
+ * configs/open1788/nsh: NSH configuration verified function. By Rommel
+ Marcelo (2013-03-05).
* configs/open1788/src/lpc17_nsh.c: Use the SD card interface, not SPI
- to interface with SD cards.
+ to interface with SD cards (2013-03-05.
* arch/arm/src/lpc17xx/lpc17_sdcard.c and header files: Clone the STM32
SD card interface to the LPC1788. It appears to be the same IP.
+ (2013-03-05)
+ * libc/wqueue: Work queue logic moved from sched/ to libc/wqueue. It
+ is not really core OS functionality and this move helps prepare for
+ user-space work queues.
diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig
index 81ca87f04..797711fdc 100644
--- a/nuttx/arch/arm/src/lpc17xx/Kconfig
+++ b/nuttx/arch/arm/src/lpc17xx/Kconfig
@@ -150,6 +150,11 @@ config LPC17_ETHERNET
select ARCH_HAVE_PHY
default n
+config LPC17_LCD
+ bool "LCD controller"
+ default n
+ depends on ARCH_FAMILY_LPC177X || ARCH_FAMILY_LPC178X
+
config LPC17_USBHOST
bool "USB host"
select USBHOST
@@ -190,6 +195,11 @@ config LPC17_UART3
select ARCH_HAVE_UART3
default n
+config LPC17_UART4
+ bool "UART4"
+ select ARCH_HAVE_UART4
+ default n
+
config LPC17_CAN1
bool "CAN1"
select ARCH_HAVE_UART4
@@ -202,6 +212,7 @@ config LPC17_CAN2
config LPC17_SPI
bool "SPI"
default n
+ depends on ARCH_FAMILY_LPC175X || ARCH_FAMILY_LPC176X
config LPC17_SSP0
bool "SSP0"
@@ -211,6 +222,11 @@ config LPC17_SSP1
bool "SSP1"
default n
+config LPC17_SSP2
+ bool "SSP1"
+ default n
+ depends on ARCH_FAMILY_LPC177X || ARCH_FAMILY_LPC178X
+
config LPC17_SPIFI
bool "SPIFI Interface"
depends on ARCH_HAVE_SPIFI
@@ -252,13 +268,19 @@ config LPC17_RIT
bool "RIT"
default n
-config LPC17_PWM
- bool "PWM"
+config LPC17_PWM0
+ bool "PWM0"
default n
+config LPC17_PWM1
+ bool "PWM1"
+ default n
+ depends on ARCH_FAMILY_LPC177X || ARCH_FAMILY_LPC178X
+
config LPC17_MCPWM
bool "MCPWM"
default n
+ depends on ARCH_FAMILY_LPC175X || ARCH_FAMILY_LPC176X
config LPC17_QEI
bool "QEI"
@@ -268,6 +290,11 @@ config LPC17_RTC
bool "RTC"
default n
+config LPC17_RTCEV
+ bool "RTC event monitor"
+ default n
+ depends on LPC17_RTC
+
config LPC17_WDT
bool "WDT"
default n
@@ -284,10 +311,20 @@ config LPC17_GPDMA
bool "GPDMA"
default n
+config LPC17_CRC
+ bool "CRC engine"
+ default n
+ depends on ARCH_FAMILY_LPC177X || ARCH_FAMILY_LPC178X
+
config LPC17_FLASH
bool "FLASH"
default n
+config LPC17_EEPROM
+ bool "EEPROM"
+ default n
+ depends on ARCH_FAMILY_LPC177X || ARCH_FAMILY_LPC178X
+
endmenu
menu "Serial driver options"
diff --git a/nuttx/configs/lincoln60/README.txt b/nuttx/configs/lincoln60/README.txt
index ad35c11c3..a2a6d1032 100644
--- a/nuttx/configs/lincoln60/README.txt
+++ b/nuttx/configs/lincoln60/README.txt
@@ -338,7 +338,7 @@ Lincoln 60 Configuration Options
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
- CONFIG_LPC17_PWM=n
+ CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig
index ef1b73eb8..2c28dbf8c 100644
--- a/nuttx/configs/lincoln60/nsh/defconfig
+++ b/nuttx/configs/lincoln60/nsh/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig
index 408baab29..f1743b67a 100644
--- a/nuttx/configs/lincoln60/ostest/defconfig
+++ b/nuttx/configs/lincoln60/ostest/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/README.txt b/nuttx/configs/lpcxpresso-lpc1768/README.txt
index f45c1ccc2..6fbd3e8ac 100644
--- a/nuttx/configs/lpcxpresso-lpc1768/README.txt
+++ b/nuttx/configs/lpcxpresso-lpc1768/README.txt
@@ -634,7 +634,7 @@ LPCXpresso Configuration Options
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
- CONFIG_LPC17_PWM=n
+ CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
index 824fcfb2c..56c936448 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
@@ -89,7 +89,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
index 50d6a7d95..3bece6f21 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
@@ -89,7 +89,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
index b9eeb792e..cd95b4bce 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
@@ -89,7 +89,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
index 062e821b5..8ffed2c25 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
@@ -89,7 +89,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
index 299750371..b34f64530 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
@@ -89,7 +89,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
index 987eb0ff9..f5de5234a 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
@@ -89,7 +89,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/mbed/README.txt b/nuttx/configs/mbed/README.txt
index 604838e28..4c015f3c9 100644
--- a/nuttx/configs/mbed/README.txt
+++ b/nuttx/configs/mbed/README.txt
@@ -308,7 +308,7 @@ mbed Configuration Options
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
- CONFIG_LPC17_PWM=n
+ CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig
index b4cda857f..580921ba9 100644
--- a/nuttx/configs/mbed/hidkbd/defconfig
+++ b/nuttx/configs/mbed/hidkbd/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig
index 8d6b4983a..7d5bf4617 100755
--- a/nuttx/configs/mbed/nsh/defconfig
+++ b/nuttx/configs/mbed/nsh/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/nucleus2g/README.txt b/nuttx/configs/nucleus2g/README.txt
index d1b3a8f9a..8c77eb3cd 100644
--- a/nuttx/configs/nucleus2g/README.txt
+++ b/nuttx/configs/nucleus2g/README.txt
@@ -420,7 +420,7 @@ Nucleus 2G Configuration Options
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
- CONFIG_LPC17_PWM=n
+ CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig
index de116283e..a3a88204a 100755
--- a/nuttx/configs/nucleus2g/nsh/defconfig
+++ b/nuttx/configs/nucleus2g/nsh/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig
index 8ee63f20b..77f7a8a31 100755
--- a/nuttx/configs/nucleus2g/ostest/defconfig
+++ b/nuttx/configs/nucleus2g/ostest/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig
index a8d03dae6..64c093b04 100755
--- a/nuttx/configs/nucleus2g/usbserial/defconfig
+++ b/nuttx/configs/nucleus2g/usbserial/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig
index c1ce0605f..133937939 100755
--- a/nuttx/configs/nucleus2g/usbstorage/defconfig
+++ b/nuttx/configs/nucleus2g/usbstorage/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt
index 005f62dc9..b12f0f50c 100644
--- a/nuttx/configs/olimex-lpc1766stk/README.txt
+++ b/nuttx/configs/olimex-lpc1766stk/README.txt
@@ -717,7 +717,7 @@ Olimex LPC1766-STK Configuration Options
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
- CONFIG_LPC17_PWM=n
+ CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
index 7df773174..f14885bef 100755
--- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
index be11149a1..cccaa7409 100755
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
@@ -141,7 +141,7 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
index 8b48cbac7..cb8ba93ba 100755
--- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
@@ -145,7 +145,7 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
index fc793ec7b..e20a6bc56 100755
--- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
@@ -147,7 +147,7 @@ CONFIG_LPC17_SSP1=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
index 9af4e7aca..e1aee8047 100755
--- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
index 24b2126c2..5dcefc0f4 100755
--- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
index 259457cf6..33e3d9f41 100755
--- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
index f684dcde3..47efdd95f 100755
--- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
index 628f11d2f..06d41b6f1 100755
--- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
index 7e8b7abe1..fe39eeb5c 100755
--- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
@@ -87,7 +87,7 @@ CONFIG_LPC17_TMR1=n
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
+CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/open1788/nsh/defconfig b/nuttx/configs/open1788/nsh/defconfig
index 7b9094731..7a9e7468d 100644
--- a/nuttx/configs/open1788/nsh/defconfig
+++ b/nuttx/configs/open1788/nsh/defconfig
@@ -128,6 +128,7 @@ CONFIG_LPC17_PLL0=y
CONFIG_LPC17_PLL1=y
# CONFIG_LPC17_EMC is not set
# CONFIG_LPC17_ETHERNET is not set
+# CONFIG_LPC17_LCD is not set
# CONFIG_LPC17_USBHOST is not set
# CONFIG_LPC17_USBDEV is not set
# CONFIG_LPC17_SDCARD=y
@@ -135,11 +136,12 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_UART1 is not set
# CONFIG_LPC17_UART2 is not set
# CONFIG_LPC17_UART3 is not set
+# CONFIG_LPC17_UART4 is not set
# CONFIG_LPC17_CAN1 is not set
# CONFIG_LPC17_CAN2 is not set
-# CONFIG_LPC17_SPI is not set
# CONFIG_LPC17_SSP0 is not set
# CONFIG_LPC17_SSP1 is not set
+# CONFIG_LPC17_SSP2 is not set
# CONFIG_LPC17_I2C0 is not set
# CONFIG_LPC17_I2C1 is not set
# CONFIG_LPC17_I2C2 is not set
@@ -149,15 +151,17 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
-# CONFIG_LPC17_MCPWM is not set
+# CONFIG_LPC17_PWM0 is not set
+# CONFIG_LPC17_PWM1 is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
# CONFIG_LPC17_WDT is not set
# CONFIG_LPC17_ADC is not set
# CONFIG_LPC17_DAC is not set
CONFIG_LPC17_GPDMA=y
+# CONFIG_LPC17_CRC is not set
# CONFIG_LPC17_FLASH is not set
+# CONFIG_LPC17_EEPROM is not set
#
# Serial driver options
diff --git a/nuttx/configs/open1788/ostest/defconfig b/nuttx/configs/open1788/ostest/defconfig
index 1d85df4af..06d55f877 100644
--- a/nuttx/configs/open1788/ostest/defconfig
+++ b/nuttx/configs/open1788/ostest/defconfig
@@ -147,7 +147,7 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/configs/zkit-arm-1769/README.txt b/nuttx/configs/zkit-arm-1769/README.txt
index 43fbf8428..14e5aefe5 100644
--- a/nuttx/configs/zkit-arm-1769/README.txt
+++ b/nuttx/configs/zkit-arm-1769/README.txt
@@ -434,7 +434,7 @@ ZKit-ARM Configuration Options
CONFIG_LPC17_TMR2=n
CONFIG_LPC17_TMR3=n
CONFIG_LPC17_RIT=n
- CONFIG_LPC17_PWM=n
+ CONFIG_LPC17_PWM0=n
CONFIG_LPC17_MCPWM=n
CONFIG_LPC17_QEI=n
CONFIG_LPC17_RTC=n
diff --git a/nuttx/configs/zkit-arm-1769/hello/defconfig b/nuttx/configs/zkit-arm-1769/hello/defconfig
index f51ed5ba6..409135bd7 100644
--- a/nuttx/configs/zkit-arm-1769/hello/defconfig
+++ b/nuttx/configs/zkit-arm-1769/hello/defconfig
@@ -148,7 +148,7 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/configs/zkit-arm-1769/nsh/defconfig b/nuttx/configs/zkit-arm-1769/nsh/defconfig
index cd414d984..ac82087a3 100644
--- a/nuttx/configs/zkit-arm-1769/nsh/defconfig
+++ b/nuttx/configs/zkit-arm-1769/nsh/defconfig
@@ -146,7 +146,7 @@ CONFIG_LPC17_SSP0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/configs/zkit-arm-1769/thttpd/defconfig b/nuttx/configs/zkit-arm-1769/thttpd/defconfig
index 27f9ca861..0bce28c16 100644
--- a/nuttx/configs/zkit-arm-1769/thttpd/defconfig
+++ b/nuttx/configs/zkit-arm-1769/thttpd/defconfig
@@ -148,7 +148,7 @@ CONFIG_LPC17_UART0=y
# CONFIG_LPC17_TMR2 is not set
# CONFIG_LPC17_TMR3 is not set
# CONFIG_LPC17_RIT is not set
-# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_PWM0 is not set
# CONFIG_LPC17_MCPWM is not set
# CONFIG_LPC17_QEI is not set
# CONFIG_LPC17_RTC is not set
diff --git a/nuttx/include/nuttx/kmalloc.h b/nuttx/include/nuttx/kmalloc.h
index 767809f88..75f7cd67a 100644
--- a/nuttx/include/nuttx/kmalloc.h
+++ b/nuttx/include/nuttx/kmalloc.h
@@ -88,15 +88,15 @@ extern "C" {
#else
-KMALLOC_EXTERN void kmm_initialize(FAR void *heap_start, size_t heap_size);
-KMALLOC_EXTERN void kmm_addregion(FAR void *heapstart, size_t heapsize);
-KMALLOC_EXTERN int kmm_trysemaphore(void);
-KMALLOC_EXTERN void kmm_givesemaphore(void);
+void kmm_initialize(FAR void *heap_start, size_t heap_size);
+void kmm_addregion(FAR void *heapstart, size_t heapsize);
+int kmm_trysemaphore(void);
+void kmm_givesemaphore(void);
-KMALLOC_EXTERN FAR void *kmalloc(size_t);
-KMALLOC_EXTERN FAR void *kzalloc(size_t);
-KMALLOC_EXTERN FAR void *krealloc(FAR void*, size_t);
-KMALLOC_EXTERN void kfree(FAR void*);
+FAR void *kmalloc(size_t);
+FAR void *kzalloc(size_t);
+FAR void *krealloc(FAR void*, size_t);
+void kfree(FAR void*);
#endif
@@ -104,7 +104,15 @@ KMALLOC_EXTERN void kfree(FAR void*);
/* Handles memory freed from an interrupt handler */
-KMALLOC_EXTERN void sched_free(FAR void *address);
+void sched_free(FAR void *address);
+
+/* Functions defined in os_list.c *******************************************/
+
+/* Must be called periodically to clean up deallocations delayed by
+ * sched_free()
+ */
+
+void sched_garbagecollection(void);
#undef KMALLOC_EXTERN
#if defined(__cplusplus)
diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h
index d56901d89..67a518008 100644
--- a/nuttx/include/nuttx/wqueue.h
+++ b/nuttx/include/nuttx/wqueue.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/wqueue.h
*
- * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -83,6 +83,10 @@
* priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE.
*/
+#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_DISABLE_SIGNALS)
+# warning "Worker thread support requires signals"
+#endif
+
#ifndef CONFIG_SCHED_WORKPRIORITY
# define CONFIG_SCHED_WORKPRIORITY 192
#endif
@@ -109,6 +113,14 @@
# endif
#endif
+/* How many worker threads are there? */
+
+#ifdef CONFIG_SCHED_LPWORK
+# define NWORKERS 2
+#else
+# define NWORKERS 1
+#endif
+
/* Work queue IDs (indices):
*
* Kernel Work Queues:
@@ -144,6 +156,17 @@
#ifndef __ASSEMBLY__
+/* This structure defines the state on one work queue. This structure is
+ * used internally by the OS and worker queue logic and should not be
+ * accessed by application logic.
+ */
+
+struct wqueue_s
+{
+ pid_t pid; /* The task ID of the worker thread */
+ struct dq_queue_s q; /* The queue of pending work */
+};
+
/* Defines the work callback */
typedef void (*worker_t)(FAR void *arg);
@@ -155,11 +178,11 @@ typedef void (*worker_t)(FAR void *arg);
struct work_s
{
- struct dq_entry_s dq; /* Implements a doubly linked list */
- worker_t worker; /* Work callback */
- FAR void *arg; /* Callback argument */
- uint32_t qtime; /* Time work queued */
- uint32_t delay; /* Delay until work performed */
+ struct dq_entry_s dq; /* Implements a doubly linked list */
+ worker_t worker; /* Work callback */
+ FAR void *arg; /* Callback argument */
+ uint32_t qtime; /* Time work queued */
+ uint32_t delay; /* Delay until work performed */
};
/****************************************************************************
@@ -168,16 +191,49 @@ struct work_s
#ifdef __cplusplus
#define EXTERN extern "C"
-extern "C" {
+extern "C"
+{
#else
#define EXTERN extern
#endif
+/* The state of each work queue. This data structure is used internally by
+ * the OS and worker queue logic and should not be accessed by application
+ * logic.
+ */
+
+EXTERN struct wqueue_s g_work[NWORKERS];
+
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
+ * Name: work_hpthread and work_lpthread
+ *
+ * Description:
+ * These are the main worker threads that performs actions placed on the
+ * work lists. One thread also performs periodic garbage collection (that
+ * is performed by the idle thread if CONFIG_SCHED_WORKQUEUE is not defined).
+ *
+ * These entrypoints are referenced by OS internally and should not be
+ * accessed by application logic.
+ *
+ * Input parameters:
+ * argc, argv (not used)
+ *
+ * Returned Value:
+ * Does not return
+ *
+ ****************************************************************************/
+
+int work_hpthread(int argc, char *argv[]);
+
+#ifdef CONFIG_SCHED_LPWORK
+int work_lpthread(int argc, char *argv[]);
+#endif
+
+/****************************************************************************
* Name: work_queue
*
* Description:
@@ -206,8 +262,8 @@ extern "C" {
*
****************************************************************************/
-EXTERN int work_queue(int qid, FAR struct work_s *work, worker_t worker,
- FAR void *arg, uint32_t delay);
+int work_queue(int qid, FAR struct work_s *work, worker_t worker,
+ FAR void *arg, uint32_t delay);
/****************************************************************************
* Name: work_cancel
@@ -226,7 +282,7 @@ EXTERN int work_queue(int qid, FAR struct work_s *work, worker_t worker,
*
****************************************************************************/
-EXTERN int work_cancel(int qid, FAR struct work_s *work);
+int work_cancel(int qid, FAR struct work_s *work);
/****************************************************************************
* Name: work_signal
@@ -244,7 +300,7 @@ EXTERN int work_cancel(int qid, FAR struct work_s *work);
*
****************************************************************************/
-EXTERN int work_signal(int qid);
+int work_signal(int qid);
/****************************************************************************
* Name: work_available
diff --git a/nuttx/libc/Makefile b/nuttx/libc/Makefile
index a76620585..ee015c38a 100644
--- a/nuttx/libc/Makefile
+++ b/nuttx/libc/Makefile
@@ -1,7 +1,7 @@
############################################################################
# libc/Makefile
#
-# Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
+# Copyright (C) 2007-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -59,6 +59,7 @@ include dirent/Make.defs
include termios/Make.defs
include spawn/Make.defs
include queue/Make.defs
+include wqueue/Make.defs
include misc/Make.defs
AOBJS = $(ASRCS:.S=$(OBJEXT))
diff --git a/nuttx/libc/wqueue/Make.defs b/nuttx/libc/wqueue/Make.defs
new file mode 100644
index 000000000..1a13bcf78
--- /dev/null
+++ b/nuttx/libc/wqueue/Make.defs
@@ -0,0 +1,47 @@
+############################################################################
+# libc/wqueue/Make.defs
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+ifeq ($(CONFIG_SCHED_WORKQUEUE),y)
+
+# Add the work queue C files to the build
+
+CSRCS += work_thread.c work_queue.c work_cancel.c work_signal.c
+
+# Add the wqueue directory to the build
+
+DEPPATH += --dep-path wqueue
+VPATH += :wqueue
+
+endif
diff --git a/nuttx/sched/work_cancel.c b/nuttx/libc/wqueue/work_cancel.c
index 55df86f44..2671bf253 100644
--- a/nuttx/sched/work_cancel.c
+++ b/nuttx/libc/wqueue/work_cancel.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * sched/work_cancel.c
+ * libc/wqueue/work_cancel.c
*
- * Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2010, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -47,8 +47,6 @@
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
-#include "work_internal.h"
-
#ifdef CONFIG_SCHED_WORKQUEUE
/****************************************************************************
diff --git a/nuttx/sched/work_queue.c b/nuttx/libc/wqueue/work_queue.c
index 075f08a4d..c85f564e5 100644
--- a/nuttx/sched/work_queue.c
+++ b/nuttx/libc/wqueue/work_queue.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * sched/work_queue.c
+ * libc/wqueue/work_queue.c
*
- * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -49,8 +49,6 @@
#include <nuttx/clock.h>
#include <nuttx/wqueue.h>
-#include "work_internal.h"
-
#ifdef CONFIG_SCHED_WORKQUEUE
/****************************************************************************
diff --git a/nuttx/sched/work_signal.c b/nuttx/libc/wqueue/work_signal.c
index 6e6838c69..d7459cb97 100644
--- a/nuttx/sched/work_signal.c
+++ b/nuttx/libc/wqueue/work_signal.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * sched/work_signal.c
+ * libc/wqueue/work_signal.c
*
- * Copyright (C) 2009-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -44,8 +44,6 @@
#include <nuttx/wqueue.h>
-#include "work_internal.h"
-
#ifdef CONFIG_SCHED_WORKQUEUE
/****************************************************************************
diff --git a/nuttx/sched/work_thread.c b/nuttx/libc/wqueue/work_thread.c
index 5646b06a1..32dff9c8c 100644
--- a/nuttx/sched/work_thread.c
+++ b/nuttx/libc/wqueue/work_thread.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * sched/work_thread.c
+ * libc/wqueue/work_thread.c
*
- * Copyright (C) 2009-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -49,9 +49,7 @@
#include <nuttx/arch.h>
#include <nuttx/wqueue.h>
#include <nuttx/clock.h>
-
-#include "os_internal.h"
-#include "work_internal.h"
+#include <nuttx/kmalloc.h>
#ifdef CONFIG_SCHED_WORKQUEUE
diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile
index ffb6e0004..1292eb449 100644
--- a/nuttx/sched/Makefile
+++ b/nuttx/sched/Makefile
@@ -175,10 +175,6 @@ TIMER_SRCS += timer_initialize.c timer_create.c timer_delete.c timer_getoverrun.
TIMER_SRCS += timer_gettime.c timer_settime.c timer_release.c
endif
-ifeq ($(CONFIG_SCHED_WORKQUEUE),y)
-WORK_SRCS = work_thread.c work_queue.c work_cancel.c work_signal.c
-endif
-
ifeq ($(CONFIG_PAGING),y)
PGFILL_SRCS = pg_miss.c pg_worker.c
endif
@@ -189,7 +185,7 @@ KMM_SRCS = kmm_initialize.c kmm_addregion.c kmm_semaphore.c
KMM_SRCS = kmm_kmalloc.c kmm_kzalloc.c kmm_krealloc.c kmm_kfree.c
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(GRP_SRCS) $(SCHED_SRCS) $(WDOG_SRCS)
-CSRCS += $(TIME_SRCS) $(SEM_SRCS) $(TIMER_SRCS) $(WORK_SRCS) $(PGFILL_SRCS)
+CSRCS += $(TIME_SRCS) $(SEM_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS)
CSRCS += $(IRQ_SRCS)
ifneq ($(CONFIG_DISABLE_CLOCK),y)
diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c
index acf367c97..506de8dc3 100644
--- a/nuttx/sched/os_bringup.c
+++ b/nuttx/sched/os_bringup.c
@@ -54,9 +54,6 @@
#ifdef CONFIG_PAGING
# include "pg_internal.h"
#endif
-#ifdef CONFIG_SCHED_WORKQUEUE
-# include "work_internal.h"
-#endif
#ifdef CONFIG_NUTTX_KERNEL
# include "arch/board/user_map.h"
#endif
diff --git a/nuttx/sched/os_internal.h b/nuttx/sched/os_internal.h
index 5d97f62f1..71003e2da 100644
--- a/nuttx/sched/os_internal.h
+++ b/nuttx/sched/os_internal.h
@@ -287,6 +287,5 @@ FAR struct tcb_s *sched_gettcb(pid_t pid);
bool sched_verifytcb(FAR struct tcb_s *tcb);
int sched_releasetcb(FAR struct tcb_s *tcb);
-void sched_garbagecollection(void);
#endif /* __SCHED_OS_INTERNAL_H */
diff --git a/nuttx/sched/work_internal.h b/nuttx/sched/work_internal.h
deleted file mode 100644
index 7f6c1a937..000000000
--- a/nuttx/sched/work_internal.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
- * sched/work_internal.h
- *
- * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-#ifndef __SCHED_WORK_INTERNAL_H
-#define __SCHED_WORK_INTERNAL_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <queue.h>
-
-#ifdef CONFIG_SCHED_WORKQUEUE
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#ifdef CONFIG_DISABLE_SIGNALS
-# warning "Worker thread support requires signals"
-#endif
-
-#ifdef CONFIG_SCHED_LPWORK
-# define NWORKERS 2
-#else
-# define NWORKERS 1
-#endif
-
-/****************************************************************************
- * Public Types
- ****************************************************************************/
-
-#ifndef __ASSEMBLY__
-
-/* This structure defines the state on one work queue */
-
-struct wqueue_s
-{
- pid_t pid; /* The task ID of the worker thread */
- struct dq_queue_s q; /* The queue of pending work */
-};
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/* The state of each work queue */
-
-extern struct wqueue_s g_work[NWORKERS];
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
- * Name: work_hpthread and work_lpthread
- *
- * Description:
- * These are the main worker threads that performs actions placed on the
- * work lists. One thread also performs periodic garbage collection (that
- * is performed by the idle thread if CONFIG_SCHED_WORKQUEUE is not defined).
- *
- * Input parameters:
- * argc, argv (not used)
- *
- * Returned Value:
- * Does not return
- *
- ****************************************************************************/
-
-int work_hpthread(int argc, char *argv[]);
-
-#ifdef CONFIG_SCHED_LPWORK
-int work_lpthread(int argc, char *argv[]);
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* CONFIG_SCHED_WORKQUEUE */
-#endif /* __SCHED_WORK_INTERNAL_H */