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:
CONFIG_DISABLE_SIGNALS - Must *NOT* be selected
CONFIG_AJOYSTICK - The analog joystick driver
Example Configuration:
@ -292,7 +291,6 @@ examples/djoystick
Configuration Pre-requisites:
CONFIG_DISABLE_SIGNALS - Must *NOT* be selected
CONFIG_DJOYSTICK - The discrete joystick driver
Example Configuration:
@ -979,7 +977,6 @@ examples/nx
if they are not as expected:
CONFIG_DISABLE_MQUEUE=n
CONFIG_DISABLE_SIGNALS=n
CONFIG_DISABLE_PTHREAD=n
CONFIG_NX_BLOCKING=y
CONFIG_LIB_BOARDCTL=y
@ -996,7 +993,6 @@ examples/nxterm
CONFIG_NX=y -- NX graphics must be enabled
CONFIG_NXTERM=y -- The NX console driver must be built
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_NX_BLOCKING=y -- pthread APIs must be blocking
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:
CONFIG_DISABLE_MQUEUE=n
CONFIG_DISABLE_SIGNALS=n
CONFIG_DISABLE_PTHREAD=n
CONFIG_NX_BLOCKING=y

View File

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

View File

@ -38,6 +38,19 @@ config EXAMPLES_BUTTONS_NAMES
---help---
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
config EXAMPLES_BUTTONS_QTD

View File

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

View File

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

View File

@ -38,7 +38,7 @@
include $(APPDIR)/Make.defs
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)
BUILD_SUBDIRS += helloxx
@ -52,10 +52,6 @@ ifneq ($(CONFIG_DISABLE_PTHREAD),y)
BUILD_SUBDIRS += mutex pthread
endif
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
BUILD_SUBDIRS += signal
endif
ifneq ($(CONFIG_ARCH_ADDRENV),y)
BUILD_SUBDIRS += task
endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -73,7 +73,7 @@ if NETINIT_THREAD
config NETINIT_MONITOR
bool "Monitor link state"
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---
By default the net initialization thread will bring-up the network
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
int "NTP client wakeup signal number"
default 18
depends on !DISABLE_SIGNALS
endif # NETUTILS_NTPCLIENT

View File

@ -587,7 +587,6 @@ int ntpc_start(void)
*
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
int ntpc_stop(void)
{
int ret;
@ -628,4 +627,3 @@ int ntpc_stop(void)
sched_unlock();
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
insmod CONFIG_MODULE
irqinfo CONFIG_FS_PROCFS && CONFIG_SCHED_IRQMONITOR
kill !CONFIG_DISABLE_SIGNALS
kill --
losetup !CONFIG_DISABLE_MOUNTPOINT && CONFIG_DEV_LOOP
ln CONFIG_PSEUDOFS_SOFTLINK
ls --
@ -1472,7 +1472,7 @@ Command Dependencies on Configuration Settings
set CONFIG_NSH_VARS || !CONFIG_DISABLE_ENVIRON
sh CONFIG_NFILE_STREAMS > 0 && !CONFIG_NSH_DISABLESCRIPT
shutdown CONFIG_BOARDCTL_POWEROFF || CONFIG_BOARDCTL_RESET
sleep !CONFIG_DISABLE_SIGNALS
sleep --
test !CONFIG_NSH_DISABLESCRIPT
telnetd CONFIG_NSH_TELNET && !CONFIG_NSH_DISABLE_TELNETD
time ---
@ -1484,7 +1484,7 @@ Command Dependencies on Configuration Settings
urlencode CONFIG_NETUTILS_CODECS && CONFIG_CODECS_URLCODE
useradd !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
xd ---
@ -1536,9 +1536,9 @@ All built-in applications require that support for NSH built-in applications has
Application Depends on Configuration
----------- --------------------------
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 &&
CONFIG_SYSTEM_PING6 && !CONFIG_DISABLE_POLL && !CONFIG_DISABLE_SIGNALS
CONFIG_SYSTEM_PING6 && !CONFIG_DISABLE_POLL
NSH-Specific Configuration Settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -851,9 +851,7 @@ extern const char g_fmtcontext[];
extern const char g_fmtcmdfailed[];
extern const char g_fmtcmdoutofmemory[];
extern const char g_fmtinternalerror[];
#ifndef CONFIG_DISABLE_SIGNALS
extern const char g_fmtsignalrecvd[];
#endif
/****************************************************************************
* 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);
#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);
# endif
# ifndef CONFIG_NSH_DISABLE_SLEEP
#endif
#ifndef CONFIG_NSH_DISABLE_SLEEP
int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif
# ifndef CONFIG_NSH_DISABLE_USLEEP
#endif
#ifndef CONFIG_NSH_DISABLE_USLEEP
int cmd_usleep(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif
#endif /* CONFIG_DISABLE_SIGNALS */
#endif
#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_BASE64)
# ifndef CONFIG_NSH_DISABLE_BASE64DEC

View File

@ -254,10 +254,8 @@ static const struct cmdmap_s g_cmdmap[] =
{ "irqinfo", cmd_irqinfo, 1, 1, NULL },
#endif
#ifndef CONFIG_DISABLE_SIGNALS
# ifndef CONFIG_NSH_DISABLE_KILL
#ifndef CONFIG_NSH_DISABLE_KILL
{ "kill", cmd_kill, 3, 3, "-<signal> <pid>" },
# endif
#endif
#ifndef CONFIG_DISABLE_MOUNTPOINT
@ -474,10 +472,8 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#endif
#ifndef CONFIG_DISABLE_SIGNALS
# ifndef CONFIG_NSH_DISABLE_SLEEP
#ifndef CONFIG_NSH_DISABLE_SLEEP
{ "sleep", cmd_sleep, 2, 2, "<sec>" },
# endif
#endif
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_TEST)
@ -544,10 +540,8 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#ifndef CONFIG_DISABLE_SIGNALS
# ifndef CONFIG_NSH_DISABLE_USLEEP
#ifndef CONFIG_NSH_DISABLE_USLEEP
{ "usleep", cmd_usleep, 2, 2, "<usec>" },
# endif
#endif
#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) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errno == EINTR)
{
nsh_error(vtbl, g_fmtsignalrecvd, argv[0]);
}
else
#endif
{
/* Read error */
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "read", NSH_ERRNO);
}
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) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errno == EINTR)
{
nsh_error(vtbl, g_fmtsignalrecvd, argv[0]);
}
else
#endif
{
/* Read error */
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "write", NSH_ERRNO);
}
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) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errval == EINTR)
{
nsh_error(vtbl, g_fmtsignalrecvd, cmd);
}
else
#endif
{
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) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errcode == EINTR)
{
nsh_error(vtbl, g_fmtsignalrecvd, cmd);
}
else
#endif
{
nsh_error(vtbl, g_fmtcmdfailed, cmd, "write",
NSH_ERRNO_OF(errcode));

View File

@ -280,9 +280,7 @@ const char g_fmtcmdfailed[] = "nsh: %s: %s failed: %d\n";
#endif
const char g_fmtcmdoutofmemory[] = "nsh: %s: out of memory\n";
const char g_fmtinternalerror[] = "nsh: %s: Internal error\n";
#ifndef CONFIG_DISABLE_SIGNALS
const char g_fmtsignalrecvd[] = "nsh: %s: Interrupted by signal\n";
#endif
/****************************************************************************
* 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) */
#ifndef CONFIG_DISABLE_SIGNALS
if (errno == EINTR)
{
nsh_error(vtbl, g_fmtsignalrecvd, "``");
}
else
#endif
{
/* Read error */

View File

@ -101,9 +101,7 @@ struct nsh_taskstatus_s
FAR const char *td_flags; /* Thread flags */
FAR const char *td_priority; /* Thread priority */
FAR const char *td_policy; /* Thread scheduler */
#ifndef CONFIG_DISABLE_SIGNALS
FAR const char *td_sigmask; /* Signal mask */
#endif
};
/* Status strings */
@ -131,10 +129,7 @@ static const char g_state[] = "State:";
static const char g_flags[] = "Flags:";
static const char g_priority[] = "Priority:";
static const char g_scheduler[] = "Scheduler:";
#ifndef CONFIG_DISABLE_SIGNALS
static const char g_sigmask[] = "SigMask:";
#endif
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
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]);
}
#ifndef CONFIG_DISABLE_SIGNALS
else if (strncmp(line, g_sigmask, strlen(g_sigmask)) == 0)
{
status->td_sigmask = nsh_trimspaces(&line[12]);
}
#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_priority = "";
status.td_policy = "";
#ifndef CONFIG_DISABLE_SIGNALS
status.td_sigmask = "";
#endif
/* 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 ",
status.td_priority, status.td_policy, status.td_type,
status.td_flags, status.td_state, status.td_event);
#ifndef CONFIG_DISABLE_SIGNALS
nsh_output(vtbl, "%-8s ", status.td_sigmask);
#endif
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
/* 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 ",
"PRI", "POLICY", "TYPE", "NPX", "STATE", "EVENT");
#ifndef CONFIG_DISABLE_SIGNALS
nsh_output(vtbl, "%-8s ", "SIGMASK");
#endif
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
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
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
#ifndef CONFIG_NSH_DISABLE_KILL
int cmd_kill(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
@ -691,13 +674,11 @@ invalid_arg:
return ERROR;
}
#endif
#endif
/****************************************************************************
* Name: cmd_sleep
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
#ifndef CONFIG_NSH_DISABLE_SLEEP
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;
}
#endif
#endif
/****************************************************************************
* Name: cmd_usleep
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNALS
#ifndef CONFIG_NSH_DISABLE_USLEEP
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;
}
#endif
#endif

View File

@ -179,9 +179,9 @@ struct composite_state_s
FAR void *cmphandle; /* Composite device handle */
#ifndef CONFIG_NSH_BUILTIN_APPS
/* Serial file descriptors */
#if !defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_DISABLE_SIGNALS)
int outfd; /* Blocking write-only */
int infd; /* Non-blockig read-only */
#endif
@ -198,7 +198,7 @@ struct composite_state_s
/* 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];
#endif
};

View File

@ -64,7 +64,7 @@
#undef NEED_DUMPTRACE
#ifdef CONFIG_USBDEV_TRACE
# if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS)
# if !defined(CONFIG_NSH_BUILTIN_APPS)
# define NEED_DUMPTRACE 1
# elif CONFIG_USBDEV_TRACE_INITIALIDSET != 0
# define NEED_DUMPTRACE 1
@ -397,7 +397,7 @@ static int dumptrace(void)
* Name: open_serial
****************************************************************************/
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS)
#ifndef CONFIG_NSH_BUILTIN_APPS
static int open_serial(void)
{
int errcode;
@ -622,13 +622,9 @@ int conn_main(int argc, char *argv[])
}
#endif
/* 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)
/* It this program was configued as an NSH command, then just exit now. */
#ifndef CONFIG_NSH_BUILTIN_APPS
/* Otherwise, this thread will hang around and monitor the USB activity */
/* Open the serial driver */
@ -680,11 +676,9 @@ int conn_main(int argc, char *argv[])
/* Dump debug memory usage */
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.outfd);
#endif
#ifdef CONFIG_NSH_BUILTIN_APPS
#endif
final_memory_usage("Final memory usage");
return 0;
@ -693,7 +687,7 @@ int conn_main(int argc, char *argv[])
errout_bad_dump:
#endif
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS)
#ifndef CONFIG_NSH_BUILTIN_APPS
errout:
close(g_composite.infd);
close(g_composite.outfd);

View File

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

View File

@ -574,16 +574,12 @@ int msconn_main(int argc, char *argv[])
check_test_memory_usage("After usbmsc_exportluns()");
/* 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)
/* It this program was configured as an NSH command, then just exit now. */
#ifndef CONFIG_NSH_BUILTIN_APPS
/* Otherwise, this thread will hang around and monitor the USB storage activity */
for (;;)
for (; ; )
{
fflush(stdout);
sleep(5);
@ -603,8 +599,8 @@ int msconn_main(int argc, char *argv[])
printf("mcsonn_main: Still alive\n");
# endif
}
#elif defined(CONFIG_NSH_BUILTIN_APPS)
#else
/* Return the USB mass storage device handle so it can be used by the 'msconn'
* command.
*/
@ -612,16 +608,6 @@ int msconn_main(int argc, char *argv[])
printf("mcsonn_main: Connected\n");
g_usbmsc.mshandle = handle;
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
return EXIT_SUCCESS;

View File

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

View File

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

View File

@ -221,7 +221,7 @@ static FAR void *mqueue_waiter(FAR void *parameter)
}
#endif
#if !defined(CONFIG_DISABLE_SIGNALS) && defined(CONFIG_CANCELLATION_POINTS)
#ifdef CONFIG_CANCELLATION_POINTS
static FAR void *sig_waiter(FAR void *parameter)
{
struct siginfo info;
@ -707,7 +707,7 @@ void cancel_test(void)
printf("cancel_test: Test 7: Cancel signal wait\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 */
restart_thread(sig_waiter, &waiter, 0);

View File

@ -37,14 +37,6 @@
#ifndef __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
****************************************************************************/

View File

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