Commit Graph

1551 Commits

Author SHA1 Message Date
Gregory Nutt
45b8e3ce7f sched/wqueue: Update to Apache 2.0 headers.
Also run files through nxstyle to assurand coding standard compliance.
2020-03-11 18:39:53 -03:00
Gregory Nutt
f824989acc sched/timer: Update most files to Apache 2.0
Update all files possible under sched/timer to Apache 2.0.  These excludes two files that have a Xiaomi copyright.  Also, run all modified files through nxstyle to assure that the conform to the coding standard.
2020-03-11 18:39:28 -03:00
Gregory Nutt
c21d198ac5 sched/wdog: Update to Apache 2.0 Headers
And run each .c and .h file through nxstyle to assure compliance.
2020-03-11 18:35:18 -03:00
YAMAMOTO Takashi
e9a94859bc
sched/sched: Appease nxstyle errors (#539)
The remaining errors ("Missing space before closing C comment")
don't make sense. Maybe a bug in nxstyle.
2020-03-11 11:10:08 -06:00
Gregory Nutt
295fa015bc sched/sched/sched_mergepending.c: Fix nxstyle complaints.
And change to Apache 2.0 license.
2020-03-11 09:30:00 -05:00
David Sidrane
0817ffbc54 Fixed formatting error I introduced 2020-03-10 14:00:16 -05:00
Gregory Nutt
d43cb2fa80 sched/mqueue: Correct/update license headers.
PR #488 introduced an error in a file license header in file sched/mqueue/mqueue.h.  This commit fixe that error and in the course of doing that, changing the license header to the standard Apache 2.0 header.  I am the author and copyright hold of all modified files.
2020-03-10 11:45:42 -05:00
YAMAMOTO Takashi
a0bfc24b4c sched/signal: Wrap long lines to make nxstyle happy 2020-03-10 11:13:42 +01:00
YAMAMOTO Takashi
793b0c2040 sched/module: Wrap long lines to make nxstyle happy 2020-03-10 03:56:06 -05: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
Gregory Nutt
9e40a0d296 sched/semaphore/sem_holder.c: Fix bad line separation. 2020-03-09 16:33:47 +01:00
YAMAMOTO Takashi
76aa3dd8ef Fix nxstyle complants 2020-03-09 08:50:15 -06:00
YAMAMOTO Takashi
674417bb33 Don't actually send a signal with signo 0
As stated by standards.
2020-03-09 07:56:11 -06: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
David Sidrane
a3f99feed1 mqueue.h:Fix style errors 2020-03-08 07:28:04 -06:00
Gregory Nutt
23b8b39799 sched/group/group_setuptaskfiles.c: Fix bad file inclusion.
Also remove the horrible violation of the architectural rules by adding an include path into net in sched/group/Make.defs.  Folks, if you are going to participate in this project, you MUST respect the odule architecture and never, never, never do these things.

commit d07afc934e, "fcntl: add O_CLOEXEC/FD_CLOEXEC support" introduce a compilation error .. a bad file inclusion.  That commit added an unnecessary inclusion of "socket/socket.h" which is NOT available in the sched sub-directory. It is only available under the net/ sub-directory.

There is no include path for such and inclusion and there must NEVER be such a include path.  Module design forbids including header files between diffent "silos" in the design.  Nothing under net/ can ever be available to logic under sched/.
2020-03-05 00:49:12 +01:00
Gregory Nutt
3b53cd1e57 include/nuttx: Fix improper use of inline
I finally figured out why the ez80 code has gotten so big.  It is because people have been put putting big inline functions in header files.  That is a violation of the coding standard, since only c89 compatibility is required in all common code. But we have been tolerating inline function it because include/nuttx/compiler.h defines 'inline' to be nothing for C89 compilers.

As a result, static inline functions declared within a C file not so bad; the inline qualifier is ignored, if not supported, but otherwise all is well.

But it is catastrophic in header files.  Those static inline functions are included as static functions and implemented in EVERY file that includes those header files, even if the functions are never called.  That makes the code base huge!So there is another PR coming to fix some of the worst offenders.

This commit fixes two of the worst offenders I have encountered so far:  include/nuttx/sempahore.h and cache.h.  But there may be a few other changes needed.  Under include/nuttx there are still inline functions thread.h, inclue/nuttx/list.h, mutex.h, tree.h, and include/nuttx/crypto/blake2s.h with no protection for compilers that do not handler the inline qualifier.  Otherwise we are clean.

With the changes to these two header files, the size of the z20x build is reduced by about 40%.  And incredible size savings.
2020-03-02 22:06:04 +01: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
chao.an
d07afc934e fcntl: add O_CLOEXEC/FD_CLOEXEC support 2020-02-20 08:20:38 -06:00
Ouss4
f8801e1bd8 libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a
warning with struct initialization.
2020-02-19 18:02:25 -06:00
Gregory Nutt
2ec59121fb Fix non C89 noncompliant code that was causing the ZDS-II compile to fail. 2020-02-19 23:09:10 +01:00
chao.an
52484b1b8c sched/Kconfig: add PATH_MAX config 2020-02-19 12:43:34 -06:00
Xiang Xiao
51a2171c71 ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
And remove syslog_init_e because all initialization is later now and we don't
distinguish the initialition phase anymore after ramlog don't need special
initialize.
2020-02-18 13:04:45 -06:00
Xiang Xiao
6b77f73583 arch: Move iob_initialize into nx_start just after heap initialization
it doesn't make sense that iob initialization is in up_initialize
but other memory components initialization is called in nx_start

Change-Id: Id43aeaa995f340c5943f59a0067a483ff3ac34a2
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-18 10:26:19 -03:00
Xiang Xiao
20a9a62fdf Make compare_timespec public so timer driver could reuse it 2020-02-15 07:17:07 -06:00