Commit Graph

311 Commits

Author SHA1 Message Date
Alin Jerpelea f9fb182809 Author: Gregory Nutt: update licenses to Apache
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-05 12:15:56 -03:00
Jiuzhu Dong 13100cf248 fs/readdir: Must reserve a byte for the NUL terminator
Change-Id: I1df0c278d289b90cc54512c0ee256a95549785ca
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-01-26 18:22:35 -08:00
Juha Niskanen cd41ed9b6d fs: fully parenthesize MIN and MAX macros
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-08 12:58:40 -06:00
Matias N 8a9f995d40 procfs: make array const to reduce memory use 2020-12-07 16:55:00 -05:00
YAMAMOTO Takashi 4f514f41d4 fs/procfs/fs_procfsiobinfo.c: Add a missing entry for can
Found by the following compiler warning:

    procfs/fs_procfsiobinfo.c: In function 'iobinfo_read':
    procfs/fs_procfsiobinfo.c:344:20: error: '%-16s' directive argument is null [-Werror=format-overflow=]
      344 |       linesize   = snprintf(iobfile->line, IOBINFO_LINELEN,
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      345 |                             "\n%-16s%16lu%16lu\n",
          |                             ~~~~~~~~~~~~~~~~~~~~~~
      346 |                             g_iob_user_names[IOBUSER_GLOBAL],
          |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      347 |                             (unsigned long)userstats->totalconsumed,
          |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      348 |                             (unsigned long)userstats->totalproduced);
          |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi 95a9843284 fs/procfs/fs_procfsproc.c: Fix prinf format warnings 2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi f1bc94bd32 fs/procfs/fs_procfscpuload.c: Fix printf format warnings 2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi 008d411fc3 fs/procfs/fs_procfsproc.c: Fix a printf format warning 2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi 08b4cb6517 fs/procfs/fs_procfsuptime.c: Fix a printf format 2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi 711371a855 fs/procfs/fs_procfsiobinfo.c: Appease nxstyle 2020-11-16 05:46:53 -08:00
Xiang Xiao eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Gregory Nutt e880bc9a71 Remove unused, non-modular procfs reference
fs/procfs/fs_procfs.c contained an unused reference to an STM32 procfs structure.  This is wrong in two ways:  (1) There should be not STM32 references outside of arch/arm and boards/arm and (2) the declare STM32 structure is not used anyway.
2020-08-22 16:22:18 +01:00
Xiang Xiao 0e610caec8 fs/procfs: Handle /proc/xxx/group/ correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic9f4c38a3baf199712c5497c094dc7af84deee2c
2020-08-03 21:00:18 +01:00
Xiang Xiao 338244dbac procfs: Get version info from uname instead
unify the version into one place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I988fb40d3f460b0291114c60edb04db3aabb38f1
2020-07-30 10:33:08 +09:00
Xiang Xiao 9dff16e0e4 fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ieaf325c899d1c349d64dfa15bddcc32afd1fce42
2020-07-10 21:30:02 +01:00
Xiang Xiao 23668a4b9b build: Remove the empty variable assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06: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
Gregory Nutt 4b44b628ea Run nxstyle against all .c and .h files modified by this PR.
All complaints fixed except for those that were not possible to fix:

- Used of Mixed case identifier in ESP32 files.  These are references to Expressif ROM functions which are outside of the scope of NuttX.
2020-05-09 14:19:08 -03:00
Gregory Nutt a4218e2144 include/nuttx/sched.h: Make naming of all internal names consistent:
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 14:19:08 -03:00
Xiang Xiao b7d922960f Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 07:20:49 -06:00
Gregory Nutt 72104c182c nxstyle fixes
Run all files modified by PR 766 through nxstyle and fix any resulting complaints.

NOTE:  Numerous "Mixed case identifier" errors in arch/arm/src/cxd56xx/cxd56_gnss.c were not fixed because this problem is of much larger scope than this file.
2020-04-11 21:19:47 +01:00
Gregory Nutt 67ec3d7926 Remove CONFIG_CAN_PASS_STRUCT
This commit resolves issue #620:

Remove CONFIG_CAN_PASS_STRUCTS #620

The configuration option CONFIG_CAN_PASS_STRUCTS was added many years ago to support an old version of the SDCC compiler. That compiler is currently used only with the Z80 and Z180 targets. The limitation of that old compiler was that it could not pass structures or unions as either inputs or outputs. For example:

    #ifdef CONFIG_CAN_PASS_STRUCTS
    struct mallinfo mallinfo(void);
    #else
    int      mallinfo(FAR struct mallinfo *info);
    #endif

And even leads to violation of a few POSIX interfaces like:

    #ifdef CONFIG_CAN_PASS_STRUCTS
    int  sigqueue(int pid, int signo, union sigval value);
    #else
    int  sigqueue(int pid, int signo, FAR void *sival_ptr);
    #endif

This breaks the 1st INVIOLABLES rule:

Strict POSIX compliance
-----------------------

  o Strict conformance to the portable standard OS interface as defined at
    OpenGroup.org.
  o A deeply embedded system requires some special support.  Special
    support must be minimized.
  o The portable interface must never be compromised only for the sake of
    expediency.
  o Expediency or even improved performance are not justifications for
   violation of the strict POSIX interface

Also, it appears that the current SDCC compilers have resolve this issue and so, perhaps, this is no longer a problem: z88dk/z88dk#1132

NOTE:  This commit cannot pass the PR checks because it depends on matching changes to the apps/ directory.
2020-04-11 21:19:47 +01:00
Gregory Nutt 2b532ae4a8 fs/: Remove support for CONFIG_FS_READABLE 2020-03-22 08:24:07 -05: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 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 346336bb9e Make the read ahead buffer unselectable
Here is the email loop talk about why it is better to remove the option:
https://groups.google.com/forum/#!topic/nuttx/AaNkS7oU6R0

Change-Id: Ib66c037752149ad4b2787ef447f966c77aa12aad
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-11 08: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
anchao 1c91aec6ae tools/ and fs/procfs: Simplify .version file generation
1.merge CONFIG_GIT_REVISION_STR into CONFIG_VERSION_BUILD
2.merge gen_getrev.sh into version.sh
3.generate version number if needed

Here is a sample output:
nsh> uname -a
NuttX  8.2 59fd8e12d3-dirty Dec 12 2019 15:48:00 sim sim
nsh> cat /proc/version
NuttX version 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:01
2019-12-12 11:17:11 -06:00
Xiang Xiao 1d60bc20a9 fs/procfs/Kconfig: Change the default value of FS_PROCFS_EXCLUDE_VERSION to n like other similar option. 2019-12-12 11:12:37 -06:00
Gregory Nutt d2af57169b tools/nxstyle.c: Fix a rare false alarm that could occur if a variable or function name begins with the sub-string 'union' or 'struct'. misc fixes under fs/ and sched/ from application of current version of nxstyle. 2019-12-01 13:01:16 -06:00
Gregory Nutt bd3cc792ff fs/: Run all .c files under fs/ through tools/nxstyle. 2019-10-27 11:48:14 -06:00
Gregory Nutt 7871e983b8 net/tcp/tcp_send.c: Commit a52ceac13e broke IPv4 sending. In cp_send.c:tcp_ipv4_sendcomplete(), ‘ipv4->vhl’ now needs to be configured before call to tcp_ipv4_chksum(). Noted by Jussi Kivilinna in comit comments. 2019-09-06 09:48:42 -06:00
David Alessio 5be824e0ea Merged in david_alessio/nuttx/bugfix/cpuload-missing-lf (pull request #1026)
add missing LF to cpuload

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 19:41:20 +00:00
Gregory Nutt 8b62bc96f5 Updates from review and testing of commit a0867a7f4f. 2019-08-26 09:46:05 -06:00
David Alessio a0867a7f4f Merged in david_alessio/nuttx/feature/add-git-revision (pull request #1020)
report git info on /proc/gitrev

* report git info on /proc/gitrev

    git info reported: branch, version, git hash, hostname, usr, build date

* use existing .version and procfs for git info

* reduce script's coupling

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 15:09:33 +00:00
Gregory Nutt b41093b020 fs/procfs/fs_procfsiobinfo.c: Correct use of C11 features in common code. 2019-08-24 17:51:05 -06:00
Gregory Nutt 425a2d1b2c fs/procfs/fs_procfsiobinfo.c: Fix error found in build testing. Needs to include nuttx/mm/iob.h. 2019-08-19 12:16:53 -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
David Sidrane 7a85cf1728 fs/procfs/fs_procfsuptime: Fixed type warning. 2019-08-07 07:56:10 -06:00
Gregory Nutt 8e321aba84 sched/: Correct some naming. The NuttX task groups have been using the acroynum 'gid' and also the type 'gid_t' for the the task group ID. That is incorrect. Than naming is reserved for use with group permissions. So these were all named to grpid and grpid_t so that it is clearer that these refer to NuttX task group IDs, and not to group permissions. 2019-08-02 10:01:30 -06:00
athan Hartman 6d7e0feea1 Remove 'executable' bit on several files 2019-08-01 14:13:55 -06:00
Gregory Nutt f60301665b fs/procfs/fs_procfs.c: procfs_initialize() is used only within fs/procfs/fs_procfs.c and, hence, should be marked 'static'. 2019-05-25 14:12:00 -06:00
Gregory Nutt abf6965c24 Squashed commit of the following:
libs/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    syscall/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    wireless/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    Documentation/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    include/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    drivers/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    sched/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    configs:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/xtensa:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/z80:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/x86:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/renesas and arch/risc-v:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/or1k:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/misoc:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/mips:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/avr:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/arm:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
2019-04-29 14:52:05 -06:00
Sebastien Lorquet 0e6f093e2a fs/procfs/fs_procfsuptime.c: Fix procfs typo. 2019-03-14 16:56:43 -06:00
Gregory Nutt be3dd0bac6 fs/: Fix various coding standard issues found while testing tools/nxstyle.c 2019-03-01 15:01:04 -06:00
Gregory Nutt efe65749ce Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
2019-02-11 15:47:25 -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
Xiang Xiao e57f7cf6ae Critical Section Monitor (sched/ and fs/procfs: Remove SCHED_IRQMONITOR_GETTIME to simplify the clock source selection: (1) Use up_critmon_gettime if SCHED_IRQMONITOR, (2) Call clock_systimespec if SCHED_TICKLESS, (3) Don't collect timing info for all other cases and move up_critmon_* to arch.h avoid the duplicated declaration. 2019-01-27 10:13:28 -06:00
Xiang Xiao 1e0e1ae856 fs/procfs: Remove the unnecessary critical section 2018-11-29 12:51:34 -06:00
Gregory Nutt 095b597d34 sched/sched and fs/procfs: Fix some bus in critical section monitor found in testing 2018-11-24 17:58:35 -06:00
Gregory Nutt 807d5bb4ae Critical Section Monitor: Add low level timer support for simulation. Fix serial bugs and logic errors in initial implementation. Still does not work; takes assertions. 2018-11-24 15:07:12 -06:00
Gregory Nutt 85c31fd4a2 fs/procfs/fs_procfscritmon.c and sched/sched/sched_critmonitor.c: Add support for global pre-emption and global critical sections to monitor as suggested by Xiang Xaio. 2018-11-24 13:33:37 -06:00
Gregory Nutt fc6084f311 Squashed commit of the following:
fs/procfs/fs_procfsproc:  Extended the process ID ProcFS output to show per-thread maximum time for pre-emption disabled and maximum time within a critical section.

    sched/sched/sched_critmonitor.c:  Adds data collection logic in support of monitoring critical sections and pre-emption state.
2018-11-24 10:32:45 -06:00
zhangyuan7 a7d9d4bc1e drivers/serial/uart_16550.c: Fox UART flow control issue. UART_MCR_RTS need be high even UART_MCR_AFCE is enabled 2018-11-08 10:21:16 -06:00
iuhaitao 82e0b0328b fs/procfs: Add /proc/version support to get version info 2018-11-08 10:13:45 -06:00
Xiang Xiao 247414c6ad drivers/mtd and other MTD drivers: Remove mtd_procfsoperations since we can now get the same information from inode 2018-11-08 09:46:11 -06:00
Gregory Nutt 4391b51cd3 fs/procfs/fs_procfsproc.c: Change output of the env file so that it looks more like output from the 'env' command. Documentation/NuttShell.html: Document the new NSH 'env' command. 2018-09-30 11:15:28 -06:00
Gregory Nutt a7265d71c6 This commit adds support for default signal actions for SIGSTOP, SIGSTP, and SIGCONT.
Squashed commit of the following:

    Add procfs support to show stopped tasks.  Add nxsig_action() to solve a chicken and egg problem:  We needed to use sigaction to set default actions, but sigaction() would refuse to set actions if the default actions could not be caught or ignored.

    sched/signal:  Add configuration option to selectively enabled/disable default signal actions for SIGSTOP/SIGSTP/SIGCONT and SIGKILL/SIGINT.  Fix some compilation issues.

    sched/sched:  Okay.. I figured out a way to handle state changes that may occur while they were stopped. If a task/thread was already blocked when SIGSTOP/SIGSTP was received, it will restart in the running state.  I will appear that to the task/thread that the blocked condition was interrupt by a signal and returns the EINTR error.

    sched/group and sched/sched:  Finish framework for continue/resume logic.

    sched/signal:  Roughing out basic structure to support task suspend/resume
2018-08-30 10:27:18 -06:00
Gregory Nutt 0334b4dcc1 fs/procfs: Add a configuration option to disable environment variable info. 2018-08-19 06:36:23 -06:00
Gregory Nutt f980200ac4 fs/procfs/: Add support for /proc, a convenient way for getting information about the currently running task. 2018-08-18 18:00:23 -06:00
Gregory Nutt 25fa50d504 fs/proc and sched/environ: Add support for a procfs entry that will permit examining the environment of any task. 2018-08-10 10:16:39 -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 8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Michał Łyszczek 8de51543a4 Fix a few compilation errors. 2018-04-20 15:55:16 -06:00
Gregory Nutt 0080225473 sched/irq: Add a configuration option to show interrupt information via a procfs file. 2018-01-12 18:26:46 -06:00
Gregory Nutt 335d1e0030 fs/procfs: Fix an error in a common function that manages read data. 2018-01-12 18:26:45 -06:00
Gregory Nutt e4652bd3dc Squashed commit of the following:
fs: Add truncate() support for userfs
    fs/unionfs:  Add truncate() support to the unionfs
    fs/tmpfs:  Add ftruncate() support to tmpfs
    syscall/: Add system call support for ftruncate()
    net/route:  Adding ftruncate() support eliminates an issue in file-based routing table management.
    fs:  Add basic framework to support truncate() and ftruncate().  The infrastructure is complete.  Now, however, the actual implementation of ftruncate() will have to be done for each file system.
2018-01-03 16:03:56 -06:00
Gregory Nutt f068eb579c fs/procfs: Correct ordering of procfs entries. For consistency, use alphbetical ordering. 2017-11-24 10:00:35 -06:00
Gregory Nutt 7fa2196f1e procfs: Fix error in /proc/meminfo format statement introduced with recent commit. 2017-11-23 08:07:20 -06:00
Gregory Nutt d720711807 fs/procfs: Add logic to show the state of the page allocator in /proc/meminfo. 2017-11-14 14:59:51 -06:00
Gregory Nutt a6aa4ac5f5 fs/procfs: Optimization of previous commits. /proc/umm and proc/progmem are deleted. /proc/kmm is renamed /proc/meminfo and contains the output that was in all three files previously. 2017-11-13 13:33:12 -06:00
Gregory Nutt 070d40260b profcs: At file to should user space heap. This replaces the NSH free command. 2017-11-13 12:51:33 -06:00
Gregory Nutt f3b37e5da3 fs/procfs/fs_procfsprogrem: Add /proc/progmem. This is an alternative way to get the information that was previoulsy available in apps/system/free. apps/system/free was removed beause it made illegal calls into the OS violating the portable interface. This new procfs entry provides the same information with no such violation. 2017-11-13 09:08:39 -06:00
Juha Niskanen cc7af2b0d0 procfs: Fix uptime being close to maximum 32-bit value in certain config 2017-11-10 09:01:39 -06:00
Gregory Nutt a50c5d6674 fs/procfs: Restore a necessary chagne that was lost with commit 07f441eecb 2017-10-28 17:13:52 -06:00
Gregory Nutt 382979b7cb Update comments in a Kconfig file. 2017-10-27 18:30:18 -06:00
Gregory Nutt 07f441eecb Missing some conditional logic for cases where mountpoint procfd entries excluded. 2017-10-27 06:06:20 -06:00
Gregory Nutt ea13e24392 Correct a problem that was causing an apparent directory to be reported as a file instead of a directory by opendir.
This happened after adding these three new procfs entries:

  fs/block
  fs/mount
  fs/usage

Of course, there is no directory fs in this case, only three files that have fs/ in their relative pathnames.  The logic was detecting that fs was the name of the enty to report, but it was then declaring that fs was a file (because fs/block is of type file).

This was fixed by adding a check for matching lenghts.  i.e., if strlen(fs) != strlen(fs/block), then report fs as a directory instead of a file.
2017-10-26 16:30:59 -06:00
Gregory Nutt 1ed816de4b Squashed commit of the following:
fs/mount:  Implements procfs /proc/fs/blocks and /proc/fs/usage files, replacing the NSH df command.
    fs/mount:  Implements procfs /proc/fs/mount file, replacing the NSH mount command when there are not arguments.
    fs/: Move prototype of foreach_mountpoint out of include/nuttx/fs/fs.h to fs/mount/mount.h.  Add framework for the mount procfs (initial commit is just a close of the net/route table procfs.
2017-10-26 13:33:08 -06:00
Gregory Nutt d209e0e238 Add file missed in last commit. Fix naming in some configuration items. 2017-08-12 07:26:20 -06:00
Gregory Nutt ee9e4fa8be procfs: Corret the type of a couple of procfs file entries. 2017-08-11 16:06:53 -06:00
Gregory Nutt 65698da12d procfs: Add support for routing tables. 2017-08-11 15:33:58 -06:00
Masatoshi Tateishi ae8d5821e0 procfs: Fix incorrect uptime with CONFIG_SYSTEM_TIME64
Jira: PDFW15IS-45
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-25 10:58:38 +09:00
Nobutaka.Toyoshima e971083449 procfs: Fix wrong member IDs are displayed when 'cat /proc/<pid>/group/stasus'.
Jira: PDFW15IS-259
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-20 16:12:20 +09:00
Gregory Nutt be7a904d1b procfs skeleton: Some additional, purely cosmetic updates. 2017-02-15 12:47:51 -06:00
Gregory Nutt 504f677c20 procfs skeleton file should include an example write method. 2017-02-15 12:40:30 -06:00
Gregory Nutt c67943ed1d procfs: Most stat() implementations were not initializating the st_atime, st_ctime, and st_mtime fields. 2017-02-15 09:59:09 -06:00
Gregory Nutt bae367c7c4 fstat(): Rethink procfs fstat(). If write method is supported, then should report file s writeable. 2017-02-15 09:32:42 -06:00
Gregory Nutt c5df283822 procfs: Add support for fstat(). 2017-02-14 10:00:15 -06:00
Gregory Nutt e8d6676e18 procfs: When addition of memset from previous commit, it is no longer necessary to set individual fields to zero. 2017-02-14 09:03:48 -06:00
Gregory Nutt 74d30a0dbc procfs: stat() left several fields in uninitialized state. 2017-02-14 09:00:48 -06:00
Gregory Nutt 7d91fabf01 fstat: Add skeleton implmentations of fstat() in all file systems. 2017-02-12 13:42:27 -06:00
Gregory Nutt feacfeae25 procfs: Correct to snprintf-related errors in fs_procfsproc.c. Resolves issue #24 2017-01-07 07:13:04 -06:00
Gregory Nutt 57d8a437ef Fix procfs status for SMP case. 2016-12-20 11:51:39 -06:00
Sagitta Li 9fa1024eef vector table should have dimension NR_IRQS, not NR_IRQS+1 2016-09-22 07:56:12 -06:00
Mateusz Szafoni 0bc154863e sched/: Define 'group' even if HAVE_GROUPID is not set 2016-09-22 10:44:06 +02:00
Gregory Nutt 05aa586aa6 sched/: Move fields related to parent/child task relationship out of TCB into group structure. 2016-09-06 08:28:31 -06:00
Gregory Nutt 72a45c82b7 Move include/nuttx/regex.h to include/nuttx/lib/regex.h 2016-07-21 13:42:18 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt ecba6ad0db fs_procfsproc.c edited online with Bitbucket. Fix problem introduced in last patch 2016-04-28 08:04:38 +00:00
David Sidrane 6a6a089af4 Fix a warning 2016-04-27 00:19:00 -06:00
Gregory Nutt 9008308b64 Remove some block comments before empty code sections 2016-04-11 18:16:04 -06:00
Gregory Nutt ccbf514233 Add task state to information recorded when a task is suspended 2016-03-21 15:24:15 -06:00
Gregory Nutt 0fb035f76b Standardize some naming in code section comments 2016-02-21 18:09:04 -06:00
Gregory Nutt 050b3ee06a profcs task status will now show CPU is SMP is enabled 2016-02-19 15:34:36 -06:00
Gregory Nutt 884d9355c6 nuttx/fs: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 08:43:47 -06:00
Gregory Nutt 12f95c6f6b Add procfs/kmm to show the state of the kernel heap 2016-02-06 11:35:30 -06:00
Gregory Nutt de995653fe Fix a typo from the last big set of changes 2016-01-21 12:26:53 -06:00
Gregory Nutt f348e68069 Update to use 64-bit timer when available 2016-01-21 11:54:26 -06:00
Gregory Nutt 795ddd7e80 OS modules: Add basic procfs support. A module registry that will eventually be used to support lsmod 2015-12-12 17:42:25 -06:00
Gregory Nutt acd3b47def Fix problem in last change to the procfs: Forgot to save the reallocated table pointer!
Also added warnings:  There are some concurrency issues in the current implementation if you try to modify the procfs data structures will the procfs is mounted and possibly busy.
2015-12-02 05:20:02 -06:00
Gregory Nutt db6eeed3a6 procfs: Using wrong reallocator 2015-12-01 17:06:40 -06:00
Gregory Nutt 7483ed38ce Fix some procfs registration typos 2015-12-01 16:31:40 -06:00
Gregory Nutt ad64c033e7 s/procfs: The procfs file system can now be configured so that it supports a runtime registration of procfs entries with CONFIG_FS_PROCFS_REGISTER=y 2015-12-01 14:56:20 -06:00
Gregory Nutt 1c8216a6ce Add group ID or parent PID to procfs output (if available) 2015-11-30 06:58:06 -06:00
Gregory Nutt 2e7d139cd3 fs/procfs: Process status now includes task flags. Some strings modified to improved 'ps' command output 2015-11-28 14:58:56 -06:00
Gregory Nutt 1f8f097783 procfs: Use dirent.h macros when testing directory entry type 2015-11-28 08:52:21 -06:00
Gregory Nutt eb8668b0f7 net/: Add procfs support for network device status 2015-11-27 16:39:14 -06:00
Gregory Nutt e4236941c6 net/net_procfs.c: Add basic support for networking procfs entries 2015-11-27 12:33:58 -06:00
Gregory Nutt c70987e551 nuttx/fs: Fix some spacing and alignment issues 2015-10-11 11:39:29 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt 146bdc3c93 TCB: Increase the size of the scheduling policy field from 1 to 2 bits to allow additional, planned scheduling policies 2015-07-23 10:15:07 -06:00
Gregory Nutt 342f5fe33d Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation 2015-06-28 08:08:57 -06:00
Gregory Nutt 4adda9d428 Fix numerous typos in configuration variable names. Tracked down by Alan Carvalho de Assis 2015-05-23 17:08:35 -06:00
Gregory Nutt 8055ba4d03 Pass the umount2() flags to every unbind() implementation. That is where the the decision to umount or not will be made. 2015-03-14 17:22:02 -06:00
Gregory Nutt 6792cb3e34 procfs: fs_procfsproc: Fix potential NULL pointer dereference of 'node'. From Juha Niskanen 2015-03-12 07:42:39 -06:00
Gregory Nutt 404fef74d9 Fix two uses of DEBUG_COLORATION vs STACK_COLORATION (from David Sidrane). Also some corrected comments 2015-03-05 06:41:14 -06:00
Gregory Nutt e7470e0834 Update dates in all skeleton files 2015-02-13 06:13:34 -06:00
Gregory Nutt 7e46e94546 Remove CONFIG_DEBUG_STACK. Adding CONFIG_STACK_COLORATION makes this configuration option pointless 2015-01-24 06:49:51 -06:00
Gregory Nutt cb051a522d Add procfs write support. From Ken Petit 2014-12-09 13:24:38 -06:00
Gregory Nutt 650a0d0615 Completes VFS-based named semaphore implemetation. Still a little buggy 2014-09-28 15:58:56 -06:00
Gregory Nutt b05d20a6e7 procfs: Fix some breakage introduced by reorganizing some un-reorganizable data structures. From Ken Pettit 2014-09-22 11:07:08 -06:00
Gregory Nutt 205260d5e2 Reanem kzalloc to kmm_zalloc for consistency 2014-08-31 17:34:44 -06:00
Gregory Nutt 1780810d3d Rename kmalloc to kmm_malloc for consistency 2014-08-31 17:26:36 -06:00
Gregory Nutt 54fa3b0b59 Rename kfree to kmm_free for consistency with other naming conventions 2014-08-31 17:04:02 -06:00
Gregory Nutt cc0fb1ec67 CCM PROCFS: Missing change in last commits 2014-07-03 09:28:36 -06:00
Gregory Nutt dd4caf172f CCM PROCFS: Changed the configuration a bit. I am still not happy about the coupling between procfs, mtd, and now STM32 2014-07-03 08:50:24 -06:00
Gregory Nutt 64cd7a81ed Add STM32 CCM heep procfs 2014-07-03 08:18:24 -06:00
Gregory Nutt a2741940f9 SAMA54D-EK: Don't disable any features in the NSH configuration. Comments updated in several files 2014-07-02 08:54:53 -06:00
Gregory Nutt 5df14c7d40 Misc changes to get a clean compilation after incorporating all of Bob Doison's changes 2014-04-22 10:38:08 -06:00
Gregory Nutt 3d8e313995 Misc SAM4S-related changes from Bob Doison 2014-04-21 19:32:15 -06:00
Gregory Nutt 1f31597466 Correct some procfs conditional compilation. From Bob Doiron 2014-04-21 17:21:43 -06:00
Gregory Nutt f8024cf409 More trailing whilespace removal 2014-04-13 16:22:22 -06:00
Gregory Nutt b348464779 procfs: Remove newline from the end of the cpuload and loadavg outputs so that the returned percentages can be printed on the same line as other data. 2014-02-27 11:18:28 -06:00
Gregory Nutt 3b2a3991dd A few fixes for the per-process load average calculation 2014-02-23 12:50:51 -06:00
Gregory Nutt cf4a362ab5 CPU load calculations now available for all threads. Available in /proc/pid/loadavg 2014-02-23 10:55:01 -06:00
Gregory Nutt 59769d44f1 Add logic to meaure and calculate the CPU load percentage. From David Alessio 2014-02-22 15:20:12 -06:00
Gregory Nutt 7fdf57b7bb procfs now shows stack thread information 2013-12-15 14:35:47 -06:00
Gregory Nutt 1f115c76eb procfs now shows information about the group that each thread belongs: Like parents, group member, open file, and open sockets 2013-12-15 11:22:48 -06:00
Gregory Nutt e13e5685cb /proc task directories can now have sub-directories 2013-12-15 10:31:07 -06:00
Gregory Nutt 7cb765e52d Trivial enhancement to /proc/uptime 2013-12-15 07:16:26 -06:00
Gregory Nutt 7a173d58b5 /proc/uptime logic needs to sample timer in case multiple reads are used to read the time 2013-12-14 15:25:23 -06:00
Gregory Nutt 46b77e2544 Support /proc/uptime 2013-12-14 10:34:08 -06:00
Gregory Nutt 9f01df47ea Create procfs_utils.c; File missed from last commit; + remove warning from mm_memalign.c (how did this work before?) 2013-12-14 08:53:23 -06:00
Gregory Nutt f97be5131c Various fixes to the recent, big procfs checkin 2013-12-12 11:08:20 -06:00
Gregory Nutt e4471dc8e0 procfs/: Extenstive architectural changes and enhancements by Ken Pettit 2013-12-12 09:21:55 -06:00
Gregory Nutt f1671bb6a7 Alloc CONFIG_FS_READABLE/WRITABLE to be defined in Kconfig files while preserving backward compatibility with legacy configurations (for the time being) 2013-11-15 09:49:27 -06:00
Gregory Nutt 015072a4d4 fs/binfs/README.txt: Add a README file 2013-11-13 16:40:03 -06:00
Gregory Nutt 7f9a982416 Updated README 2013-11-13 16:03:20 -06:00
Gregory Nutt 6e7c9b93c6 fs/procfs: Add a tiny, primitive procfs file system. Might get more interesting in the future 2013-11-13 15:59:14 -06:00