mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard.
This commit is contained in:
parent
ab7c5a7d4e
commit
e806097c70
550 changed files with 664 additions and 2928 deletions
|
|
@ -43,31 +43,21 @@ config EXAMPLES_TIMER_SIGNO
|
|||
This is the signal number that is used to notify the test of
|
||||
timer expiration events.
|
||||
|
||||
config EXAMPLES_TIMER_APPNAME
|
||||
string "Timer executable name"
|
||||
default "timer"
|
||||
depends on NSH_BUILTIN_APPS
|
||||
---help---
|
||||
This is the name of the built-in application
|
||||
|
||||
config EXAMPLES_TIMER_STACKSIZE
|
||||
int "Timer stack size"
|
||||
default 2048
|
||||
depends on NSH_BUILTIN_APPS
|
||||
---help---
|
||||
This is the stack size allocated when the timer task runs
|
||||
|
||||
config EXAMPLES_TIMER_PRIORITY
|
||||
int "Timer task priority"
|
||||
default 100
|
||||
depends on NSH_BUILTIN_APPS
|
||||
---help---
|
||||
This is the priority of the timer task
|
||||
|
||||
config EXAMPLES_TIMER_PROGNAME
|
||||
string "Timer program name"
|
||||
default "timer"
|
||||
depends on BUILD_LOADABLE
|
||||
---help---
|
||||
This is the name of the program that will be used when the NSH ELF
|
||||
program is installed.
|
||||
|
|
|
|||
|
|
@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# Timer built-in application info
|
||||
|
||||
CONFIG_EXAMPLES_TIMER_APPNAME ?= "timer"
|
||||
CONFIG_EXAMPLES_TIMER_STACKSIZE ?= 2048
|
||||
CONFIG_EXAMPLES_TIMER_PRIORITY ?= 100
|
||||
CONFIG_EXAMPLES_TIMER_PROGNAME ?= "timer"
|
||||
|
||||
APPNAME = $(CONFIG_EXAMPLES_TIMER_APPNAME)
|
||||
PROGNAME = $(CONFIG_EXAMPLES_TIMER_PROGNAME)
|
||||
PRIORITY = $(CONFIG_EXAMPLES_TIMER_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_EXAMPLES_TIMER_STACKSIZE)
|
||||
PROGNAME = $(CONFIG_EXAMPLES_TIMER_PROGNAME)
|
||||
MODULE = $(CONFIG_EXAMPLES_TIMER)
|
||||
|
||||
# Timer example
|
||||
|
||||
MAINSRC = timer_main.c
|
||||
|
||||
MODULE = CONFIG_EXAMPLES_TIMER
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -135,11 +135,7 @@ static void timer_status(int fd)
|
|||
* timer_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int timer_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
struct timer_notify_s notify;
|
||||
struct sigaction act;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue