Commit Graph

226 Commits

Author SHA1 Message Date
Gregory Nutt 8b4b61f140 fs/cromfs: Fix a error in reading partial compressed blocks. The LZF decompressor does not support that operation. Instead we have to decompress full block into a temporary buffer and copy out the parts that we need. To compensate for the performance hit, a caching mechanism was added so that we do not have to read the same block repeatedly. Unrelated: Also updates some README files. 2018-03-24 11:30:35 -06:00
Gregory Nutt 7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt a096bc1266 binfmt/: Fix one more inappropriate access to the errno variable. 2018-02-01 08:33:04 -06:00
Gregory Nutt 3521aaf944 Squashed commit of the following:
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
    arch/arm/src/stm32 and stm32f7:  Architecture-specific code is not permitted to modify the errno variable.  drivers/ and libc/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
2018-01-30 17:57:36 -06:00
Gregory Nutt 30f2927101 binfmt/, drivers/, graphics/: Fix several inappropriate accesses to get_errno() that were missed in previous changes (some going back to nuttx-.23). 2018-01-30 17:23:10 -06:00
Gregory Nutt 170a50c690 Squashed commit of the following:
sched/sched:  Correct some build issues introduced by last set of changes.
    sched/sched:  Add new internal OS function nxsched_setaffinity() that is identical to sched_isetaffinity() except that it does not modify the errno value.  All usage of sched_setaffinity() within the OS is replaced with nxsched_setaffinity().
    sched/sched:  Internal functions sched_reprioritize() and sched_setpriority() no longer movidify the errno value.  Also renamed to nxsched_reprioritize() and sched_setpriority().
    sched/sched:  Add new internal OS function nxsched_getscheduler() that is identical to sched_getscheduler() except that it does not modify the errno value.  All usage of sched_getscheduler() within the OS is replaced with nxsched_getscheduler().
    sched/sched:  Add new internal OS function nxsched_setparam() that is identical to sched_setparam() except that it does not modify the errno value.  All usage of sched_setparam() within the OS is replaced with nxsched_setparam().
    sched/sched:  Add new internal OS function nxsched_getparam() that is identical to sched_getparam() except that it does not modify the errno value (actually, the previous value erroneously neglected to set the errno value to begin with, but this fixes both issues).  All usage of sched_getparam() within the OS is replaced with nxsched_getparam().
2018-01-30 11:08:18 -06:00
Gregory Nutt 181875f3ba fs/vfs: Add new internal OS interface nx_read(). nx_read() is functionally equivalent to read() except that it does not modify the errno variable and it is not a cancellation point. Changed all references to read() in the OS to nx_read(). 2017-10-11 12:13:41 -06:00
Gregory Nutt d633c9bf8c Squashed commit of the following:
Replace all calls to sigprocmask() in the OS proper with calls to nxsig_procmask().

    sched/signal:  Add internal OS interface nxsig_procmask().  This internal interface is equivalent to the standard sigprocmask() used by applications except that it does not modify the errno value.  Also fixes a problem in that the original sigprocmask() was not setting the errno.
2017-10-07 12:16:10 -06:00
Gregory Nutt 9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt 42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt 83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt 5c4d45a331 Documentation and comments updated to further enshrine exec() as an official NuttX interface. 2017-10-03 07:52:05 -06:00
Gregory Nutt bc2cded397 Squashed commit of the following:
binfmt: Fix some compilation issues introduced in previous changes.  Verfied with the STM32F4-Discovery ELF configuration.

    binfmt:  schedule_unload() is an internal OS function and must not alter the errno variable.

    binfmt:  unload_module() is an internal OS function and must not alter the errno variable.

    binfmt:  load_module() is an internal OS function and must not alter the errno variable.

    binfmt:  exec_module() is an internal OS function and must not alter the errno variable.
2017-10-02 15:30:55 -06:00
Gregory Nutt 374f1bd46c binfmt: Don't schedule starthook if there are no constructors. 2017-10-02 14:04:50 -06:00
Cristian Condurache 2ea054fead Merged in ccondurache/nuttx/fix_elf_arm_checkarch (pull request #422)
Fix ELF loader up_checkarch on ARM arch

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-06-28 16:19:51 +00:00
Cristian Condurache d4add14823 Fix ELF loader up_checkarch on ARM arch 2017-06-28 18:11:39 +03:00
Yasuhiro Osaki b1008477ac binfmt: Fix .dtor memory allocation
Jira: PDFW15IS-265
Coverity-ID: 11053
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-05-19 17:01:48 +09:00
Gregory Nutt 0de294a586 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
Yasuhiro Osaki c109e92962 binfmt: Fix offset value when calling elf_read() in elf_sectname()
Jira: PDFW15IS-3030
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-28 17:23:02 +09:00
Yasuhiro Osaki dd2efb909a binfmt: Fix offset value when calling elf_read() in elf_symname()
Jira: PDFW15IS-1650
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-26 14:46:34 +09:00
Gregory Nutt edd9186540 ELF: Move ARMv7-A and ARMv7-R versions of ELF relocation logic to libc/machine 2017-01-21 14:40:26 -06:00
Gregory Nutt ee9c66186c ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers. 2016-07-20 14:02:18 -06:00
Gregory Nutt 378b22ec07 binfmt: Remove PCODE dependency on apps/pcode.h 2016-06-30 11:25:59 -06:00
Gregory Nutt 2a751068e6 Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err(). 2016-06-20 12:44:38 -06:00
Gregory Nutt 43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt 3fa41c0f18 Kconfig files: Fix some dependencies that have CONFIG_ in the variable name 2016-06-17 19:30:19 -06:00
Gregory Nutt 0c8c7fecf0 Add _ to the beginning of all debug macros to avoid name collisions 2016-06-16 12:33:32 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt e99301d7c2 Rename *lldbg to *llerr 2016-06-11 14:55:27 -06:00
Gregory Nutt 86b79b33cf Reserver the name 'err' for other purposes 2016-06-11 14:40:07 -06:00
Gregory Nutt 1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt 3a74a438d9 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:18 -06:00
Gregory Nutt e523c93391 Several Makefiles: Add .PHONY definitions to prevent 'clean up to date' message weirdness. 2016-05-10 15:44:06 -06:00
Gregory Nutt f45db0313d nuttx/binfmt: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 08:46:08 -06:00
Gregory Nutt 3ba9e82c72 Update README 2016-01-22 17:21:49 -06:00
Gregory Nutt e8d0f85c8b Modules: Add mod_setsymtab to set global symtol table once. Now we can remove symbol table parameters from the insmod call. This will make implementing an NSH insmod command much easier 2015-12-13 08:10:01 -06:00
Gregory Nutt 49554fe4fc Move module support from binfmt/ to sched/ so that it can be configured and built independently from binfmt features 2015-12-12 07:09:17 -06:00
Gregory Nutt 44e45f0f91 insmod is code complete and ready for test 2015-12-11 10:55:21 -06:00
Gregory Nutt 05cb7a9043 Call initializer entry point on start-up; do not create a task 2015-12-11 07:27:45 -06:00
Gregory Nutt 251e8395c7 Mostly cosmetic renaming to straighten out namespace 2015-12-10 16:56:10 -06:00
Gregory Nutt 8bcf35ff39 binfmt/libmodule: Add support for kernel modules. Initial commit is just the ELF module support with name changes 2015-12-10 09:53:31 -06:00
Gregory Nutt 4a7fb2cbc1 binfmt: Cosmetic -- rename binfmt_internal.h to binfmt.h. Move related argument copy logic into new file, binfmt_copyargv.c 2015-11-14 07:29:47 -06:00
Gregory Nutt 45eebacbb4 binfmt/: More spacing/alignment fixes 2015-10-08 19:20:17 -06:00
Gregory Nutt 0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt 0f90500f72 Standardize the width of all comment boxes in header files 2015-10-02 17:48:24 -06:00
Gregory Nutt 5b51a9fcdd Standardize the width of all comment boxes in C files 2015-10-02 17:43:18 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Bruno Herrera 3fd07e32e9 binfmt/builtin.c: Fix a memory leak: File was not being closed. 2015-08-30 07:14:45 -06:00
Anton D. Kachalov 2ca1dd6efe Eliminate `sigset' shadow warning
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-07-31 21:28:40 +03:00