summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sys/bitset.h: reduce visibility of BIT_* macrosStefan Eßer2022-09-282-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two underscore characters "__" to names of BIT_* and BITSET_* macros to move them to the implementation name space and to prevent a name space pollution due to BIT_* macros in 3rd party programs with conflicting parameter signatures. These prefixed macro names are used in kernel header files to define macros in e.g. sched.h, sys/cpuset.h and sys/domainset.h. If C programs are built with either -D_KERNEL (automatically passed when building a kernel or kernel modules) or -D_WANT_FREENBSD_BITSET (or this macros is defined in the source code before including the bitset macros), then all macros are made visible with their previous names, too. E.g., both __BIT_SET() and BIT_SET() are visible with either of _KERNEL or _WANT_FREEBSD_BITSET defined. The main reason for this change is that some 3rd party sources including sched.h have been found to contain conflicting BIT_* macros. As a work-around, parts of shed.h have been made conditional and depend on _WITH_CPU_SET_T being set when sched.h is included. Ports that expect the full functionality provided by sched.h need to be built with -D_WITH_CPU_SET_T. But this leads to conflicts if BIT_* macros are defined in that program, too. This patch set makes all of sched.h visible again without this parameter being passed and without any name space pollution due to BIT_* macros becoming visible when sched.h is included. This patch set will be backported to the STABLE branches, but ports will need to use -D_WITH_CPU_SET_T as long as there are supported releases that do not contain these patches. Reviewed by: kib, markj MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D33235
* sys/kern: Add VFS supportChris Johns2021-08-2816-282/+180
| | | | | | | | | | - Refactor the libio interface - Move syscalls into an rtemsbsd location - Provide a root directory mount point Update #4475
* freebsd/sys: Import VFS supportChris Johns2021-08-286-0/+1351
| | | | Update #4475
* kern: Add kernel trace support (KTR)Chris Johns2021-08-281-1/+16
| | | | Update #4475
* kern: Add a proc0Chris Johns2021-08-282-18/+54
| | | | | | - Provides the thread's proc pointer and with that access to creds Update #4475
* sys/kern: Add lockmgr supportChris Johns2021-08-285-16/+15
| | | | | | | | | | - See `man lockmgr` - Implement the lock_object and move the RTEMS mutex to that object - Add debug support to track the locks with gdb Update #4475
* linker_set.h: Add alignof implementation for when not C11 or C++11Joel Sherrill2021-07-211-1/+3
| | | | | | The default implementation was completely broken. Use the GCC specific __alignof__ if compiling for C99 or C++03. If not C++11, C11, or GCC, then it is an error.
* linker: Enforce set alignment requirementsKinsey Moore2021-03-101-14/+37
| | | | | | | | | According to commentary on GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99143, the alignment behavior of linker sections on which RTEMS has relied was never guaranteed to be consistent across platforms and any alignment requirements for linker sections needs to be enforced explicitly. This adds those explicit alignment requirements.
* busdma: Option to round to cache lines on syncChristian Mauderer2020-07-291-0/+6
| | | | | | | | | | Some targets support only flushing or invalidating complete cache lines. In this cases misaligned buffers might lead to unexpected results. This patch adds a flag that allows drivers to signal to the bus dma driver that it is OK to round a buffer to the next full cache line. That's for example necessary if a driver wants to send out 14 byte via a USB DMA. Only the driver knows whether these 14 bytes are located in an otherwise unused cache line aligned buffer.
* Callout: Redefine callout_reset_on for rtemsJan Sommer2020-04-171-0/+6
| | | | | | | | - callout_reset_on takes a cpu which is ignored by the subsequent call to callout_reset_sbt_on in RTEMS. - The macro is redefined to discard the cpu argument directly which enables uses of it with cpu-dependent variables (disabled in RETMS) without further changes, e.g. in iflib.c.
* Update to FreeBSD stable/12 2020-02-10Sebastian Huber2020-02-1817-25/+62
| | | | Git mirror commit 0d1c391321b34b3025cf0e72f2231d836ff76da8.
* EVENTHANDLER(9): Avoid multiple definition errorsSebastian Huber2020-02-101-6/+4
|
* Add support for EARLY_COUNTERSebastian Huber2019-09-251-0/+4
|
* Remove obsolete header filesSebastian Huber2019-09-251-205/+0
|
* Fix pgsigio() warningsSebastian Huber2019-09-251-0/+14
|
* Update to FreeBSD stable/12 2019-09-23Sebastian Huber2019-09-239-23/+57
| | | | Git mirror commit 7e8d1444023128d34fb9aa4e4515928a4f794d1b.
* C++ compatibility for kernel space <sys/sysctl.h>Sebastian Huber2019-09-231-0/+2
|
* Update to FreeBSD stable/12 2019-08-26Sebastian Huber2019-08-267-11/+85
| | | | Git mirror commit 621e7bafbf6857451f23ba11b0495c7ac69aff89.
* Update to FreeBSD stable/12 2019-07-09Sebastian Huber2019-07-093-0/+3
| | | | Git mirror commit 3427c3416aa3c0f25124070959cca78024b94d85.
* Update to FreeBSD stable/12 2019-06-26Sebastian Huber2019-06-265-28/+56
| | | | Git mirror commit aa83598855d14cdbf7aef6b05d0617e90f87ca2f.
* Update to FreeBSD stable/12 2019-06-05Sebastian Huber2019-06-0512-16/+113
| | | | Git mirror commit 78576620f2689e23144a1cf1bf55106cc6abe2b7.
* Separate libbsd and RTEMS clock ticksSebastian Huber2019-05-151-9/+0
|
* Use static inline functions for jail and prisonSebastian Huber2019-05-131-0/+202
| | | | This helps the compiler to optimize away dead code.
* Update to FreeBSD stable/12 2019-03-27Sebastian Huber2019-03-284-0/+40
| | | | Git mirror commit 43a38f188ca2e936ec78104c30ea3e24d9c1606b.
* Update to FreeBSD stable/12 2019-03-11Sebastian Huber2019-03-111-0/+1
| | | | Git mirror commit 735fe7a0a5f9c265040e2e6654a01b081d6354f1.
* C++ compatibility for some kernel-space headersSebastian Huber2019-02-181-3/+3
|
* ZONE(9): Fix UMA_PCPU_ALLOC_SIZESebastian Huber2019-02-121-6/+4
| | | | | Using CACHE_LINE_SIZE for UMA_PCPU_ALLOC_SIZE was a huge memory waste since the backend memory allocator is page based.
* Update to FreeBSD stable/12 2019-01-29Sebastian Huber2019-01-295-2/+12
| | | | Git mirror commit 7005c2e76a6bfb359bf2f1acb8382c0b7a01f4be.
* Update to FreeBSD stable/12 2019-01-21Sebastian Huber2019-01-211-0/+3
| | | | | | Git mirror commit 3a48f3689d65c5304cf706bbf2c5576daeb60a96. Update #3472.
* Update to FreeBSD stable/12 2019-01-16Sebastian Huber2019-01-2116-184/+212
| | | | | | Git mirror commit 4ff7d8141f665693dd8b17090d410604888f1e9a. Update #3472.
* blist: Fix u_daddr_t for 32-bit targetsSebastian Huber2018-11-271-0/+4
| | | | The daddr_t is defined in <sys/types.h> by Newlib as long.
* Update to FreeBSD head 2018-11-15Sebastian Huber2018-11-1516-173/+181
| | | | | | Git mirror commit a18b0830c4be01b39489a891b63d6023ada6358a. Update #3472.
* Update to FreeBSD head 2018-10-23Sebastian Huber2018-10-2520-120/+189
| | | | | | | | | | | Git mirror commit 59f44d20be3f99d181ca742e636d45fc39ec982b. This commit updates OpenSSL to version 1.1.1. This required an update of racoon which uses some internal stuff from OpenSSL and seems to be mostly unmaintained, e.g. there is update in the FreeBSD ports to cope with OpenSSL 1.1.1. Update #3472.
* Update to FreeBSD head 2018-09-17Sebastian Huber2018-09-2127-192/+437
| | | | | | Git mirror commit 6c2192b1ef8c50788c751f878552526800b1e319. Update #3472.
* Update to FreeBSD head 2018-06-01Sebastian Huber2018-09-2126-73/+311
| | | | | | Git mirror commit fb63610a69b0eb7f69a201ba05c4c1a7a2739cf9. Update #3472.
* Update to FreeBSD head 2018-04-01Sebastian Huber2018-09-2122-110/+348
| | | | | | Git mirror commit 8dfb1ccc26d1cea7e2529303003ff61f9f1784c4. Update #3472.
* Update to FreeBSD head 2018-02-01Sebastian Huber2018-09-2123-58/+396
| | | | | | Git mirror commit d079ae0442af8fa3cfd6d7ede190d04e64a2c0d4. Update #3472.
* Update to FreeBSD head 2017-12-01Sebastian Huber2018-09-21117-251/+722
| | | | | | Git mirror commit e724f51f811a4b2bd29447f8b85ab5c2f9b88266. Update #3472.
* Update to FreeBSD head 2017-10-01Sebastian Huber2018-09-2116-55/+168
| | | | | | Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1. Update #3472.
* Update to FreeBSD head 2017-08-01Sebastian Huber2018-09-2118-252/+229
| | | | | | Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c. Update #3472.
* Update to FreeBSD head 2017-06-01Sebastian Huber2018-09-2116-226/+372
| | | | | | Git mirror commit dfb26efac4ce9101dda240e94d9ab53f80a9e131. Update #3472.
* Remove struct callout::c_cpuSebastian Huber2018-09-171-0/+2
| | | | | This is an optimization of the callout handling. In libbsd all callouts are handled by the one and only timer server.
* libkern.h: Avoid call overhead for bcmp()Sebastian Huber2018-08-091-0/+4
|
* random: Implement read_random via getentropy.Christian Mauderer2018-08-011-0/+10
|
* Make sure CALLOUT_DFRMIGRATION is not usedSebastian Huber2018-07-261-1/+1
| | | | | This flag supports the callout migration in FreeBSD. This feature is not supported by libbsd.
* Make sure CALLOUT_PROCESSED is not usedSebastian Huber2018-07-261-1/+1
| | | | | This flag is only used in combination with the callout expire list, which we do not use in libbsd.
* Critical bug fix for calloutsSebastian Huber2018-07-261-0/+2
| | | | | | | | FreeBSD has two callout executors, one in software and one in hardware interrupt context. In libbsd, all callouts are executed by the timer server. Entirely remove the different execution contexts for libbsd. Previously, this was not properly done which could result an invalid callout_drain() sequence leading to system memory corruption.
* Avoid malloc() in getsockaddr()Sebastian Huber2018-07-041-0/+2
| | | | | | | | | | | | | | | | The getsockaddr() function is used to allocate a struct sockaddr of the right length and initialize it with userspace provided data. It is used for the connect(), bind() and sendit() family functions. In particular, the sendit() function is used by the UDP send functions. This means each UDP send needs a malloc() and free() invocation. This is a performance problem in RTEMS (first-fit heap) and may lead to heap fragmentation. Replace the malloc() allocation with a stack allocation. This requires SOCK_MAXADDRLEN (= 255) of additional stack space for libbsd. A further optimization would be to get rid of the stack copy of the socket address. However, this would require to check each consumer of the address to ensure that it is not modified.
* DEVICE(9): Fix __BUS_ACCESSOR()Sebastian Huber2018-01-081-2/+0
|
* Revert "RWLOCK(9): Add reader/writer lock implementation"Sebastian Huber2017-11-171-2/+2
| | | | | | This was accidentally committed. This reverts commit 97a98f6cd767b3a68279890488c7b451788f84f4.