Xiang Xiao
a2f6dc9b7c
errno: Rename get_errno_ptr to __errno
...
Inrease the compatiblity with the third party library(e.g. newlib)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
5c748cea2a
sched: Don't need call get_errno after task_activate
...
since task_activate don't save the error code into errno
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
3c84278aa7
sched: task_init as internal function shouldn't modify errno
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
8d1a0c2761
binfmt: exec_spawn as internal function shouldn't modify errno
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
31c60c3b0e
syscall: nx_task_spawn should exist in the flat build just like the protected build
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-02 09:56:23 -06:00
Xiang Xiao
eca7059785
Refine __KERNEL__ and CONFIG_BUILD_xxx usage in the code base
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
Gregory Nutt
97339e47f1
Check return from nxsem_wait_initialize()
...
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution: Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly. This commit is only for those files under graphics/, mm/, net/, sched/, wireless/bluetooth.
Still to do: Files under fs/, drivers/, and arch. The last is 116 files and will take some effort.
2020-03-29 20:11:10 +01:00
Gregory Nutt
44b8f3e467
include/nuttx/sched.h: Move prototype for sched_releasetcb()
...
Move the prototype for the internal OS from from sched/sched/sched.h to include/nuttx/sched.h. This was done because binfmt/binfmt/excecmodule.c requires the prototype for sched_releasetcb() and was illegally including sched/sched/sched.h. That is a blatant violation of the OS modular design and the person that did this should be hung up by their thumbs. Oh... I did that back in a bad moment in 2014. Now that is made right.
2020-03-26 14:12:34 -03:00
Gregory Nutt
9f3648d329
sched/: Fix some new coding standard issues.
...
Fix new coding standard issues found by new, revised nxstyle.
2020-03-09 17:31:49 +01:00
David Sidrane
2f77a566d1
task_vfork.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
a0b27d32b9
task_terminate.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
e931c55a6d
task_starthook.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
1d3eb41773
task_start.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
aea9fb2841
task_spawnparms.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
8e19a8d4cb
task_setup.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
667fede9ea
task_setcancelstate.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
5e4a3223a4
task_restart.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
d986157bf3
task_reparent.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
e50f5bb5da
task_recover.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
8e7ff960a6
task_prctl.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
19b28d017a
task_posixspawn.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
cdb22ed6af
task_onexit.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
9b4f238548
task_init.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
b001f12560
task_exithook.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
c1839a07aa
task_exit.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
ffc7cfe59b
task_execv.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
9bbf86a961
task_delete.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
39917b21bd
task_cancelpt.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
c109610fe7
task_atexit.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
96e11e65b0
task_activate.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
a865e5ff7d
task.h:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
dd92faafe9
exit.c:Fix style errors.
2020-03-08 07:28:04 -06:00
David Sidrane
b82ebdcd70
task_spawn:Fix style errors
2020-03-08 07:28:04 -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
chao.an
c06adf06b8
binfmt/exec: Make the spawn attribute take effect
2020-02-20 08:55:14 -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
YAMAMOTO Takashi
83354983c3
Fix "with with" typos
...
In many cases, remove one of them.
In a few places, it looks like a typo of "width" actually.
2020-01-27 08:46: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
b5111d2c38
tools/nxstyle.c: Add logic to detect if there is a blank line following the final right brace. sched/: Applied the modified nxstyle to all C file as a test.
2019-10-24 11:02:42 -06:00
Nathan Hartman
46aaec7ba0
Fix minor typos in docs and comments.
2019-09-29 12:52:20 -06:00
Gregory Nutt
5141d9f53c
sched/signal/sig_initialize.c: Add some checks for allocation failures.
2019-09-23 07:49:21 -06:00
Gregory Nutt
5f02b0335f
syscall/ and related: Fix an error found in build testing. Inconsistent conditional compilation led to link errors in certain configurations.
2019-08-27 16:41:07 -06:00
Gregory Nutt
3c30cf1f05
Squashed commit of the following:
...
task_spawn() and posix_spawn() are NuttX OS interfaces. In PROTECTED and KERNEL build modes, then can be reached from applications only via a system call. Currently, the number of parameters in a system call is limited to six; these spawn function have seven parameters. Rather than extend the maximum number of parameters across all architectures, I opted instead to marshal the seven parameters into a structure.
*
In order to support builtin in function in protected mode, a task_spawn() system call must be supported. Unfortunately this is overly complex because there is a (soft) limit of 6 parameters in a system call; task_spawn has seven paramters. This is a soft limit but still difficult to extend because it involves assembly language changes to numerous architectures. Better to get more creative.
2019-08-23 13:20:52 -06:00
Gregory Nutt
a276942f59
Fix minor typos in comments
2019-08-15 14:06:11 -06:00
Gregory Nutt
8e321aba84
sched/: Correct some naming. The NuttX task groups have been using the acroynum 'gid' and also the type 'gid_t' for the the task group ID. That is incorrect. Than naming is reserved for use with group permissions. So these were all named to grpid and grpid_t so that it is clearer that these refer to NuttX task group IDs, and not to group permissions.
2019-08-02 10:01:30 -06:00
Gregory Nutt
4c800ca372
sched/task/task_exithook.c: Update some commits. include/nuttx/sched.h: Fix some complaints from nxstyle.
2019-08-02 08:49:26 -06:00
Gregory Nutt
eda7f5f379
sched/task/task_exithook.c: nxtask_signalparent() in task_exithook.c may invalidate the group's parent task ID (tg_ppid) too soon. The tg_ppid field is use only to remember the parent tasks ID so that it can send the SIGCHLD signal to it. So it must stay valid until SIGCHLD has been sent. In nxtask_signalparent(), it calls nxtask_sigchild() to send SIGCHLD to the parent, then invalidates tg_ppid. That would be okay, except that the SIGCHLD is only sent when the last member of the group terminates. That is incorrect; tg_ppid can be invalidated too soon and, as a consequence, SIGCHLD would never be sent.
...
Noted by Jeongchan Kim in the Google group: https://groups.google.com/forum/#!topic/nuttx/SXd8fVwVKBk
2019-08-01 08:14:11 -06:00
Gregory Nutt
9f24fb5b4b
sched/: Add some missing FAR. Update some comments.
2019-07-29 15:04:39 -06:00