Commit Graph

12010 Commits

Author SHA1 Message Date
Sebastian Huber
5be6e61481 libtest: Add support to seize/surrender objects 2021-02-24 09:22:36 +01:00
Sebastian Huber
d6a649d5bf rtems: Move rtems_task_priority definition
This type is not only used by Task Manager directives.  This is a
preparation to move the rtems_scheduler_*() directives from
<rtems/rtems/tasks.h> to a new <rtems/rtems/scheduler.h>.
2021-02-24 09:22:36 +01:00
Sebastian Huber
88543adeb5 score: Remove _CORE_barrier_Do_flush()
Call _Thread_queue_Flush_critical() directly.
2021-02-24 09:22:36 +01:00
Sebastian Huber
3cbdf19eac score: Simplify core barrier
Use the number of threads which must arrive at the barrier to trip the
automatic release also to indicate if the barrier is a manual release
barrier.
2021-02-24 09:22:36 +01:00
Sebastian Huber
0b263b0eb7 score: Remove _Objects_Open()
Use the type safe _Objects_Open_u32() instead.  Return the object
identifier to enforce a common usage pattern.
2021-02-24 09:22:36 +01:00
Sebastian Huber
508f868237 rtems: Simplify rtems_task_mode()
Do the preemption and ASR processing changes in one rush and acquire the
thread state lock only once.
2021-02-20 15:22:29 +01:00
Sebastian Huber
a7e180b95d rtems: Avoid potential recursion in ASR handling
Do the mode changes necessary for the ASR processing directly under
protection of the thread state lock to avoid the recursive calls to
thread dispatching done in rtems_task_mode().

Close #4244.
2021-02-20 15:21:34 +01:00
Sebastian Huber
08adc0dc7f rtems: Add _Modes_Apply_timeslice_to_thread()
Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
8778a0e118 rtems: New errors for rtems_signal_catch()
Ensure that no invalid modes are set during ASR processing.

Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
1739bd2439 rtems: Remove _Modes_Set_interrupt_level()
This call just obfuscated the call to _ISR_Set_level().

Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
b207b37898 posix: Remove superfluous check
The api pointer is never NULL.

Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
f6a97f5992 rtems: Simplify signal handling
Remove superfluous ASR_Information::signals_posted.  Move code out of
trivial inline functions.

Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
74ca8b7517 rtems: Move _Signal_Action_handler()
Move _Signal_Action_handler() and signal MP initialization to
rtems_signal_send().  The goal is to make _Signal_Action_handler() a
static function in a follow up patch.

Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
a52e5d9c7e rtems: Remove unused ASR_Information::nest_level
Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
9d5d73be63 rtems: Remove unused _Modes_Change()
Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
600360dadf rtems: Remove unused _Modes_Mask_changed()
Update #4244.
2021-02-20 15:18:49 +01:00
Sebastian Huber
f9a59164e8 score: Add _Thread_Append_post_switch_action()
Update #4244.
2021-02-20 15:18:48 +01:00
Sebastian Huber
fea848bbbc score: Change thread action locking
Require that the corresponding lock is acquired before the action
handler returns.  This helps to avoid recursion in the signal
processing.

Update #4244.
2021-02-20 15:18:48 +01:00
Sebastian Huber
8b1b987201 rtems: Generate <rtems/rtems/signal.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Update #3899.
Update #3993.
2021-02-19 07:07:04 +01:00
Sebastian Huber
be60372136 basedefs: Add RTEMS_ALIGNOF() 2021-02-19 07:07:04 +01:00
Ryan Long
fa25b73ac1 shell.c: Fix Dereference before null check (CID #1467420)
CID 1467420: Dereference before null check in rtems_shell_line_editor().

Closes #4254
2021-02-18 13:34:33 -06:00
Sebastian Huber
407e351e11 rtems: Generate <rtems/rtems/sem.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Update #3899.
Update #3993.
2021-02-17 18:57:24 +01:00
Sebastian Huber
276828053e rtems: Generate <rtems/rtems/clock.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Update #3899.
Update #3993.
2021-02-17 18:57:24 +01:00
Sebastian Huber
0c4c03532c rtems: Generate <rtems/rtems/barrier.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.

Update #3899.
Update #3993.
2021-02-17 18:57:24 +01:00
Sebastian Huber
97825daf9c rtems: Clarify object services documentation
Unify the wording across similar directives of other managers.

Update #3993.
2021-02-17 18:57:07 +01:00
Sebastian Huber
7a1828ac61 rtems: Clarify IO manager documentation
Unify the wording across similar directives of other managers.

Update #3993.
2021-02-17 18:56:50 +01:00
Sebastian Huber
bf3b9f4536 rtems: Clarify partition manager documentation
Unify the wording across similar directives of other managers.

Update #3993.
2021-02-17 18:56:22 +01:00
Sebastian Huber
f9dc44afc7 rtems: Clarify timer manager documentation
Unify the wording across similar directives of other managers.  Add
"CONSTRAINTS" section.

Update #3993.
2021-02-17 18:56:04 +01:00
Sebastian Huber
2730599ca1 rtems: Clarify event manager documentation
Unify the wording across similar directives of other managers.  Add
"CONSTRAINTS" section.

Update #3993.
2021-02-17 18:55:24 +01:00
Chris Johns
b5aef78b36 score: Fix warning in thread queue ops 2021-02-16 08:12:43 +11:00
Ryan Long
f65d3384dd rtems-debugger-threads.c: Fix three Dereference before null check errors
CID 1468681: Dereference before null check in rtems_debugger_thread_continue().
CID 1468690: Dereference before null check in rtems_debugger_thread_system_resume().
CID 1468694: Dereference before null check in rtems_debugger_thread_find_index().

Closes #4241.
2021-02-12 17:13:19 -06:00
Ryan Long
3f4cdd8589 rtems-debugger-target.c: Fix Dereference before null check (CID #1468682)
CID 1468682: swbreaks is assigned a value dereferenced from target before
it has been verified that target is not null.

Closes #4240.
2021-02-12 17:13:16 -06:00
Ryan Long
14f5a0597a consolesimpletask.c: Fix Two Unchecked Return Values (CID #1437625 and #1472765)
CID 1437625: Unchecked return value from call to rtems_task_create().
CID 1472765: Unchecked return value from call to rtems_task_start().

Closes #4237.
2021-02-12 17:13:13 -06:00
Ryan Long
cc273ec10f Add macros to assert status and use it
These macros are to be used to check the status from calls that are flagged
by Coverity as 'Unchecked return value'.

Fix file assert.h
2021-02-12 17:13:10 -06:00
Chris Johns
426154f4fd cputkit/rtems: Remove warning 2021-02-13 07:09:38 +11:00
Chris Johns
03dff2019f libcsupport: Add sbrk greedy support to consume all sbrk memory
- Move the heap sbrk code into a separate routnine.

- Update heap and workspace greedy allocators to use the common
  sbrk greedy support.

Closes #3982
2021-02-10 17:28:32 +11:00
Sebastian Huber
286ff5868e basedefs: Add stringification of argument lists
Change RTEMS_STRING() and RTEMS_XSTRING() to accept a variable number of
arguments which is stringified.  This can be used for example to create
register lists for inline assembler statements.
2021-02-09 07:06:49 +01:00
Sebastian Huber
788fa865fb libtest: Add T_get_thread_timer_state() 2021-02-08 08:44:14 +01:00
Chris Johns
7ca3b283ba libcsupport: Have greedy allocations use consume extended memory
- Call the heap extend handler until all memory has been
  requested.

Closes #3982
2021-02-08 17:45:52 +11:00
Chris Johns
822cad8967 libcsupport: Add no_regular_file_mknod as a mount option to the mount table
- Add the bool flag no_regular_file_mknod to the mount table so a file
  system can indicate creating regular files is not done by
  use the mknod handler. The file system will handle creating a
  file node in the open handler.

- Note, the mount option is an enum which means there is only one
  exclusive option supported. As a result no encapsulation is
  provided and file systems need to set no_regular_file_mknod directly.

Closes #4222
2021-02-08 13:10:37 +11:00
Sebastian Huber
96ea09ac4c score: Add barrier thread queue operations
This fixes a missing decrement of the number of waiting threads during a
barrier wait timeout.

Close #4230.
2021-02-06 20:55:51 +01:00
Sebastian Huber
9477d9aedb score: Make FIFO thread queue ops public
Update #4230.
2021-02-06 20:55:51 +01:00
Sebastian Huber
2b5ce23b99 score: Constify Thread_queue_First_operation
Update #4230.
2021-02-06 20:42:26 +01:00
Sebastian Huber
aa0060f4c1 rtems: Clarify partition manager documentation
Unify the wording across similar directives of other managers.  Add
"Constraints" paragraph.

Update #3993.
2021-02-03 06:10:21 +01:00
Sebastian Huber
98549e4524 score: _Objects_Build_name() signed/unsigned char
Change _Objects_Build_name() so that the result is independent of the
signedness of char.

Close #4228.
2021-02-03 05:58:49 +01:00
Sebastian Huber
ca68cfc898 rtems: Avoid duplicated implemenation
Use the rtems_clock_get_ticks_per_second() macro to implement the
rtems_clock_get_ticks_per_second() function.
2021-02-03 05:57:06 +01:00
Sebastian Huber
8a95e6f820 rtems: Rework object services API
Add a "Constraints" paragraph to the documentation.

Provide prototypes for programming language bindings.  Use the macro
implementation to implement the corresponding functions.

Update #3993.
2021-02-03 05:57:06 +01:00
Sebastian Huber
490e6e8809 score: Define _Assert() for static analysis runs
The goal is to reduce false positive NULL_RETURNS,
PW.NORETURN_FUNCTION_DOES_RETURN, PW.SET_BUT_NOT_USED,
UNUSED_VALUE, etc. issues produced by Coverity.

Define RTEMS_STATIC_ANALYSIS if a static analysis run by Coverity is
performed.
2021-02-01 14:19:28 +01:00
Sebastian Huber
8f7baef4a6 libtest: Remove double definition 2021-02-01 14:19:28 +01:00
Sebastian Huber
56494ed8d1 score: Clarify thread life state documentation 2021-02-01 12:48:10 +01:00