Skip to content
  1. Oct 09, 2017
  2. Oct 08, 2017
  3. Oct 07, 2017
  4. Oct 06, 2017
    • Gregory Nutt's avatar
    • Gregory Nutt's avatar
      3b67c067
    • Gregory Nutt's avatar
      drivers/serial/tcdrain: tcdrain() was recently added to the NuttX C library. ... · 5b04c25d
      Gregory Nutt authored
      drivers/serial/tcdrain:  tcdrain() was recently added to the NuttX C library.  But there is a problem.  The specification of tcdrain() requires that it be a cancellation point.  In order to do this, tcdrain was moved from the C library into the OS and the addition cancellation point hooks were added.  In non-FLAT builds, access via system calls is also now supported.
      5b04c25d
    • Gregory Nutt's avatar
      Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ... · 936df1bc
      Gregory Nutt authored
      Adds new OS internal functions nxsig_sleep() and nxsig_usleep.  These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable).  All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
      
      Squashed commit of the following:
      
          Change all calls to usleep() in the OS proper to calls to nxsig_usleep()
      
          sched/signal:  Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.
      
          sched/signal:  Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
      936df1bc
    • Gregory Nutt's avatar
      This commit adds internal versions of the signal interfaces: · fdd0dcc0
      Gregory Nutt authored
        sigtimedwait() -> nxsig_timedwait()
        sigwaitinfo()  -> nxsig_waitinfo()
        nanosleep()    -> nxsig_nanosleep()
      
      The internal OS versions differ from the standard application interfaces in that:
      
        - They do not create cancellation points, and
        - they do not modify the application's errno variable
      
      Squashed commit of the following:
      
          sched/signal:  Replace all usage of sigwaitinfo(), sigtimedwait(), and nanosleep() with the OS internal counterparts nxsig_waitinfo(), nxsig_timedwait(), and nxsig_nanosleep().
      
          sched/signal:  Add nxsig_nanosleep().  This is an internal OS version of nanosleep().  It differs in that it does not set the errno varaiable and does not create a cancellation point.
      
          sched/signal:  Add nxsig_timedwait() and nxsig_waitinfo().  These are internal OS versions of sigtimedwait() and sigwaitinfo().  They differ in that they do not set the errno varaiable and they do not create cancellation points.
      fdd0dcc0
    • Gregory Nutt's avatar
      fs/vfs and net/socket: fcntl() is not return success fail for F_SETFL. ... · aeb3944f
      Gregory Nutt authored
      fs/vfs and net/socket:  fcntl() is not return success fail for F_SETFL.  Reported by Jussi Kivilinna.
      aeb3944f
    • Jussi Kivilinna's avatar
  5. Oct 05, 2017
    • Gregory Nutt's avatar
      Revert "sem_wait.c edited online with Bitbucket. Fix some correct but useless code." · 21c97b16
      Gregory Nutt authored
      What was I thinking?  I missed that litle minus sign and the possibility that the errno might be some positive non-zero value.
      
      This reverts commit 43880878.
      21c97b16
    • Gregory Nutt's avatar
    • Gregory Nutt's avatar
      This change renames all internal, private NuttX signal-related functions to... · 8198ba6a
      Gregory Nutt authored
      This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
      
      This is analogous to similar renaming that was done previously for semaphores.
      
      Squashed commit of the following:
      
          sched/signal:  Fix a few compile warnings introduced by naming changes.
      
          sched/signal:  Rename all private, internal signl functions to use the nxsig_ prefix.
      
          sched/signal:  Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.
      
          sched/signal:  Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.
      
          sched/signal:  Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.
      
          sched/signal:  Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.
      
          sched/signal:  Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.
      
          sched/signal:  Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.
      
          sched/signal:  Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
      8198ba6a
    • Gregory Nutt's avatar
      sched/semaphore: sem_trywait() modifies the errno value and, hence, should... · 7cc63f90
      Gregory Nutt authored
      sched/semaphore:  sem_trywait() modifies the errno value and, hence, should not be used within the OS.  Use nxsem_trywait() instead.
      7cc63f90
    • Gregory Nutt's avatar
      sched/semaphore: sem_timedwait() is a cancellation point and, hence, cannot... · 29b5b366
      Gregory Nutt authored
      sched/semaphore:  sem_timedwait() is a cancellation point and, hence, cannot be called from within the OS.  Created nxsem_timedwait() that is equivalent but does not modify the errno and does not cause cancellation.  All calls to sem_timedwait() change to calls to nxsem_timedwait() in the OS.
      29b5b366
  6. Oct 04, 2017
    • Gregory Nutt's avatar
      Squashed commit of the following: · 9568600a
      Gregory Nutt authored
          This commit backs out most of commit b4747286.  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.
      9568600a