apps/system/sched_note: Move the schduler note monitor from example/ to system/
This commit is contained in:
parent
4f33dd14d4
commit
62fec5d57d
@ -68,7 +68,6 @@ source "$APPSDIR/examples/relays/Kconfig"
|
||||
source "$APPSDIR/examples/rgbled/Kconfig"
|
||||
source "$APPSDIR/examples/rgmp/Kconfig"
|
||||
source "$APPSDIR/examples/romfs/Kconfig"
|
||||
source "$APPSDIR/examples/sched_note/Kconfig"
|
||||
source "$APPSDIR/examples/sendmail/Kconfig"
|
||||
source "$APPSDIR/examples/serialblaster/Kconfig"
|
||||
source "$APPSDIR/examples/serialrx/Kconfig"
|
||||
|
@ -1751,11 +1751,6 @@ examples/romfs
|
||||
* CONFIG_EXAMPLES_ROMFS_MOUNTPOINT
|
||||
The location to mount the ROM disk. Deafault: "/usr/local/share"
|
||||
|
||||
examples/sched_note
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This is a simple test of the Scheduler instrumentation logic.
|
||||
|
||||
examples/sendmail
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
############################################################################
|
||||
# apps/examples/note/Make.defs
|
||||
# Adds selected applications to apps/ build
|
||||
#
|
||||
# Copyright (C) 2016 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_EXAMPLES_NOTE),y)
|
||||
CONFIGURED_APPS += examples/sched_note
|
||||
endif
|
@ -22,6 +22,7 @@ source "$APPSDIR/system/mdio/Kconfig"
|
||||
source "$APPSDIR/system/sudoku/Kconfig"
|
||||
source "$APPSDIR/system/lm75/Kconfig"
|
||||
source "$APPSDIR/system/vi/Kconfig"
|
||||
source "$APPSDIR/system/sched_note/Kconfig"
|
||||
source "$APPSDIR/system/stackmonitor/Kconfig"
|
||||
source "$APPSDIR/system/symtab/Kconfig"
|
||||
source "$APPSDIR/system/cdcacm/Kconfig"
|
||||
|
@ -102,6 +102,10 @@ ifeq ($(CONFIG_SYSTEM_READLINE),y)
|
||||
CONFIGURED_APPS += system/readline
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSTEM_NOTE),y)
|
||||
CONFIGURED_APPS += system/sched_note
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSTEM_SUDOKU),y)
|
||||
CONFIGURED_APPS += system/sudoku
|
||||
endif
|
||||
|
@ -87,11 +87,11 @@ else
|
||||
INSTALL_DIR = $(BIN_DIR)
|
||||
endif
|
||||
|
||||
CONFIG_EXAMPLES_HEX2BIN_PROGNAME ?= hex2bin$(EXEEXT)
|
||||
HEX2BIN_PROGNAME = $(CONFIG_EXAMPLES_HEX2BIN_PROGNAME)
|
||||
CONFIG_SYSTEM_HEX2BIN_PROGNAME ?= hex2bin$(EXEEXT)
|
||||
HEX2BIN_PROGNAME = $(CONFIG_SYSTEM_HEX2BIN_PROGNAME)
|
||||
|
||||
CONFIG_EXAMPLES_HEX2MEM_PROGNAME ?= hex2mem$(EXEEXT)
|
||||
HEX2MEM_PROGNAME = $(CONFIG_EXAMPLES_HEX2MEM_PROGNAME)
|
||||
CONFIG_SYSTEM_HEX2MEM_PROGNAME ?= hex2mem$(EXEEXT)
|
||||
HEX2MEM_PROGNAME = $(CONFIG_SYSTEM_HEX2MEM_PROGNAME)
|
||||
|
||||
ROOTDEPPATH = --dep-path .
|
||||
VPATH =
|
||||
|
@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# apps/examples/mdio/Makefile
|
||||
# apps/system/mdio/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2010-2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* examples/mdio/mdio_main.c
|
||||
* system/mdio/mdio_main.c
|
||||
*
|
||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* examples/prun/prun.h
|
||||
* apps/system/prun/prun.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -33,8 +33,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __EXAMPLES_PASHELLO_H
|
||||
#define __EXAMPLES_PASHELLO_H
|
||||
#ifndef __APPS_SYSTEM_PRUN_H
|
||||
#define __APPS_SYSTEM_PRUN_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@ -52,4 +52,4 @@
|
||||
|
||||
extern void hello_register(void);
|
||||
|
||||
#endif /* __EXAMPLES_PASHELLO_H */
|
||||
#endif /* __APPS_SYSTEM_PRUN_H */
|
||||
|
@ -3,16 +3,16 @@
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
config EXAMPLES_NOTE
|
||||
bool "Scheduler instrumentation example"
|
||||
config SYSTEM_NOTE
|
||||
bool "Scheduler monitor"
|
||||
default n
|
||||
depends on DRIVER_NOTE
|
||||
---help---
|
||||
Enable the schedler instrumentation example
|
||||
Enable the schedler instrumentation monitor
|
||||
|
||||
if EXAMPLES_NOTE
|
||||
if SYSTEM_NOTE
|
||||
|
||||
config EXAMPLES_NOTE_PROGNAME
|
||||
config SYSTEM_NOTE_PROGNAME
|
||||
string "Program name"
|
||||
default "note"
|
||||
depends on BUILD_KERNEL
|
||||
@ -20,20 +20,20 @@ config EXAMPLES_NOTE_PROGNAME
|
||||
This is the name of the program that will be use when the NSH ELF
|
||||
program is installed.
|
||||
|
||||
config EXAMPLES_NOTE_PRIORITY
|
||||
config SYSTEM_NOTE_PRIORITY
|
||||
int "Note daemon task priority"
|
||||
default 100
|
||||
|
||||
config EXAMPLES_NOTE_STACKSIZE
|
||||
config SYSTEM_NOTE_STACKSIZE
|
||||
int "Note daemon stack size"
|
||||
default 2048
|
||||
|
||||
config EXAMPLES_NOTE_BUFFERSIZE
|
||||
config SYSTEM_NOTE_BUFFERSIZE
|
||||
int "Note daemon I/O buffer size"
|
||||
default 1024
|
||||
|
||||
config EXAMPLES_NOTE_DELAY
|
||||
config SYSTEM_NOTE_DELAY
|
||||
int "Note daemon sample delay (msec)"
|
||||
default 1000
|
||||
|
||||
endif # EXAMPLES_NOTE
|
||||
endif # SYSTEM_NOTE
|
@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# apps/examples/note/Makefile
|
||||
# apps/system/note/Makefile
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -37,12 +37,12 @@
|
||||
|
||||
# LED driver test built-in application info
|
||||
|
||||
CONFIG_EXAMPLES_NOTE_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_EXAMPLES_NOTE_STACKSIZE ?= 2048
|
||||
CONFIG_SYSTEM_NOTE_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_SYSTEM_NOTE_STACKSIZE ?= 2048
|
||||
|
||||
APPNAME = note
|
||||
PRIORITY = $(CONFIG_EXAMPLES_NOTE_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_EXAMPLES_NOTE_STACKSIZE)
|
||||
PRIORITY = $(CONFIG_SYSTEM_NOTE_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_SYSTEM_NOTE_STACKSIZE)
|
||||
|
||||
# LED driver test
|
||||
|
||||
@ -50,7 +50,7 @@ ASRCS =
|
||||
CSRCS =
|
||||
MAINSRC = note_main.c
|
||||
|
||||
CONFIG_EXAMPLES_NOTE_PROGNAME ?= note$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_EXAMPLES_NOTE_PROGNAME)
|
||||
CONFIG_SYSTEM_NOTE_PROGNAME ?= note$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_SYSTEM_NOTE_PROGNAME)
|
||||
|
||||
include $(APPDIR)/Application.mk
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* examples/note/note_main.c
|
||||
* system/note/note_main.c
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -54,7 +54,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
static bool g_note_daemon_started;
|
||||
static uint8_t g_note_buffer[CONFIG_EXAMPLES_NOTE_BUFFERSIZE];
|
||||
static uint8_t g_note_buffer[CONFIG_SYSTEM_NOTE_BUFFERSIZE];
|
||||
|
||||
/* Names of task/thread states */
|
||||
|
||||
@ -377,13 +377,13 @@ static int note_daemon(int argc, char *argv[])
|
||||
|
||||
for (; ; )
|
||||
{
|
||||
nread = read(fd, g_note_buffer, CONFIG_EXAMPLES_NOTE_BUFFERSIZE);
|
||||
nread = read(fd, g_note_buffer, CONFIG_SYSTEM_NOTE_BUFFERSIZE);
|
||||
if (nread > 0)
|
||||
{
|
||||
dump_notes(nread);
|
||||
}
|
||||
|
||||
usleep(CONFIG_EXAMPLES_NOTE_DELAY * 1000L);
|
||||
usleep(CONFIG_SYSTEM_NOTE_DELAY * 1000L);
|
||||
}
|
||||
|
||||
(void)close(fd);
|
||||
@ -422,8 +422,8 @@ int note_main(int argc, FAR char *argv[])
|
||||
ledargv[0] = "note_daemon";
|
||||
ledargv[1] = NULL;
|
||||
|
||||
ret = task_create("note_daemon", CONFIG_EXAMPLES_NOTE_PRIORITY,
|
||||
CONFIG_EXAMPLES_NOTE_STACKSIZE, note_daemon,
|
||||
ret = task_create("note_daemon", CONFIG_SYSTEM_NOTE_PRIORITY,
|
||||
CONFIG_SYSTEM_NOTE_STACKSIZE, note_daemon,
|
||||
(FAR char * const *)ledargv);
|
||||
if (ret < 0)
|
||||
{
|
Loading…
Reference in New Issue
Block a user