Commit Graph

160 Commits

Author SHA1 Message Date
Nakamura, Yuuichi ec0212cc8a drivers/syslog/note_driver.c: nxstyle fix 2020-06-17 20:15:54 +08:00
Gregory Nutt 57bc329aac Run nxstyle all .c and .h files modified by PR. 2020-05-17 14:01:00 -03:00
Gregory Nutt a569006fd8 sched/: Make more naming consistent
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions

    nxsem_setprotocol -> nxsem_set_protocol
    nxsem_getprotocol -> nxsem_get_protocol
    nxsem_getvalue -> nxsem_get_value
2020-05-17 14:01:00 -03:00
Xiang Xiao 517974787f Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -06:00
liuhaitao bd924bf7fb syslog: correct to #ifdef CONFIG_SYSLOG_RPMSG to call syslog_rpmsg_init
Same as syslog/Make.defs to use #ifdef CONFIG_SYSLOG_RPMSG to build syslog_rpmsg.c
in which syslog_rpmsg_init defined.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-29 07:08:25 -06:00
Xiang Xiao 972033a61f syslog: Check sc_flush in't NULL before invocation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 13:48:56 +08:00
Xiang Xiao e9773addfa syslog/rpmsg: Fix warning: ‘syslog_rpmsg_write’ defined but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 13:48:56 +08:00
zhongan b4a50a9192 fix nxstyle warning.
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 12:30:50 -03:00
zhongan 987472d3bb syslog/rpmsg: remove unused local variable 'g_syslog_rpmsg_channel' which would cause build break.
Change-Id: Ie02ef9202ec2a9ecade62c47e4f8956adb96673f
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 12:30:50 -03:00
zhongan ab566de77a syslog/rpmsg: fix the naming conflict of function 'syslog_rpmsg_putc'.
Change-Id: I3f89bfed71edb85bc3006446c1f9141e95202b5c
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 12:30:50 -03:00
Nathan Hartman a5e643b0cd Fix typos in comments and documentation. 2020-03-16 20:01:11 -06:00
Xiang Xiao c161dc07a9 syslog/file: Remove syslog_dev_uninitialize return value
To simplify the initializition process
2020-02-27 08:02:50 -06:00
Xiang Xiao 1d339eb80c syslog: Make g_default_channel as static 2020-02-24 08:47:27 -06:00
Xiang Xiao 46e22d7fd9 syslog/rpmsg: Don't overwrite up_putc
Hook into syslog subsystem like ramlog approach
2020-02-24 08:47:13 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao ebdfc93ee3 drivers/syslog: Rename SYSLOG_NONE to SYSLOG_DEFAULT
Since syslog still output if ARCH_LOWPUTC == y and select the default syslog device by ARCH_LOWPUTC
2020-02-23 09:11:22 -06:00
Xiang Xiao bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao 892290f76b syslog: Call syslog_rpmsg_init inside syslog_initialize like other syslog driver 2020-02-19 07:19:34 -06:00
Xiang Xiao 553f12b4e8 syslog: Remove SYSLOG_SERIAL_CONSOLE which isn't really used 2020-02-19 07:19:20 -06:00
Xiang Xiao 51a2171c71 ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
And remove syslog_init_e because all initialization is later now and we don't
distinguish the initialition phase anymore after ramlog don't need special
initialize.
2020-02-18 13:04:45 -06:00
Xiang Xiao dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Xiang Xiao 6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Juha Niskanen 99a501b668 drivers/syslog/ramlog.c: Fix ramlog readers never woken up when using ramlog as syslog or console.
We also make an attempt to avoid the thundering herd problem if there are multiple readers/pollers.

Patch also removes forcing CONFIG_RAMLOG_CRLF in nuttx/syslog/ramlog.h as there is no point of wasting precious RAM for useless characters.
2019-11-14 07:40:35 -06:00
Juha Niskanen 219d99451a drivers/syslog/syslog_device.c: Fix assert that assumes re-opened syslog file is the same. Logic in syslog_file_channel() is calling syslog_initialize() for the default syslog device as a recovery action after failed syslog_dev_initialize(). 2019-11-08 07:43:24 -06:00
Guiding Li 8b92305265 This commit brings in the drivers needed to support OpenAMP. These changes were ported from https://github.com/FishsemiCode/nuttx. The current state: Most drivers do now compile but are not yet verfied.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.

Squashed commit of the following:

Author: Xiang Xiao <xiaoxiang@pinecone.net>
    include/nuttx/b2c.h and libx/libc/string:  Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.

Author: Gregory Nutt <gnutt@nuttx.org>
    Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
    Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
    tools/:  Fix the minor issue in Makefile

Author: Gregory Nutt <gnutt@nuttx.org>
    drivers/rptun/rptun.c:  Review for coding standard.  Run against tools/nxstyle.
    tools/LibTargets.mk:  Fix some TABs that were turned into spaces by a copy-paste.
    fs/hostfs:  Add configure and build support for hostfs RPC.
    drivers/timer:  Add configure and build support for syslog RTC.
    drivers/syslog:  Add configure and build support for syslog RPC.
    drivers/serial:  Add configure and build support for serial RPC.
    Kconfig, tools/*.mk. openamp/:  Add basic OpenAMP build support.
    drivers/rptun:  Add configure and build support for OpenAMP tunnel drivers.
    drivers/net:  Update Make.defs and Kconfig for OpenSDA support.
    Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c.  These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux.  Removed because we want to separate the activities.  We will just try to get the basic OpenAMP support in place for now.
    Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h.  These are specific to the Xiaomi application.

Author: zhuyanlin <zhuyanlin@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Jianli Dong <dongjianli@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Guiding Li <liguiding@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.
2019-11-02 11:30:33 -06:00
Juha Niskanen ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Juha Niskanen 8fa646f0e8 drivers/syslog: syslog_force does not set errno so do not test against it. Some changes to comments. 2019-09-16 07:48:48 -06:00
Nathan Hartman 366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Anthony Merlino 70404ed0dc Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
Iobinstrumentation

* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.

* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.

* fs/procfs: Starts adding support for /proc/iobinfo

* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 22:42:25 +00:00
Nathan Hartman 68d43d3679 Fix typos. 2019-08-04 14:50:28 -06:00
Gregory Nutt b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
raiden00pl e1e1e0a8db Merged in raiden00/nuttx_h7/sensors (pull request #863)
Add some I2C devices to nucleo-h743zi and a few small fixes

configs/nucleo-h743zi: add support for ssd1306

configs/nucleo-h743zi: add support for pca9635

configs/nucleo-h743zi: add support for i2ctools

include/nuttx/sensors/lsm6dsl.h: remove whitespaces

configs/stm32f103-minimum/src/stm32_ssd1306.c: cosmetics

Documentation/NuttxPortingGuide.html: vsyslog return none

drivers/syslog/README.txt: vsyslog return none

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-04-28 12:36:55 +00:00
Jussi Kivilinna 0725be9773 drivers/syslog/syslog_stream.c: In syslog bufferedmode, avoid IOB alloc lock-up with heavy network activity. This change alters the buffered syslog logic to use 'iob_tryalloc' instead of blocking 'iob_alloc' to avoid syslog printing from getting stuck when all IOBs are depleted by network activity. An issue was seen when large incoming TCP transfer uses free IOB buffers and processing threads try to use syslog which then block at iob_alloc. 2019-04-03 07:35:38 -06:00
Gregory Nutt a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt a2e62f557d Squashed commit of the following:
sched/init/nx_bringup.c:  Fix a naming collision.
    sched/init:  Rename os_start() to nx_start()
    sched/init:  Rename os_smp* to nx_smp*
    sched/init:  Rename os_bringup to nx_bringup
    sched/init:  rename all internal static functions to begin with nx_ vs os_
2019-02-04 16:20:35 -06:00
Xiang Xiao bdbc91be98 drivers/syslog/ramlog.c: Fix error: Conflicting types for 'ramlog_addchar' 2019-01-27 12:12:19 -06:00
Xiang Xiao 7828dff2ea drivers/syslog: syslog_initialize initialize dev/syslog too and call syslog to add the prefix and timestamp 2018-11-09 08:49:07 -06:00
Xiang Xiao f579c43754 drivers/syslog: Ensure interrupt log doesn't interlace in normal log. Don't call syslog_putc in syslog_default_write because syslog_putc will try to empty the interrupt buffer every time. 2018-11-09 08:46:32 -06:00
Xiang Xiao e3f23b5bca drivers/syslog/syslog_putc.c: call sc_force in idle task even interrupt buffer enabled. The following cases may hang randomly in the bring up phase: (1) boot up process and (2) suspend/resume process. Either case runs in the idle task context, so it's difficult to debug the hang issue if these output go through the interrupt buffer. 2018-11-09 08:39:26 -06:00
Xiang Xiao 16909c80a3 drivers/syslog/syslog_flush.c: Uncomment the g_syslog_channel->sc_flush call 2018-11-09 08:36:45 -06:00
Xiang Xiao 0f940e06f5 drivers/syslog/vsyslog.c: nx_syslog's return value should include the timestamp length 2018-11-09 08:35:20 -06:00
Gregory Nutt 3a4984a40b Rename file_close_detached() to juse file_close() for better consistency in naming. 2018-09-15 13:04:56 -06:00
Gregory Nutt a7fd58c4db Squashed commit of the following:
many locations:  Change occurences of open() followed by file_detach() to file_open().  Change most non-controversion calls to open() to nx_open().

    fs/inode/fs_fileopen.c:  Flesh out file_open() with some interim, placeholder logic.

    fs/inode/fs_fileopen.c:  Add a framework for a file_open() implementation (no real logic in place yet).

    fs/vfs/fs_open.c:  Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
Xiang Xiao 1ee6083de3 Squashed commit of the following:
drivers/syslog:  Channel configuration.  Decouple SYSLOG_SERIAL_CONSOLE and ARCH_LOWPUTC.  Since some hardware can output log to the special debug channel not serial.

    drivers/syslog/vsyslog.c: Support pre-pending a prefix string to log output if enabled.  This very useful to identify which cpu send out the log in AMP SoC.

    drivers/syslog/vsyslog.c: Make timestamp output same as linux kernel.  It's very useful if NuttX syslog retarget to Linux syslog.
2018-08-26 06:49:35 -06:00
Alan Carvalho de Assis 283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt a94e3284b3 syslog: Enable is partial, crippled version of syslog_flush(); arch/: Call syslog_flush() from assertion handling logic. 2018-06-07 16:29:16 -06:00
Michał Łyszczek 8de51543a4 Fix a few compilation errors. 2018-04-20 15:55:16 -06:00
Gregory Nutt de6b13b3ab Per OpenGroup.org, syslog -- and, hence, nonstandard vsyslog, and debug wrappers -- does not return a value. Rename _vsyslog to nx_vsyslog. Use internal nx_vsyslog in the few cases where a return value is required. 2018-03-04 08:07:07 -06:00