Commit Graph

55 Commits

Author SHA1 Message Date
Alin Jerpelea f177951c39 graphics: fix nxstyle errors
Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-07 11:09:03 -03:00
YAMAMOTO Takashi 78c03c88bd graphics/nxterm/nxterm_kbdin.c: Fix a syslog format 2020-11-24 22:31:33 -08:00
dongjiuzhu d452a05910 pollnotify: we should send poll events before semaphore incrementes.
There is a good case on sim platform:
When we input some cmd and click enter key to start application in terminal,
this context will change to application from IDLE loop. Althrough entey key '\r'
has been received to recv buffer and complete post semaphore of reader, but
pollnotify may not be called because context change. So when application run
poll function, because no events happend and poll enter wait, context will
again change to IDLE loop, this pollnotify of IDLE loop will run to send poll
events, poll function of applicaton will wake up. It's wrong!

Change-Id: I812a889f2e90781a9c3cb4b0251cccc4d32bebd1
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-26 08:27:09 -03:00
Xiang Xiao 5eae32577e build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06: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
Gregory Nutt 5c0e8e88b1 Revert "Makefile: move INCDIROPT to common place (#625)"
This reverts commit b9ace36fcc.

This change was added by PR 625 but has a serious logic flaw.  It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:

    else ifeq ($(WINTOOL),y)
      DEFINE = "$(TOPDIR)/tools/define.sh"
      INCDIR = "$(TOPDIR)/tools/incdir.sh" -w

This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined.  As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
2020-03-26 08:50:29 -07:00
Xiang Xiao b9ace36fcc
Makefile: move INCDIROPT to common place (#625) 2020-03-26 08:09:59 -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 bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -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
Gregory Nutt 788f77a9af Cosmetic 2019-05-26 12:33:42 -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
Gregory Nutt 3d44634e31 graphics/nxterm: Add a new IOCTL that can be used to inform NxTerm that the size of a window has changed. 2019-05-16 13:12:24 -06:00
Gregory Nutt 7a653cba7e graphics/nxterm and configs/boardctl.c: Replace specific interfaces between boardctl and nxterm with a generalized IOCTL interface. 2019-05-16 11:54:38 -06:00
Gregory Nutt 32b99d810c configs/lpcxpresso-lpc54628: Add a Twm4Nx configuration. 2019-05-04 12:34:47 -06:00
Gregory Nutt 92554257b9 Squashed commit of the following:
graphics/nxbe/nxbe_bitmap.c:  Fix another coordinate system problem.

    graphics/:  Review use of device coordinate system with window frambebuffer and make fixes accordingly.

    graphics/nxbe/nxbe_fill.c:  Fix a coordinate system bug.  Was trying to update the window fraembuffer using the device coordinate system.  Need to use the relative coordinate system.

    graphics/:  Use DEBUGASSERT instead of return an error since the is no user to handle the errors within the NX server.  Use CONFIG_DEBUG_GRAPHICS instead of CONFIG_DEBUG_FEATURES in most cases.

    graphics/:  Nothing under graphics/ should set the errno.
2019-03-17 11:34:45 -06:00
Gregory Nutt 1efa91eaed graphics: Costmetic clean-up 2019-03-14 14:49:50 -06:00
Gregory Nutt ffca6badfc Squashed commit of the following:
graphics/nxterm:  Needs to clear display initially.  Otherwise, garbage from previous display may still be present from preceding NxWM window.

    graphics/nxterm:  Back out most of the preceding NxTerm changes related to window size.  apps/examples/nxterm passed the complete NxTK window size.  Those changes were needed to make aps/examples/nxterm work.  But NxWM passes the the size of the NxTK main sub-window.  So I needed to back out the changes and then change the applications so that they passed the same value (the size of the NxTK sub-window).
2019-03-09 13:13:05 -06:00
Gregory Nutt 1f22ebfac3 libs/libnx/nxfonts: Fix a memory leak in the font cache. With a busy NxTerm display, this could drain off all the memory pretty quickly! 2019-03-08 11:52:49 -06:00
Gregory Nutt aefacb05ca Minor NxTerm-related clean-up 2019-03-08 08:43:16 -06:00
Gregory Nutt 2d4ce4e047 graphics/nxterm and configs/open1788: Various fixes to get the NxTerm example working in PROTECTED mode with the Open1788 knxterm configuration. Basically works until the screen becomes full and it starts scrolling. Then characters are missing from the display. Needs more debug and test. 2019-03-07 15:57:34 -06:00
Gregory Nutt 7696731f19 configs/open1788/knxterm: Add a configuration to test NxTerms in the PROTECTED mode. This configuration does not yet link correctly because a few NxTerms interfaces are improperly exported from the OS: nxterm_redraw() and nxterm_kbdin(). I am thinking that these might be moved into libc/libnx with a little repartitioning effort. 2019-03-06 13:27:50 -06:00
Gregory Nutt 76781e16e0 Cosmetic spacing fixes. 2019-03-06 11:09:38 -06:00
Gregory Nutt 56b5b9f7ad graphics/nxterm: Remove the nxterm_unregister interface. The correct way to unregister a device is to unlink it. 2019-03-06 10:16:47 -06:00
Xiang Xiao e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Dmitriy Linikov a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00: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 ecf6dda2c5 Correct recurring typo: semaphore not semapore 2017-10-09 09:57:56 -06:00
Gregory Nutt 700f1a8e8c Eliminate some warnings found in build testing. 2017-10-08 16:27:17 -06:00
Gregory Nutt 2318f895df Fix some compile problems found during build testing. 2017-10-07 09:40:02 -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 b553704334 Update README; Remove comment blocks before empty sections. 2017-01-08 14:01:16 -06:00
Gregory Nutt 749eb6b7cd Update README; Remove comment blocks before empty sections. 2017-01-08 11:36:06 -06:00
Gregory Nutt f3ae51592c Update README; Remove comment blocks before empty sections. 2017-01-08 11:20:16 -06:00
Gregory Nutt 725ba1602a Font cache: misc fixes and improvements 2017-01-06 11:06:50 -06:00
Gregory Nutt 0b52e6f571 Font cache: Replace fixed-size array with variable size link list. 2017-01-06 09:07:25 -06:00
Gregory Nutt dc05af6436 Graphics: Initial separation of font cache from graphics/nxterm. Now in libnx/nxfronts 2017-01-05 18:36:29 -06:00
Gregory Nutt 77a0b6c26a graphics/, libnx/: Disable priority inheritance on all semaphores used for signaling 2016-11-03 17:12:49 -06:00
Gregory Nutt 4f97f15b5e graphics/, libc/: Change some err() ERRORS to warn() WARNINGS or info() 2016-06-12 11:11:57 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -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 ecf0bcf13c Make graphics build system work like other directories 2016-04-13 15:39:03 -06:00
Gregory Nutt 88c17bb4f2 nuttx/graphics and include: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 15:09:28 -06:00
Gregory Nutt 06cd5b2fcc mm, audio, crypto, graphics: Fix various spacing/alignment issues 2015-10-08 09:10:22 -06:00