- 03 May, 2021 40 commits
-
-
Philippe Gerum authored
All pointers passed as 64 bit long integer in the ABI in order to deal with compat mode refer to user memory. Annotate their description accordingly. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Enable drivers to create EVL factories in order to extend the core services with new elements/features, benefiting from the object lifetime management brought by the factory support. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We need to wait for the synthetic irq fired by irq_work_queue() to be delivered on the current CPU, so we'd better not stall the in-band stage prior to waiting for the handler to complete (flush_work()). Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This mode measures the delay between the moment a synthetic interrupt is posted from the oob stage and when it is eventually received by its in-band handler. When measured under significant pressure, this gives the typical interrupt latency experienced by the in-band kernel due to local interrupt disabling. As a result of this change, the current ABI revision is bumped to 25. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We should be able to read a complete message of the requested length if O_NONBLOCK is clear. If set and some bytes are available, return them. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Just like in the in-band case, we cannot fully rely on testing the ring buffer for (non-)emptiness in order to detect data availability. If so, kick the worker thread in order to perform some readahead, as a last resort. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
!FMODE_STREAM does not tell us anything about atomic fpos handling, although FMODE_STREAM would denote a non-seekable file. FMODE_ATOMIC_POS is what we need to check instead. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Testing the input ring buffer for (non-)emptiness tells us nothing about the readability of the target file, which may have data available we did not pull into the buffer yet. We have to relay such request to the driver actually handling this file in addition to checking the ring buffer. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
A proxy should be usable for reading from an in-band file without encurring a stage switch, just like it is for the output direction. These changes introduce the EVL_CLONE_INPUT, EVL_CLONE_OUTPUT creation flags for a proxy, which can be used in a mutually exclusive manner, or combined in order to have a bidirectional channel to the target file. As a by-product, the output direction gains in-band poll() support. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Observables enable the observer design pattern, in which any number of observer threads can be notified of updates to any number of observable subjects, in a loosely coupled fashion. In the same move, an EVL thread becomes in and of itself an observable which can be monitored for events. As a by-product, provide support for channeling SIGDEBUG notifications to threads through their own observable on request instead of, or in addition to issuing SIGDEBUG. The built-in runtime error detection capabilities the core provides can feed health monitors, based on the observability of threads. The core switches to ABI 23 as a result of these changes. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Multiple concurrent writers could cause a missed wake up of the relay worker, which would keep them blocked on the drain flag upon contention indefinitely. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We need a safe form of async workers to address the following issue: CPU0: evl_call_inband*(arg=some_element) CPU0: irq_work_queue() CPU0: queue_work() CPU1: release(element) CPU1: dispose(element) CPU0: work->handler(arg=some_element) CPU0: invalid access to stale 'some_element' evl_init_work_safe() guarantees integrity by holding a reference on the given element from when evl_call_inband*() is issued until the handler has completed. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
- EVL_THRIOC_UNBLOCK releases the target thread from any ongoing wait on a resource (does not apply to forcible suspension). - EVL_THRIOC_DEMOTE unblocks and demotes the target thread to SCHED_WEAK. - EVL_THRIOC_YIELD performs sched_yield(). In addition, EVL_THRIOC_SET/CLEAR_MODE are no more restricted to the current thread over oob, which did not make much sense. Calls from either in-band or oob are now allowed, and may target an arbitrary thread. These changes trigger a bump to ABI 22, although we keep on supporting 21. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
The ->sched_control() returns the length of the information block to copy back to user, not a zero/non-zero status. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Allow users to decide whether a new element should be made public or private at creation time, depending on a clone operation attribute. A public element appears as a cdev in the /dev/evl hierarchy, which means that it is visible to other processes (which was the static default before this change). On the contrary, a private element is only known from the process creating it, although it does appear in the /sysfs hierarchy regardless. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Pinning is done relatively to the active rq of the current EVL thread, which may be NULL since plain threads are allowed to set/get an EVL timerfd. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This fixes an infinite loop in the tp tick handler when advancing to the next partition. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
tp_control() did not receive the proper input on tp_install requests, neither did it return the proper information on tp_get. Great, fix the mess. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Upon requests involving SCHED_TP, SCHED_QUOTA policies which have been compiled out, we should send -EOPNOTSUPP instead of -EINVAL to the caller, so that we can distinguish between lack of kernel support from mere invalid argument issue. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This code illustrates the usage of the out-of-band SPI transfer API in kernel space, interfacing with the EVL core for synchronizing on transfer completion events. It extends the SPIDEV ioctl() interface with a few control requests for running out-of-band SPI transfers, exporting the I/O buffer to applications via mmap() support. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Adapt commit #133e996 from https://git.xenomai.org/xenomai fixing how we recalculate the time budget of the running thread for the updated group, for such thread only. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-