Commit Graph

23 Commits

Author SHA1 Message Date
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 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 bb623d1e04 This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:

    Trivial, cosmetic
    sched/, arch/, and include:  Rename task_vforkstart() as nxtask_vforkstart()
    sched/, arch/, and include:  Rename task_vforkabort() as nxtask_vforkabort()
    sched/, arch/, and include:  Rename task_vforksetup() as nxtask_vfork_setup()
    sched/:  Rename notify_cancellation() as nxnotify_cancellation()
    sched/:  Rename task_recover() to nxtask_recover()
    sched/task, sched/pthread/, Documentation/:  Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
    sched/task:  Rename task_schedsetup() to nxtask_schedsetup()
    sched/ (plus some binfmt/, include/, and arch/):  Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
    arch/ and sched/:  Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
    sched/task:  Rename all internal, static, functions to begin with the nx prefix.
2019-02-04 13:42:51 -06:00
Gregory Nutt ba12817f9c Upate some comments 2017-05-11 13:15:31 -06:00
Gregory Nutt c08ba10d32 include/: Add some definitions needed by apps/wireless/wapi 2017-04-10 14:56:23 -06:00
Gregory Nutt 948332ca34 pthreads: Backed most of last pthread changes. Found the 'real' root poblem. A one like error in pthread_mutex.c. 2017-04-10 09:51:03 -06:00
Gregory Nutt b51b72b2db pthreads: Re-order some operations so that mutexes are placed in the inconsistent state BEFORE the clean-up callbacks are called. 2017-04-10 08:11:16 -06:00
Gregory Nutt 8b3c554e45 pthreads: Add a configuration option to disable robust mutexes and revert to the traditional unsafe mutexes. 2017-03-26 17:37:28 -06:00
Gregory Nutt fe03ef02c4 when pthread exits or is cancelled, mutexes held by thread are marked inconsistent and the highest priority thread waiting for the mutex is awakened. 2017-03-26 13:37:05 -06:00
Gregory Nutt d5b1ca14e2 Update README and some comments. 2017-01-02 13:54:07 -06:00
Gregory Nutt 698597a838 task_delete() now obeys all cancellation point semantics. 2016-12-10 14:39:19 -06:00
Gregory Nutt 78cdc9f113 Fix a typo in a debug assertion. 2016-12-09 16:59:10 -06:00
Gregory Nutt c9ca97b4b5 cancellation points are basically function. More tested is needed and additional cancellation points must be implemented before this can be merged back to master. 2016-12-09 12:01:18 -06:00
Gregory Nutt ab43681f15 Update TODO and some comments. 2016-12-08 10:24:40 -06:00
Gregory Nutt a1fbc2ad0d pthreads: Add pthread_cleanup_push() and pthread_cleanup_pop() 2016-12-08 09:27:13 -06:00
Gregory Nutt 74db48202e sched/: Replace explict references to g_readytorun with indirect references via the this_task() macro 2016-02-06 17:44:41 -06:00
Gregory Nutt 79d554939e sched/: Fix some spacing issues 2015-10-07 19:59:14 -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
Gregory Nutt b4423c1eed Make some file section headers more consistent with standard 2015-04-08 06:47:36 -06:00
Gregory Nutt d798dd37a7 Replace os_internal.h with sched/sched.h in files that actually reference something in sched.h 2014-08-08 17:53:55 -06:00
Gregory Nutt 0f318e9249 Move watchdog functions from sched/ to sched/wdog 2014-08-08 14:21:48 -06:00
Gregory Nutt cb79407ced Move all pthread files from sched/ to sched/pthread 2014-08-08 12:55:02 -06:00