Commit Graph

1302 Commits

Author SHA1 Message Date
Ryan Long
df3fa4e005 interr.h: Fix gcc 12 warning
The warning that this fixes states that "ISO C restricts enumerator values to
range of 'int'."

Updates #4662
2022-08-19 15:34:46 -05:00
Ryan Long
f930206724 linkersets.h: Fix gcc 12 warning
Changing the offset from 0 to 1 got rid of a warning stating that offset 0 is
out of bounds.

Updates #4662
2022-08-19 15:34:46 -05:00
Ryan Long
ec7d6c092f threads.h: Add pragmas to get rid of gcc 12 errors
Updates #4662
2022-08-19 15:34:46 -05:00
Joel Sherrill
36895bd2c5 cpukit/include/rtems/test-info.h: Change @returns to @return 2022-08-10 14:15:47 -05:00
Joel Sherrill
4b04589b09 Add support for CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
This adds the configure option CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
which allows the application to choose whether to have the POSIX
timer_create() function follow the behavior defined by POSIX or
the FACE Technical Standard.

Updates #4691.
2022-08-10 14:15:46 -05:00
Sebastian Huber
cf3d2b37c8 rtems/malloc.h: Add API level Doxygen group
The interfaces in the MallocSupport group belong to the implementation.  They
are used by confdefs.h for example.
2022-08-10 15:41:58 +02:00
Sebastian Huber
7219d3c0e9 libtest: Add T_report_hash_sha256_update()
Update #3716.
2022-08-10 07:51:14 +02:00
Chris Johns
071640d310 libmisc/shell: Add an 'rtems' command to report a running build
- Report version, cpu, bsp, tools and options.
2022-08-03 10:46:10 +10:00
Ryan Long
ad94dc352e sys/exec_elf.h: Bring in newer file
Updated this file with the newer version in NetBSD.

Updates #4682
2022-07-29 08:32:47 -05:00
Sebastian Huber
6a6580331d score: Allow linker garbage collection
Place the object control blocks in dedicated sections to allow a linker garbage
collection.

Update #4678.
2022-07-28 08:21:57 +02:00
Sebastian Huber
8a864bc62c score: Use PTHREAD_CANCELED for _Thread_Cancel()
The rtems_task_delete() directive is basically just a combined pthread_cancel()
and pthread_join().  In addition, it removes the PTHREAD_DETACHED state.  The
exit value returned by pthread_join() of threads cancelled by
rtems_task_delete() should reflect this by getting a PTHREAD_CANCELED value
instead of NULL which could be a normal exit value.

Close #4680.
2022-07-28 07:53:04 +02:00
Sebastian Huber
31036f1dc8 score: Use priority inheritance for thread join
Threads may join the thread termination of another thread using the
pthread_join() or rtems_task_delete() directives.  The thread cancel operation
used a special case priority boosting mechanism implemented by
_Thread_Raise_real_priority().  The problem was that this approach

* is not transitive,

* does not account for priority adjustments of the calling task
  while waiting for the join,

* does not support clustered scheduling, and

* does not detect deadlocks.

All these problems are fixed by using a priority inheritance thread queue for
the join operation.

Close #4679.
2022-07-28 07:52:59 +02:00
Sebastian Huber
2501c64bb6 score: Fix objects local table initialization
The objects local table must be statically zero-initialized so that
_Objects_Get() and _Objects_Get_no_protection() return NULL if no object is
associated with the identifier.

Update #4678.
2022-07-27 08:59:45 +02:00
Sebastian Huber
7fe6d60bf0 score: Remove PRIORITY_PSEUDO_ISR thread priority
The uniprocessor schedulers had some special case logic for the
PRIORITY_PSEUDO_ISR priority.  Tasks with a priority of PRIORITY_PSEUDO_ISR
were allowed to preempt a not preemptible task.  If other higher priority task
are made ready while a PRIORITY_PSEUDO_ISR task preempts a not preemptible
task, then the other tasks run before the not preemptible task.  This made the
RTEMS_NO_PREEMPT mode ineffective.

Remove the PRIORITY_PSEUDO_ISR special case logic.  This simplifies the
uniprocessor schedulers.  Move the uniprocessor-specific scheduler support to
the new header file <rtems/score/scheduleruniimpl.h>.

Close #2365.
2022-07-26 11:26:22 +02:00
Sebastian Huber
8dc651f8fc imfs: Add <rtems/imfsimpl.h> 2022-07-25 16:11:36 +02:00
Sebastian Huber
e584ee4bde libtest: Add missing initializer 2022-07-25 10:02:18 +02:00
Matt Joyce
6d4b390f99 Support _REENT_THREAD_LOCAL Newlib configuration
In case the Newlib _REENT_THREAD_LOCAL configuration option is enabled, the
struct _reent is not defined (there is only a forward declaration in
<sys/reent.h>).  Instead, the usual members of struct _reent are available as
dedicatd thread-local storage objects.

Update #4560.
2022-07-21 07:22:13 +02:00
Sebastian Huber
12a03bea4f score: Fix unlimited objects support
Commit 21275b58a5 ("score: Static
Objects_Information initialization") introduced an off-by-one error in the
maintenance of inactive objects.

Close #4677.
2022-07-18 09:33:16 +02:00
Sebastian Huber
1bf878f7ff score: Extend memory dirty/zero actions
Dirty or zero also the part of the .noinit section used by RTEMS.

Close #4678.
2022-07-15 10:46:02 +02:00
Sebastian Huber
4b911a7516 score: Place object controls into .noinit sections
Place the statically allocated object control blocks, local tables, and thread
queue heads into the dedicated .noinit intput sections.  The output section is
not zero initialized.  Placing these elements into the .noinit section reduces
the system initialization time by decreasing the .bss section size.

It may improve the cache efficiency since the mostly read local tables are
placed in a contiguous memory area.

Update #4678.
2022-07-15 10:46:02 +02:00
Gleb Smirnoff
388dd97e39 Add in_localip_fib(), in6_localip_fib().
Check if given address/FIB exists locally.

Reviewed by:		melifaro
Differential revision:	https://reviews.freebsd.org/D32913
2022-07-11 13:28:10 +02:00
Gleb Smirnoff
94c33ba992 Use network epoch to protect local IPv4 addresses hash.
The modification to the hash are already naturally locked by
in_control_sx.  Convert the hash lists to CK lists. Remove the
in_ifaddr_rmlock. Assert the network epoch where necessary.

Most cases when the hash lookup is done the epoch is already entered.
Cover a few cases, that need entering the epoch, which mostly is
initial configuration of tunnel interfaces and multicast addresses.

Reviewed by:		melifaro
Differential revision:	https://reviews.freebsd.org/D32584
2022-07-11 13:28:10 +02:00
Alexander V. Chernikov
7846249e1a routing: fix source address selection rules for IPv4 over IPv6.
Current logic always selects an IFA of the same family from the
 outgoing interfaces. In IPv4 over IPv6 setup there can be just
 single non-127.0.0.1 ifa, attached to the loopback interface.

Create a separate rt_getifa_family() to handle entire ifa selection
 for the IPv4 over IPv6.

Differential Revision: https://reviews.freebsd.org/D31868
MFC after:	1 week
2022-07-11 13:28:10 +02:00
John Baldwin
070f1b552c Remove copyinfrom() and copyinstrfrom().
These functions were added in 2001 and are currently unused.
copyinfrom() looks to have never been used.  copyinstrfrom() was used
for two weeks before the code was refactored to remove it's sole use.

Reviewed by:	brooks, kib
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24928
2022-07-11 13:28:10 +02:00
Sebastian Huber
6e74cebb62 score: Conditional _Thread_Priority_replace()
This function is only used in SMP configurations.
2022-07-07 08:46:48 +02:00
Sebastian Huber
4f87edbb75 gcov: Add functions to dump the gcov information
Update #4670.
2022-07-04 08:29:52 +02:00
Sebastian Huber
ba56e23999 score: Account for <sys/bitset.h> API changes
Update #4667.
2022-06-23 10:29:31 +02:00
Sebastian Huber
a76988c881 score: Remove unused _Processor_mask_Nand()
Update #4667.
2022-06-23 10:29:31 +02:00
Sebastian Huber
5dffbc424e score: Make SMP only code explicit
Conditional expressions with inline functions are not optimized away if
optimization is disabled.  Avoid such expressions to prevent dead
branches.  It helps also during code review to immediately see if a loop
is used or not.
2022-06-23 10:28:49 +02:00
Frank Kühndel
679e7f109a TFTPFS: Implement block and window size options
The original file cpukit/libfs/src/ftpfs/tftpDriver.c
is split into two:

tftpfs.c     - This file contains the code from tftpDriver.c
               related to file system operations such as mount(),
               open(), read(), and so on.

tftpDriver.c - In the original file remains only the code related
               to networking.  This code implements the Trivial
               File Transfer Protocol (TFTP).

Moreover, the code is extended to support

  * RFC 2347 TFTP Option Extension
  * RFC 2348 TFTP Blocksize Option
  * RFC 7440 TFTP Windowsize Option

Update #4666.
2022-06-21 09:32:11 +02:00
Gabriel Moyano
5ccf9605dd timecounter.h: Add _Timecounter_Discipline()
Update #2349.
2022-05-23 09:09:03 +02:00
Gabriel Moyano
b3e4f5809d timepps.h: PPS_SYNC defined by default
Update #2349.
2022-05-23 09:09:01 +02:00
Gabriel Moyano
ac4ea53664 score: Rename tc_getfrequency()
Rename tc_getfrequency() to _Timecounter_Get_frequency().

Update #2349.
2022-05-23 09:08:52 +02:00
Gabriel Moyano
95c747d9e7 kern_tc.c: Replace FreeBSD event mechanism by adding pointers to function
Update #2349.
2022-05-23 09:08:50 +02:00
Gabriel Moyano
bf61753a92 kern_tc.c: Add atomic dependencies required by the PPS API
Update #2349.
2022-05-23 09:08:48 +02:00
Sebastian Huber
f49ef6b6cb Add file descriptions to kernel space headers 2022-05-18 10:01:29 +02:00
Sebastian Huber
b9926483b1 Fix copyright notice of kernel space headers
Use the copyright notice of the associated header file from FreeBSD if the
kernel space header file contains a substantial amount of imported code.
2022-05-18 10:01:29 +02:00
Sebastian Huber
81962136cc Add include guard checks to kernel space headers 2022-05-18 10:01:29 +02:00
Tian Ye
901bc146b0 score: Add SMP priority affinity scheduler yield 2022-05-12 09:02:26 +02:00
Ryan Long
ebfccb05b8 include: Add file headers and licenses
These files had no header, copyright, or license. Based on git history,
added appropriate copyrights and licenses.
2022-05-04 09:12:06 -05:00
Ryan Long
0c17d0e55d ftpd.h: Add file header and license
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
2022-05-04 09:12:01 -05:00
Ryan Long
5cbad67bc8 include/pci: Add file header and license
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
2022-05-04 09:12:01 -05:00
Ryan Long
17c92ad829 cpukit/include/rtems: Add file headers and licenses
These files had no header, copyright, or licenses. Based on git history,
added appropriate copyright and license.
2022-05-04 09:12:01 -05:00
Ryan Long
47e84cbde2 cpukit/include: Adding file headers and licenses
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
2022-05-04 09:11:50 -05:00
Sebastian Huber
8b18037f20 heap: Fix heap statistics with protection enabled
Close #4644.
2022-04-28 09:16:54 +02:00
Sebastian Huber
23426257c6 shell: Add rtems_shell_run_main_loop()
In contrast to rtems_shell_main_loop(), this new function does not
perform all sorts of initialization based on environment settings.  For
example, due to the use of isatty() in rtems_shell_main_loop() it is
impossible to run an interactive shell through a socket connection.
2022-04-06 16:26:52 +02:00
Joel Sherrill
5f8c41c389 Update email address of Fernando Ruiz Casas to <fruizcasas@gmail.com>
This was requested to be executed prior to relicensing to BSD-2.
2022-04-05 13:13:31 -05:00
Joel Sherrill
3a6c3c1bde cpukit/include; Remove SPDX from Gaisler files NOT changed to BSD-2 2022-04-02 14:15:16 -05:00
Joel Sherrill
54ec02640d cpukit/include/rtems/timespec.h: Change license to BSD-2
Permission received from Krzysztof Miesowicz.

Updates #3053.
2022-04-01 10:02:30 -05:00
Joel Sherrill
59fba6f520 cpukit/include/rtems/cbs.h: Change license to BSD-2
Permission received from Petr Benes

Updates #3053.
2022-04-01 10:02:30 -05:00