Correct a few things from the last commit.

This commit is contained in:
Gregory Nutt 2016-12-01 16:56:47 -06:00
parent 38e3619e21
commit 8374ab4363
6 changed files with 50 additions and 5 deletions

View File

@ -145,5 +145,11 @@ config EXAMPLES_NXTEXT_LISTENERPRIO
---help---
The priority of the event listener thread. Default 100.
config EXAMPLES_NXTEXT_CLIENTPRIO
int "Client Priority"
default 100
---help---
The client priority. Default: 100
endif # NX_MULTIUSER
endif # EXAMPLES_NXTEXT

View File

@ -178,6 +178,9 @@
# ifndef CONFIG_EXAMPLES_NXTEXT_LISTENERPRIO
# define CONFIG_EXAMPLES_NXTEXT_LISTENERPRIO 100
# endif
# ifndef CONFIG_EXAMPLES_NXTEXT_CLIENTPRIO
# define CONFIG_EXAMPLES_NXTEXT_CLIENTPRIO 100
# endif
#endif
/* Bitmap flags */

View File

@ -286,6 +286,17 @@ static inline int nxtext_muinitialize(void)
pthread_t thread;
int ret;
/* Set the client task priority */
param.sched_priority = CONFIG_EXAMPLES_NXTEXT_CLIENTPRIO;
ret = sched_setparam(0, &param);
if (ret < 0)
{
printf("nxtext_initialize: sched_setparam failed: %d\n" , ret);
g_exitcode = NXEXIT_SCHEDSETPARAM;
return ERROR;
}
/* Start the NX server kernel thread */
printf("nxtext_initialize: Starting NX server\n");

View File

@ -2,6 +2,7 @@
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config GRAPHICS_TRAVELER
bool "Traveler game"
default n
@ -11,6 +12,30 @@ config GRAPHICS_TRAVELER
if GRAPHICS_TRAVELER
if NX_MULTIUSER
comment "Multi-User Configuration Options"
config GRAPHICS_TRAVELER_STACKSIZE
int "Listener Stack Size"
default 2048
---help---
The stacksize to use when starting the NX listener. Default 2048
config GRAPHICS_TRAVELER_LISTENERPRIO
int "Listener Priority"
default 80
---help---
The priority of the event listener thread. Default 100.
config GRAPHICS_TRAVELER_CLIENTPRIO
int "Client Priority"
default 100
---help---
The client priority. Default: 100
endif # NX_MULTIUSER
comment "Color configuration"
choice

View File

@ -106,8 +106,8 @@ else
INSTALL_DIR = $(BIN_DIR)
endif
CONFIG_EXAMPLES_HELLO_PROGNAME ?= hello$(EXEEXT)
PROGNAME = $(CONFIG_EXAMPLES_HELLO_PROGNAME)
CONFIG_GRAPHICS_TRAVELER_PROGNAME ?= hello$(EXEEXT)
PROGNAME = $(CONFIG_GRAPHICS_TRAVELER_PROGNAME)
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TRAVELER_INC)}

View File

@ -238,7 +238,7 @@ static inline int trv_nxmu_initialize(FAR struct trv_graphics_info_s *ginfo)
/* Set the client task priority */
param.sched_priority = CONFIG_EXAMPLES_NX_CLIENTPRIO;
param.sched_priority = CONFIG_GRAPHICS_TRAVELER_CLIENTPRIO;
ret = sched_setparam(0, &param);
if (ret < 0)
{
@ -282,9 +282,9 @@ static inline int trv_nxmu_initialize(FAR struct trv_graphics_info_s *ginfo)
*/
(void)pthread_attr_init(&attr);
param.sched_priority = CONFIG_EXAMPLES_NX_LISTENERPRIO;
param.sched_priority = CONFIG_GRAPHICS_TRAVELER_LISTENERPRIO;
(void)pthread_attr_setschedparam(&attr, &param);
(void)pthread_attr_setstacksize(&attr, CONFIG_EXAMPLES_NX_STACKSIZE);
(void)pthread_attr_setstacksize(&attr, CONFIG_GRAPHICS_TRAVELER_STACKSIZE);
ret = pthread_create(&thread, &attr, trv_nxlistener, NULL);
if (ret != 0)