Commit Graph

12 Commits

Author SHA1 Message Date
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 b54ffe858a Standardization of some function headers. 2018-03-13 09:52:27 -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 fdd0dcc0b6 This commit adds internal versions of the signal interfaces:
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.
2017-10-06 08:28:20 -06:00
Gregory Nutt b52e4e5ecd Move cancellation point definitions to their own header file. 2016-12-10 09:08:26 -06:00
Gregory Nutt bc3ca25cc7 Cancellation points: Close up some logic to eliminte some race conditions. 2016-12-10 08:36:58 -06:00
Gregory Nutt 7fce8022c6 Finishes all cancellation point logic 2016-12-09 16:50:34 -06:00
Gregory Nutt 269c242f7b Update TODO list 2016-02-17 16:51:58 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt b4423c1eed Make some file section headers more consistent with standard 2015-04-08 06:47:36 -06:00
Gregory Nutt cb79407ced Move all pthread files from sched/ to sched/pthread 2014-08-08 12:55:02 -06:00
Gregory Nutt 0385a00a60 Move signal-related files from sched/ to sched/signal 2014-08-08 12:44:44 -06:00