Squashed commit of the following:

include/ and netutils/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    nshlib/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    system/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    testing/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    examples/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
This commit is contained in:
Gregory Nutt 2019-04-29 14:53:38 -06:00
parent ad57b3de4d
commit 8f5944c4a8
35 changed files with 59 additions and 170 deletions

View File

@ -56,7 +56,6 @@ examples/ajoystick
Configuration Pre-requisites: Configuration Pre-requisites:
CONFIG_DISABLE_SIGNALS - Must *NOT* be selected
CONFIG_AJOYSTICK - The analog joystick driver CONFIG_AJOYSTICK - The analog joystick driver
Example Configuration: Example Configuration:
@ -292,7 +291,6 @@ examples/djoystick
Configuration Pre-requisites: Configuration Pre-requisites:
CONFIG_DISABLE_SIGNALS - Must *NOT* be selected
CONFIG_DJOYSTICK - The discrete joystick driver CONFIG_DJOYSTICK - The discrete joystick driver
Example Configuration: Example Configuration:
@ -979,7 +977,6 @@ examples/nx
if they are not as expected: if they are not as expected:
CONFIG_DISABLE_MQUEUE=n CONFIG_DISABLE_MQUEUE=n
CONFIG_DISABLE_SIGNALS=n
CONFIG_DISABLE_PTHREAD=n CONFIG_DISABLE_PTHREAD=n
CONFIG_NX_BLOCKING=y CONFIG_NX_BLOCKING=y
CONFIG_LIB_BOARDCTL=y CONFIG_LIB_BOARDCTL=y
@ -996,7 +993,6 @@ examples/nxterm
CONFIG_NX=y -- NX graphics must be enabled CONFIG_NX=y -- NX graphics must be enabled
CONFIG_NXTERM=y -- The NX console driver must be built CONFIG_NXTERM=y -- The NX console driver must be built
CONFIG_DISABLE_MQUEUE=n -- Message queue support must be available. CONFIG_DISABLE_MQUEUE=n -- Message queue support must be available.
CONFIG_DISABLE_SIGNALS=n -- Signals are needed
CONFIG_DISABLE_PTHREAD=n -- pthreads are needed CONFIG_DISABLE_PTHREAD=n -- pthreads are needed
CONFIG_NX_BLOCKING=y -- pthread APIs must be blocking CONFIG_NX_BLOCKING=y -- pthread APIs must be blocking
CONFIG_NSH_CONSOLE=y -- NSH must be configured to use a console. CONFIG_NSH_CONSOLE=y -- NSH must be configured to use a console.
@ -1194,7 +1190,6 @@ examples/nxtext
error if they are not as expected: error if they are not as expected:
CONFIG_DISABLE_MQUEUE=n CONFIG_DISABLE_MQUEUE=n
CONFIG_DISABLE_SIGNALS=n
CONFIG_DISABLE_PTHREAD=n CONFIG_DISABLE_PTHREAD=n
CONFIG_NX_BLOCKING=y CONFIG_NX_BLOCKING=y

View File

@ -6,7 +6,7 @@
config EXAMPLES_AJOYSTICK config EXAMPLES_AJOYSTICK
tristate "Analog joystick example" tristate "Analog joystick example"
default n default n
depends on AJOYSTICK && !DISABLE_SIGNALS depends on AJOYSTICK
---help--- ---help---
Enable the analog joystick example Enable the analog joystick example

View File

@ -38,6 +38,19 @@ config EXAMPLES_BUTTONS_NAMES
---help--- ---help---
Enable to show the button's name in the application. Enable to show the button's name in the application.
choice
prompt "Notification mechanism"
default EXAMPLES_BUTTONS_SIGNAL
config EXAMPLES_BUTTONS_SIGNAL
bool "Notify using signals"
config EXAMPLES_BUTTONS_POLL
bool "Notify using poll()"
depends on !DISABLE_POLL
endchoice
if EXAMPLES_BUTTONS_NAMES if EXAMPLES_BUTTONS_NAMES
config EXAMPLES_BUTTONS_QTD config EXAMPLES_BUTTONS_QTD

View File

@ -59,16 +59,6 @@
# error "CONFIG_BUTTONS is not defined in the configuration" # error "CONFIG_BUTTONS is not defined in the configuration"
#endif #endif
#if defined(CONFIG_DISABLE_SIGNALS) && defined(CONFIG_DISABLE_POLL)
# error "You need at least SIGNALS or POLL support to read buttons"
#endif
#if !defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_POLL)
# define USE_NOTIFY_SIGNAL 1
#else
# define USE_NOTIFY_POLL 1
#endif
#ifndef CONFIG_BUTTONS_NPOLLWAITERS #ifndef CONFIG_BUTTONS_NPOLLWAITERS
# define CONFIG_BUTTONS_NPOLLWAITERS 2 # define CONFIG_BUTTONS_NPOLLWAITERS 2
#endif #endif
@ -167,11 +157,11 @@ static bool g_button_daemon_started;
static int button_daemon(int argc, char *argv[]) static int button_daemon(int argc, char *argv[])
{ {
#ifdef USE_NOTIFY_POLL #ifdef CONFIG_EXAMPLES_BUTTONS_POLL
struct pollfd fds[CONFIG_BUTTONS_NPOLLWAITERS]; struct pollfd fds[CONFIG_BUTTONS_NPOLLWAITERS];
#endif #endif
#ifdef USE_NOTIFY_SIGNAL #ifdef CONFIG_EXAMPLES_BUTTONS_SIGNAL
struct btn_notify_s btnevents; struct btn_notify_s btnevents;
#endif #endif
@ -219,7 +209,7 @@ static int button_daemon(int argc, char *argv[])
printf("button_daemon: Supported BUTTONs 0x%02x\n", (unsigned int)supported); printf("button_daemon: Supported BUTTONs 0x%02x\n", (unsigned int)supported);
#ifdef USE_NOTIFY_SIGNAL #ifdef CONFIG_EXAMPLES_BUTTONS_SIGNAL
/* Define the notifications events */ /* Define the notifications events */
btnevents.bn_press = supported; btnevents.bn_press = supported;
@ -245,18 +235,18 @@ static int button_daemon(int argc, char *argv[])
for (; ; ) for (; ; )
{ {
#ifdef USE_NOTIFY_SIGNAL #ifdef CONFIG_EXAMPLES_BUTTONS_SIGNAL
struct siginfo value; struct siginfo value;
sigset_t set; sigset_t set;
#endif #endif
#ifdef USE_NOTIFY_POLL #ifdef CONFIG_EXAMPLES_BUTTONS_POLL
bool timeout; bool timeout;
bool pollin; bool pollin;
int nbytes; int nbytes;
#endif #endif
#ifdef USE_NOTIFY_SIGNAL #ifdef CONFIG_EXAMPLES_BUTTONS_SIGNAL
/* Wait for a signal */ /* Wait for a signal */
(void)sigemptyset(&set); (void)sigemptyset(&set);
@ -272,7 +262,7 @@ static int button_daemon(int argc, char *argv[])
sample = (btn_buttonset_t)value.si_value.sival_int; sample = (btn_buttonset_t)value.si_value.sival_int;
#endif #endif
#ifdef USE_NOTIFY_POLL #ifdef CONFIG_EXAMPLES_BUTTONS_POLL
/* Prepare the File Descriptor for poll */ /* Prepare the File Descriptor for poll */
memset(fds, 0, sizeof(struct pollfd)*CONFIG_BUTTONS_NPOLLWAITERS); memset(fds, 0, sizeof(struct pollfd)*CONFIG_BUTTONS_NPOLLWAITERS);

View File

@ -6,7 +6,7 @@
config EXAMPLES_DJOYSTICK config EXAMPLES_DJOYSTICK
tristate "Discrete joystick example" tristate "Discrete joystick example"
default n default n
depends on DJOYSTICK && !DISABLE_SIGNALS depends on DJOYSTICK
---help--- ---help---
Enable the discrete joystick example Enable the discrete joystick example

View File

@ -38,7 +38,7 @@
include $(APPDIR)/Make.defs include $(APPDIR)/Make.defs
ALL_SUBDIRS = errno hello helloxx longjmp mutex pthread signal task struct ALL_SUBDIRS = errno hello helloxx longjmp mutex pthread signal task struct
BUILD_SUBDIRS = errno hello struct BUILD_SUBDIRS = errno hello struct signal
ifeq ($(CONFIG_HAVE_CXX),y) ifeq ($(CONFIG_HAVE_CXX),y)
BUILD_SUBDIRS += helloxx BUILD_SUBDIRS += helloxx
@ -52,10 +52,6 @@ ifneq ($(CONFIG_DISABLE_PTHREAD),y)
BUILD_SUBDIRS += mutex pthread BUILD_SUBDIRS += mutex pthread
endif endif
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
BUILD_SUBDIRS += signal
endif
ifneq ($(CONFIG_ARCH_ADDRENV),y) ifneq ($(CONFIG_ARCH_ADDRENV),y)
BUILD_SUBDIRS += task BUILD_SUBDIRS += task
endif endif

View File

@ -131,9 +131,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -96,9 +96,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -99,9 +99,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -108,9 +108,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -117,9 +117,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -179,9 +179,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -170,9 +170,6 @@
#ifdef CONFIG_DISABLE_MQUEUE #ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
#endif #endif
#ifdef CONFIG_DISABLE_SIGNALS
# error "This example requires signal support (CONFIG_DISABLE_SIGNALS=n)"
#endif
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
# error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)" # error "This example requires pthread support (CONFIG_DISABLE_PTHREAD=n)"
#endif #endif

View File

@ -6,7 +6,7 @@
config EXAMPLES_ZEROCROSS config EXAMPLES_ZEROCROSS
tristate "Zero Cross Detection example" tristate "Zero Cross Detection example"
default n default n
depends on SENSORS_ZEROCROSS && !DISABLE_SIGNALS depends on SENSORS_ZEROCROSS
---help--- ---help---
Enable the zero cross detection example Enable the zero cross detection example

View File

@ -75,8 +75,7 @@
#endif #endif
#if !defined(CONFIG_NETINIT_THREAD) || !defined(CONFIG_ARCH_PHY_INTERRUPT) || \ #if !defined(CONFIG_NETINIT_THREAD) || !defined(CONFIG_ARCH_PHY_INTERRUPT) || \
!defined(CONFIG_NETDEV_PHY_IOCTL) || !defined(CONFIG_NET_UDP) || \ !defined(CONFIG_NETDEV_PHY_IOCTL) || !defined(CONFIG_NET_UDP)
defined(CONFIG_DISABLE_SIGNALS)
# undef CONFIG_NETINIT_MONITOR # undef CONFIG_NETINIT_MONITOR
#endif #endif

View File

@ -116,9 +116,7 @@ int ntpc_start(void);
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
int ntpc_stop(void); int ntpc_stop(void);
#endif
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -73,7 +73,7 @@ if NETINIT_THREAD
config NETINIT_MONITOR config NETINIT_MONITOR
bool "Monitor link state" bool "Monitor link state"
default n default n
depends on ARCH_PHY_INTERRUPT && NETDEV_PHY_IOCTL && NET_UDP && !DISABLE_SIGNALS depends on ARCH_PHY_INTERRUPT && NETDEV_PHY_IOCTL && NET_UDP
---help--- ---help---
By default the net initialization thread will bring-up the network By default the net initialization thread will bring-up the network
then exit, freeing all of the resources that it required. This is a then exit, freeing all of the resources that it required. This is a

View File

@ -41,6 +41,5 @@ config NETUTILS_NTPCLIENT_POLLDELAYSEC
config NETUTILS_NTPCLIENT_SIGWAKEUP config NETUTILS_NTPCLIENT_SIGWAKEUP
int "NTP client wakeup signal number" int "NTP client wakeup signal number"
default 18 default 18
depends on !DISABLE_SIGNALS
endif # NETUTILS_NTPCLIENT endif # NETUTILS_NTPCLIENT

View File

@ -587,7 +587,6 @@ int ntpc_start(void)
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
int ntpc_stop(void) int ntpc_stop(void)
{ {
int ret; int ret;
@ -628,4 +627,3 @@ int ntpc_stop(void)
sched_unlock(); sched_unlock();
return OK; return OK;
} }
#endif

View File

@ -1441,7 +1441,7 @@ Command Dependencies on Configuration Settings
ifup CONFIG_NET && CONFIG_FS_PROCFS && !CONFIG_FS_PROCFS_EXCLUDE_NET ifup CONFIG_NET && CONFIG_FS_PROCFS && !CONFIG_FS_PROCFS_EXCLUDE_NET
insmod CONFIG_MODULE insmod CONFIG_MODULE
irqinfo CONFIG_FS_PROCFS && CONFIG_SCHED_IRQMONITOR irqinfo CONFIG_FS_PROCFS && CONFIG_SCHED_IRQMONITOR
kill !CONFIG_DISABLE_SIGNALS kill --
losetup !CONFIG_DISABLE_MOUNTPOINT && CONFIG_DEV_LOOP losetup !CONFIG_DISABLE_MOUNTPOINT && CONFIG_DEV_LOOP
ln CONFIG_PSEUDOFS_SOFTLINK ln CONFIG_PSEUDOFS_SOFTLINK
ls -- ls --
@ -1472,7 +1472,7 @@ Command Dependencies on Configuration Settings
set CONFIG_NSH_VARS || !CONFIG_DISABLE_ENVIRON set CONFIG_NSH_VARS || !CONFIG_DISABLE_ENVIRON
sh CONFIG_NFILE_STREAMS > 0 && !CONFIG_NSH_DISABLESCRIPT sh CONFIG_NFILE_STREAMS > 0 && !CONFIG_NSH_DISABLESCRIPT
shutdown CONFIG_BOARDCTL_POWEROFF || CONFIG_BOARDCTL_RESET shutdown CONFIG_BOARDCTL_POWEROFF || CONFIG_BOARDCTL_RESET
sleep !CONFIG_DISABLE_SIGNALS sleep --
test !CONFIG_NSH_DISABLESCRIPT test !CONFIG_NSH_DISABLESCRIPT
telnetd CONFIG_NSH_TELNET && !CONFIG_NSH_DISABLE_TELNETD telnetd CONFIG_NSH_TELNET && !CONFIG_NSH_DISABLE_TELNETD
time --- time ---
@ -1484,7 +1484,7 @@ Command Dependencies on Configuration Settings
urlencode CONFIG_NETUTILS_CODECS && CONFIG_CODECS_URLCODE urlencode CONFIG_NETUTILS_CODECS && CONFIG_CODECS_URLCODE
useradd !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE && CONFIG_NSH_LOGIN_PASSWD useradd !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE && CONFIG_NSH_LOGIN_PASSWD
userdel !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE && CONFIG_NSH_LOGIN_PASSWD userdel !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE && CONFIG_NSH_LOGIN_PASSWD
usleep !CONFIG_DISABLE_SIGNALS usleep --
get CONFIG_NET && CONFIG_NET_TCP get CONFIG_NET && CONFIG_NET_TCP
xd --- xd ---
@ -1536,9 +1536,9 @@ All built-in applications require that support for NSH built-in applications has
Application Depends on Configuration Application Depends on Configuration
----------- -------------------------- ----------- --------------------------
ping CONFIG_NET && CONFIG_NET_ICMP && CONFIG_NET_ICMP_SOCKET && ping CONFIG_NET && CONFIG_NET_ICMP && CONFIG_NET_ICMP_SOCKET &&
CONFIG_SYSTEM_PING && !CONFIG_DISABLE_POLL && !CONFIG_DISABLE_SIGNALS CONFIG_SYSTEM_PING && !CONFIG_DISABLE_POLL
ping6 CONFIG_NET && CONFIG_NET_ICMPv6 && CONFIG_NET_ICMPv6_SOCKET && ping6 CONFIG_NET && CONFIG_NET_ICMPv6 && CONFIG_NET_ICMPv6_SOCKET &&
CONFIG_SYSTEM_PING6 && !CONFIG_DISABLE_POLL && !CONFIG_DISABLE_SIGNALS CONFIG_SYSTEM_PING6 && !CONFIG_DISABLE_POLL
NSH-Specific Configuration Settings NSH-Specific Configuration Settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -851,9 +851,7 @@ extern const char g_fmtcontext[];
extern const char g_fmtcmdfailed[]; extern const char g_fmtcmdfailed[];
extern const char g_fmtcmdoutofmemory[]; extern const char g_fmtcmdoutofmemory[];
extern const char g_fmtinternalerror[]; extern const char g_fmtinternalerror[];
#ifndef CONFIG_DISABLE_SIGNALS
extern const char g_fmtsignalrecvd[]; extern const char g_fmtsignalrecvd[];
#endif
/**************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
@ -1208,17 +1206,15 @@ int cmd_irqinfo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
int cmd_unset(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); int cmd_unset(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif #endif
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_NSH_DISABLE_KILL
# ifndef CONFIG_NSH_DISABLE_KILL
int cmd_kill(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); int cmd_kill(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif #endif
# ifndef CONFIG_NSH_DISABLE_SLEEP #ifndef CONFIG_NSH_DISABLE_SLEEP
int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif #endif
# ifndef CONFIG_NSH_DISABLE_USLEEP #ifndef CONFIG_NSH_DISABLE_USLEEP
int cmd_usleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); int cmd_usleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif #endif
#endif /* CONFIG_DISABLE_SIGNALS */
#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_BASE64) #if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_BASE64)
# ifndef CONFIG_NSH_DISABLE_BASE64DEC # ifndef CONFIG_NSH_DISABLE_BASE64DEC

View File

@ -254,10 +254,8 @@ static const struct cmdmap_s g_cmdmap[] =
{ "irqinfo", cmd_irqinfo, 1, 1, NULL }, { "irqinfo", cmd_irqinfo, 1, 1, NULL },
#endif #endif
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_NSH_DISABLE_KILL
# ifndef CONFIG_NSH_DISABLE_KILL
{ "kill", cmd_kill, 3, 3, "-<signal> <pid>" }, { "kill", cmd_kill, 3, 3, "-<signal> <pid>" },
# endif
#endif #endif
#ifndef CONFIG_DISABLE_MOUNTPOINT #ifndef CONFIG_DISABLE_MOUNTPOINT
@ -474,10 +472,8 @@ static const struct cmdmap_s g_cmdmap[] =
#endif #endif
#endif #endif
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_NSH_DISABLE_SLEEP
# ifndef CONFIG_NSH_DISABLE_SLEEP
{ "sleep", cmd_sleep, 2, 2, "<sec>" }, { "sleep", cmd_sleep, 2, 2, "<sec>" },
# endif
#endif #endif
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_TEST) #if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_TEST)
@ -544,10 +540,8 @@ static const struct cmdmap_s g_cmdmap[] =
# endif # endif
#endif #endif
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_NSH_DISABLE_USLEEP
# ifndef CONFIG_NSH_DISABLE_USLEEP
{ "usleep", cmd_usleep, 2, 2, "<usec>" }, { "usleep", cmd_usleep, 2, 2, "<usec>" },
# endif
#endif #endif
#ifdef CONFIG_NET_TCP #ifdef CONFIG_NET_TCP

View File

@ -609,18 +609,17 @@ int cmd_cp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
/* EINTR is not an error (but will still stop the copy) */ /* EINTR is not an error (but will still stop the copy) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errno == EINTR) if (errno == EINTR)
{ {
nsh_error(vtbl, g_fmtsignalrecvd, argv[0]); nsh_error(vtbl, g_fmtsignalrecvd, argv[0]);
} }
else else
#endif
{ {
/* Read error */ /* Read error */
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "read", NSH_ERRNO); nsh_error(vtbl, g_fmtcmdfailed, argv[0], "read", NSH_ERRNO);
} }
goto errout_with_wrfd; goto errout_with_wrfd;
} }
} }
@ -637,18 +636,17 @@ int cmd_cp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
/* EINTR is not an error (but will still stop the copy) */ /* EINTR is not an error (but will still stop the copy) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errno == EINTR) if (errno == EINTR)
{ {
nsh_error(vtbl, g_fmtsignalrecvd, argv[0]); nsh_error(vtbl, g_fmtsignalrecvd, argv[0]);
} }
else else
#endif
{ {
/* Read error */ /* Read error */
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "write", NSH_ERRNO); nsh_error(vtbl, g_fmtcmdfailed, argv[0], "write", NSH_ERRNO);
} }
goto errout_with_wrfd; goto errout_with_wrfd;
} }
} }

View File

@ -111,13 +111,11 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
/* EINTR is not an error (but will stop stop the cat) */ /* EINTR is not an error (but will stop stop the cat) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errval == EINTR) if (errval == EINTR)
{ {
nsh_error(vtbl, g_fmtsignalrecvd, cmd); nsh_error(vtbl, g_fmtsignalrecvd, cmd);
} }
else else
#endif
{ {
nsh_error(vtbl, g_fmtcmdfailed, cmd, "read", NSH_ERRNO_OF(errval)); nsh_error(vtbl, g_fmtcmdfailed, cmd, "read", NSH_ERRNO_OF(errval));
} }
@ -142,13 +140,11 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
/* EINTR is not an error (but will stop stop the cat) */ /* EINTR is not an error (but will stop stop the cat) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errcode == EINTR) if (errcode == EINTR)
{ {
nsh_error(vtbl, g_fmtsignalrecvd, cmd); nsh_error(vtbl, g_fmtsignalrecvd, cmd);
} }
else else
#endif
{ {
nsh_error(vtbl, g_fmtcmdfailed, cmd, "write", nsh_error(vtbl, g_fmtcmdfailed, cmd, "write",
NSH_ERRNO_OF(errcode)); NSH_ERRNO_OF(errcode));

View File

@ -280,9 +280,7 @@ const char g_fmtcmdfailed[] = "nsh: %s: %s failed: %d\n";
#endif #endif
const char g_fmtcmdoutofmemory[] = "nsh: %s: out of memory\n"; const char g_fmtcmdoutofmemory[] = "nsh: %s: out of memory\n";
const char g_fmtinternalerror[] = "nsh: %s: Internal error\n"; const char g_fmtinternalerror[] = "nsh: %s: Internal error\n";
#ifndef CONFIG_DISABLE_SIGNALS
const char g_fmtsignalrecvd[] = "nsh: %s: Interrupted by signal\n"; const char g_fmtsignalrecvd[] = "nsh: %s: Interrupted by signal\n";
#endif
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
@ -834,13 +832,11 @@ static FAR char *nsh_filecat(FAR struct nsh_vtbl_s *vtbl, FAR char *s1,
{ {
/* EINTR is not an error (but will still stop the copy) */ /* EINTR is not an error (but will still stop the copy) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errno == EINTR) if (errno == EINTR)
{ {
nsh_error(vtbl, g_fmtsignalrecvd, "``"); nsh_error(vtbl, g_fmtsignalrecvd, "``");
} }
else else
#endif
{ {
/* Read error */ /* Read error */

View File

@ -101,9 +101,7 @@ struct nsh_taskstatus_s
FAR const char *td_flags; /* Thread flags */ FAR const char *td_flags; /* Thread flags */
FAR const char *td_priority; /* Thread priority */ FAR const char *td_priority; /* Thread priority */
FAR const char *td_policy; /* Thread scheduler */ FAR const char *td_policy; /* Thread scheduler */
#ifndef CONFIG_DISABLE_SIGNALS
FAR const char *td_sigmask; /* Signal mask */ FAR const char *td_sigmask; /* Signal mask */
#endif
}; };
/* Status strings */ /* Status strings */
@ -131,10 +129,7 @@ static const char g_state[] = "State:";
static const char g_flags[] = "Flags:"; static const char g_flags[] = "Flags:";
static const char g_priority[] = "Priority:"; static const char g_priority[] = "Priority:";
static const char g_scheduler[] = "Scheduler:"; static const char g_scheduler[] = "Scheduler:";
#ifndef CONFIG_DISABLE_SIGNALS
static const char g_sigmask[] = "SigMask:"; static const char g_sigmask[] = "SigMask:";
#endif
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE) #if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
static const char g_stacksize[] = "StackSize:"; static const char g_stacksize[] = "StackSize:";
@ -260,13 +255,10 @@ static void nsh_parse_statusline(FAR char *line,
status->td_policy = nsh_trimspaces(&line[12+6]); status->td_policy = nsh_trimspaces(&line[12+6]);
} }
#ifndef CONFIG_DISABLE_SIGNALS
else if (strncmp(line, g_sigmask, strlen(g_sigmask)) == 0) else if (strncmp(line, g_sigmask, strlen(g_sigmask)) == 0)
{ {
status->td_sigmask = nsh_trimspaces(&line[12]); status->td_sigmask = nsh_trimspaces(&line[12]);
} }
#endif
} }
#endif #endif
@ -334,9 +326,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
status.td_flags = ""; status.td_flags = "";
status.td_priority = ""; status.td_priority = "";
status.td_policy = ""; status.td_policy = "";
#ifndef CONFIG_DISABLE_SIGNALS
status.td_sigmask = ""; status.td_sigmask = "";
#endif
/* Read the task status */ /* Read the task status */
@ -403,10 +393,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
nsh_output(vtbl, "%3s %-8s %-7s %3s %-8s %-9s ", nsh_output(vtbl, "%3s %-8s %-7s %3s %-8s %-9s ",
status.td_priority, status.td_policy, status.td_type, status.td_priority, status.td_policy, status.td_type,
status.td_flags, status.td_state, status.td_event); status.td_flags, status.td_state, status.td_event);
#ifndef CONFIG_DISABLE_SIGNALS
nsh_output(vtbl, "%-8s ", status.td_sigmask); nsh_output(vtbl, "%-8s ", status.td_sigmask);
#endif
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE) #if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
/* Get the StackSize and StackUsed */ /* Get the StackSize and StackUsed */
@ -596,10 +583,7 @@ int cmd_ps(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
nsh_output(vtbl, "%3s %-8s %-7s %3s %-8s %-9s ", nsh_output(vtbl, "%3s %-8s %-7s %3s %-8s %-9s ",
"PRI", "POLICY", "TYPE", "NPX", "STATE", "EVENT"); "PRI", "POLICY", "TYPE", "NPX", "STATE", "EVENT");
#ifndef CONFIG_DISABLE_SIGNALS
nsh_output(vtbl, "%-8s ", "SIGMASK"); nsh_output(vtbl, "%-8s ", "SIGMASK");
#endif
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE) #if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
nsh_output(vtbl, "%6s ", "STACK"); nsh_output(vtbl, "%6s ", "STACK");
@ -623,7 +607,6 @@ int cmd_ps(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* Name: cmd_kill * Name: cmd_kill
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
#ifndef CONFIG_NSH_DISABLE_KILL #ifndef CONFIG_NSH_DISABLE_KILL
int cmd_kill(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) int cmd_kill(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
@ -691,13 +674,11 @@ invalid_arg:
return ERROR; return ERROR;
} }
#endif #endif
#endif
/**************************************************************************** /****************************************************************************
* Name: cmd_sleep * Name: cmd_sleep
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
#ifndef CONFIG_NSH_DISABLE_SLEEP #ifndef CONFIG_NSH_DISABLE_SLEEP
int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
@ -715,13 +696,11 @@ int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return OK; return OK;
} }
#endif #endif
#endif
/**************************************************************************** /****************************************************************************
* Name: cmd_usleep * Name: cmd_usleep
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
#ifndef CONFIG_NSH_DISABLE_USLEEP #ifndef CONFIG_NSH_DISABLE_USLEEP
int cmd_usleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) int cmd_usleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
@ -739,4 +718,3 @@ int cmd_usleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return OK; return OK;
} }
#endif #endif
#endif

View File

@ -179,9 +179,9 @@ struct composite_state_s
FAR void *cmphandle; /* Composite device handle */ FAR void *cmphandle; /* Composite device handle */
#ifndef CONFIG_NSH_BUILTIN_APPS
/* Serial file descriptors */ /* Serial file descriptors */
#if !defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_DISABLE_SIGNALS)
int outfd; /* Blocking write-only */ int outfd; /* Blocking write-only */
int infd; /* Non-blockig read-only */ int infd; /* Non-blockig read-only */
#endif #endif
@ -198,7 +198,7 @@ struct composite_state_s
/* Serial I/O buffer */ /* Serial I/O buffer */
#if !defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_DISABLE_SIGNALS) #ifndef CONFIG_NSH_BUILTIN_APPS
uint8_t serbuf[CONFIG_SYSTEM_COMPOSITE_BUFSIZE]; uint8_t serbuf[CONFIG_SYSTEM_COMPOSITE_BUFSIZE];
#endif #endif
}; };

View File

@ -64,7 +64,7 @@
#undef NEED_DUMPTRACE #undef NEED_DUMPTRACE
#ifdef CONFIG_USBDEV_TRACE #ifdef CONFIG_USBDEV_TRACE
# if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) # if !defined(CONFIG_NSH_BUILTIN_APPS)
# define NEED_DUMPTRACE 1 # define NEED_DUMPTRACE 1
# elif CONFIG_USBDEV_TRACE_INITIALIDSET != 0 # elif CONFIG_USBDEV_TRACE_INITIALIDSET != 0
# define NEED_DUMPTRACE 1 # define NEED_DUMPTRACE 1
@ -397,7 +397,7 @@ static int dumptrace(void)
* Name: open_serial * Name: open_serial
****************************************************************************/ ****************************************************************************/
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) #ifndef CONFIG_NSH_BUILTIN_APPS
static int open_serial(void) static int open_serial(void)
{ {
int errcode; int errcode;
@ -622,13 +622,9 @@ int conn_main(int argc, char *argv[])
} }
#endif #endif
/* It this program was configued as an NSH command, then just exit now. /* It this program was configued as an NSH command, then just exit now. */
* Also, if signals are not enabled (and, hence, sleep() is not supported.
* then we have not real option but to exit now.
*/
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS)
#ifndef CONFIG_NSH_BUILTIN_APPS
/* Otherwise, this thread will hang around and monitor the USB activity */ /* Otherwise, this thread will hang around and monitor the USB activity */
/* Open the serial driver */ /* Open the serial driver */
@ -680,11 +676,9 @@ int conn_main(int argc, char *argv[])
/* Dump debug memory usage */ /* Dump debug memory usage */
printf("conn_main: Exiting\n"); printf("conn_main: Exiting\n");
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) #ifndef CONFIG_NSH_BUILTIN_APPS
close(g_composite.infd); close(g_composite.infd);
close(g_composite.outfd); close(g_composite.outfd);
#endif
#ifdef CONFIG_NSH_BUILTIN_APPS
#endif #endif
final_memory_usage("Final memory usage"); final_memory_usage("Final memory usage");
return 0; return 0;
@ -693,7 +687,7 @@ int conn_main(int argc, char *argv[])
errout_bad_dump: errout_bad_dump:
#endif #endif
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) #ifndef CONFIG_NSH_BUILTIN_APPS
errout: errout:
close(g_composite.infd); close(g_composite.infd);
close(g_composite.outfd); close(g_composite.outfd);

View File

@ -66,9 +66,7 @@ static FAR const char *g_statenames[] =
"Running", "Running",
"Inactive", "Inactive",
"Waiting for Semaphore", "Waiting for Semaphore",
#ifndef CONFIG_DISABLE_SIGNALS
"Waiting for Signal", "Waiting for Signal",
#endif
#ifndef CONFIG_DISABLE_MQUEUE #ifndef CONFIG_DISABLE_MQUEUE
"Waiting for MQ empty", "Waiting for MQ empty",
"Waiting for MQ full" "Waiting for MQ full"

View File

@ -574,16 +574,12 @@ int msconn_main(int argc, char *argv[])
check_test_memory_usage("After usbmsc_exportluns()"); check_test_memory_usage("After usbmsc_exportluns()");
/* It this program was configured as an NSH command, then just exit now. /* It this program was configured as an NSH command, then just exit now. */
* Also, if signals are not enabled (and, hence, sleep() is not supported.
* then we have not real option but to exit now.
*/
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS)
#ifndef CONFIG_NSH_BUILTIN_APPS
/* Otherwise, this thread will hang around and monitor the USB storage activity */ /* Otherwise, this thread will hang around and monitor the USB storage activity */
for (;;) for (; ; )
{ {
fflush(stdout); fflush(stdout);
sleep(5); sleep(5);
@ -603,8 +599,8 @@ int msconn_main(int argc, char *argv[])
printf("mcsonn_main: Still alive\n"); printf("mcsonn_main: Still alive\n");
# endif # endif
} }
#elif defined(CONFIG_NSH_BUILTIN_APPS)
#else
/* Return the USB mass storage device handle so it can be used by the 'msconn' /* Return the USB mass storage device handle so it can be used by the 'msconn'
* command. * command.
*/ */
@ -612,16 +608,6 @@ int msconn_main(int argc, char *argv[])
printf("mcsonn_main: Connected\n"); printf("mcsonn_main: Connected\n");
g_usbmsc.mshandle = handle; g_usbmsc.mshandle = handle;
check_test_memory_usage("After MS connection"); check_test_memory_usage("After MS connection");
#else /* defined(CONFIG_DISABLE_SIGNALS) */
/* Just exit */
printf("mcsonn_main: Exiting\n");
/* Dump debug memory usage */
final_memory_usage("Final memory usage");
#endif #endif
return EXIT_SUCCESS; return EXIT_SUCCESS;

View File

@ -6,7 +6,6 @@
config TESTING_OSTEST config TESTING_OSTEST
tristate "OS test example" tristate "OS test example"
default n default n
depends on !DISABLE_SIGNALS
---help--- ---help---
Enable the OS test example Enable the OS test example
@ -107,7 +106,7 @@ config TESTING_OSTEST_FPUSTACKSIZE
default 2048 default 2048
endif # !TESTING_OSTEST_FPUTESTDISABLE endif # !TESTING_OSTEST_FPUTESTDISABLE
endif # ARCH_FPU && SCHED_WAITPID && !DISABLE_SIGNALS endif # ARCH_FPU && SCHED_WAITPID
config TESTING_OSTEST_WAITRESULT config TESTING_OSTEST_WAITRESULT
bool "Wait and return test result" bool "Wait and return test result"

View File

@ -44,17 +44,14 @@ STACKSIZE = 2048
# NuttX OS Test # NuttX OS Test
ASRCS = ASRCS =
CSRCS = dev_null.c restart.c sigprocmask.c CSRCS = dev_null.c restart.c sigprocmask.c sighand.c signest.c
MAINSRC = ostest_main.c MAINSRC = ostest_main.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CSRCS += sighand.c signest.c
ifeq ($(CONFIG_SIG_SIGSTOP_ACTION),y) ifeq ($(CONFIG_SIG_SIGSTOP_ACTION),y)
ifeq ($(CONFIG_SIG_SIGKILL_ACTION),y) ifeq ($(CONFIG_SIG_SIGKILL_ACTION),y)
CSRCS += suspend.c CSRCS += suspend.c
endif endif
endif endif
endif
ifeq ($(CONFIG_ARCH_FPU),y) ifeq ($(CONFIG_ARCH_FPU),y)
ifneq ($(CONFIG_TESTING_OSTEST_FPUTESTDISABLE),y) ifneq ($(CONFIG_TESTING_OSTEST_FPUTESTDISABLE),y)

View File

@ -221,7 +221,7 @@ static FAR void *mqueue_waiter(FAR void *parameter)
} }
#endif #endif
#if !defined(CONFIG_DISABLE_SIGNALS) && defined(CONFIG_CANCELLATION_POINTS) #ifdef CONFIG_CANCELLATION_POINTS
static FAR void *sig_waiter(FAR void *parameter) static FAR void *sig_waiter(FAR void *parameter)
{ {
struct siginfo info; struct siginfo info;
@ -707,7 +707,7 @@ void cancel_test(void)
printf("cancel_test: Test 7: Cancel signal wait\n"); printf("cancel_test: Test 7: Cancel signal wait\n");
printf("cancel_test: Starting thread (cancelable)\n"); printf("cancel_test: Starting thread (cancelable)\n");
#if !defined(CONFIG_DISABLE_SIGNALS) && defined(CONFIG_CANCELLATION_POINTS) #ifdef CONFIG_CANCELLATION_POINTS
/* Start the sig_waiter thread */ /* Start the sig_waiter thread */
restart_thread(sig_waiter, &waiter, 0); restart_thread(sig_waiter, &waiter, 0);

View File

@ -37,14 +37,6 @@
#ifndef __APPS_TESTING_OSTEST_OSTEST_H #ifndef __APPS_TESTING_OSTEST_OSTEST_H
#define __APPS_TESTING_OSTEST_OSTEST_H #define __APPS_TESTING_OSTEST_OSTEST_H
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_DISABLE_SIGNALS
# error Signals are disabled (CONFIG_DISABLE_SIGNALS)
#endif
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/

View File

@ -476,7 +476,6 @@ static int user_main(int argc, char *argv[])
sigprocmask_test(); sigprocmask_test();
check_test_memory_usage(); check_test_memory_usage();
#ifndef CONFIG_DISABLE_SIGNALS
/* Verify signal handlers */ /* Verify signal handlers */
printf("\nuser_main: signal handler test\n"); printf("\nuser_main: signal handler test\n");
@ -492,7 +491,6 @@ static int user_main(int argc, char *argv[])
suspend_test(); suspend_test();
check_test_memory_usage(); check_test_memory_usage();
#endif #endif
#endif
#ifndef CONFIG_DISABLE_POSIX_TIMERS #ifndef CONFIG_DISABLE_POSIX_TIMERS
/* Verify posix timers (with SIGEV_SIGNAL) */ /* Verify posix timers (with SIGEV_SIGNAL) */