1. 01 Jun, 2020 1 commit
    • Philippe Gerum's avatar
      benchmarks/latmus: add sirq latency measurement · acf10e3a
      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.
      Therefore, this is an in-band only test which measures IRQ latency
      experienced by the common kernel infrastructure, _NOT_ by EVL.
      Measurement is requested with '-s' option.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
  2. 30 Apr, 2020 2 commits
    • Philippe Gerum's avatar
      lib: convert to HM diagnostic messages · 3fef97c6
      Philippe Gerum authored
      Since ABI 23, the core is able to channel T_WOSS, T_WOLI and T_WOSX
      error notifications through the offender's observable component if
      Convert all SIGDEBUG_xxx cause codes to the new EVL_HMDIAG_xxx naming,
      so that we have a single nomenclature for these errors regardless of
      whether threads are notified via SIGDEBUG or their observable
      The API rev. is bumped to #17 as a result of these changes.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
    • Philippe Gerum's avatar
      lib: introduce the interface to observables · f27fc993
      Philippe Gerum authored
      Since ABI 23, the core provides the new observable element, which
      enables the observer design pattern. Any EVL thread is in and of
      itself an observable which can be monitored for events too.
      As a by-product, the poll interface can now be given a user-defined
      opaque data when subscribing file descriptors to poll elements, which
      the core passes back on return to evl_poll().
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
  3. 23 Apr, 2020 3 commits
  4. 21 Apr, 2020 1 commit
  5. 18 Apr, 2020 1 commit
    • Philippe Gerum's avatar
      lib: introduce element visibility attribute · 9b42b85e
      Philippe Gerum authored
      Since core ABI 21, users can decide whether a new element should be
      made public or private depending on the value of clone flags added to
      the new long form of all element creation calls, i.e. evl_create_*().
      All evl_new_*() calls become a shorthand for their respective long
      form with reasonable default arguments, including private visibility.
      As a shorthand, libevl also interprets a slash character leading the
      name argument passed to these services as an implicit request for
      creating a public element. In other words, this is the same as passing
      EVL_CLONE_PUBLIC in the clone flags.
      A public element appears as a cdev in the /dev/evl hierarchy, which
      means that it is visible to other processes, which may share it. On
      the contrary, a private element is only known from the process
      creating it, although it does appear in the /sysfs hierarchy
      efd = evl_attach_self("/visible-thread");
      total 0
      crw-rw----    1 root     root      248,   1 Apr 17 11:59 clone
      crw-rw----    1 root     root      246,   0 Apr 17 11:59 visible-thread
      efd = evl_attach_self("private-thread");
      total 0
      crw-rw----    1 root     root      248,   1 Apr 17 11:59 clone
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
  6. 17 Apr, 2020 1 commit
  7. 28 Mar, 2020 1 commit
  8. 19 Mar, 2020 3 commits
    • Philippe Gerum's avatar
      lib: fix unfortunate misnomer · a9f1e2f6
      Philippe Gerum authored
    • Philippe Gerum's avatar
      lib: y2038: convert to timespec64 kernel interface · 4204f25b
      Philippe Gerum authored
      This set of changes makes libevl y2038-safe by switching to the ABI
      revision 19 of the EVL core, which generalizes the use of a 64bit
      timespec type. These changes also go a long way preparing for the
      upcoming mixed 32/64 ABI support (aka compat mode).
      The changes only affect the internal interface between libevl and the
      kernel, not the API.  Nevertheless, the API was bumped to revision 10
      with the removal of the evl_adjust_clock() service, which neither had
      proper specification nor defined use case currently, but would stand
      in the way of the sanitization work for y2038. At any rate, any future
      service implementing some sort of EVL clock adjustment should
      definitely not depend on the legacy struct timex which is
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
    • Philippe Gerum's avatar
      lib/init: state ABI requirement explicitly · 1565744d
      Philippe Gerum authored
      Instead of matching whatever ABI we might be compiled against like
      previously, define the kernel ABI we need as a prerequisite
      (EVL_KABI_PREREQ), checking for sanity at build time and runtime.
      This prerequisite is matched against the range of ABI revisions the
      kernel supports (from EVL_ABI_BASE to EVL_ABI_CURRENT). In the
      simplest case, the kernel implements a single ABI with no backward
      compatibility mechanism (EVL_ABI_BASE == EVL_ABI_CURRENT).
      This addresses two issues:
      - the fact that libevl might build against a given set of uapi/ files
        does not actually mean that the corresponding kernel ABI found there
        is fully compatible with what libevl expects. Specifying a
        compatible ABI prereq explicitly addresses this problem.
      - we can obtain services from EVL cores supporting multiple ABI
        revisions (i.e. providing backward compat feat).
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
  9. 26 Feb, 2020 1 commit
  10. 21 Jan, 2020 1 commit
    • Philippe Gerum's avatar
      lib: rename evl_udelay() to evl_usleep() · db712cc1
      Philippe Gerum authored
      evl_udelay() was an annoying misnomer for people with kernel
      development background, as this relates to a busy wait loop, not to a
      sleeping call, which evl_udelay() actually was.
      Rename this call to evl_usleep(), converging to the glibc signature
      for usleep(3) in the same move.
  11. 19 Nov, 2019 1 commit
    • Philippe Gerum's avatar
      include: add 'tube' data path · 08592109
      Philippe Gerum authored
      A lighweight, lockless multi-reader/multi-writer FIFO with a
      base-offset variant which can work over a memory segment shared
      between processes. Scalar data or simple (small!) aggregates are
      conveyed though a tube inside canisters which exactly fit their type.
      By design, a tube is meant to be a basic, spartan mechanism: it
      imposes no usage policy whatsoever on users.
      As a result, a tube is strictly non-blocking, it solely detects and
      notifies the caller on return about empty input (no message in) and
      output contention (no buffer space for output). If required, the
      caller can implement blocking states, typically with a pair of EVL
      semaphores, e.g. setting up a tube conveying integers which supports
      blocking mode:
          DECLARE_EVL_TUBE_CANISTER(canister_type, int); /* defines struct canister_type */
          DECLARE_EVL_TUBE(tube_type, cannister_type) tube;
          struct cannister_type items[1024];
          evl_init_tube(&tube, items, 1024);
          evl_new_sem(&in, ...);
          evl_new_sem_any(&out, CLOCK_MONOTONIC, tube.max_items, ...);
          evl_get_sem(&in, ...);           @      evl_get_sem(&out);
          evl_tube_receive(&tube, ...);    @      evl_tube_send(&tube, ...);
          evl_put_sem(&out);               @      evl_put_sem(&in, ...);
  12. 13 Nov, 2019 2 commits
  13. 19 Aug, 2019 1 commit
  14. 21 Jul, 2019 1 commit
  15. 02 Jul, 2019 1 commit
    • Philippe Gerum's avatar
      lib/sched: export evl_get_cpustate() · 51b8c157
      Philippe Gerum authored
      This routine is mainly intended as a tool for applications to
      implement LARTs, notably returning the isolation state of a CPU. This
      helps in detecting when a user is about to run out-of-band work on a
      non-isolated CPU.
      Although a dual kernel system performs significantly better than a
      native preemption system in this configuration, getting the smallest
      jitter and latency figures will require running the out-of-band load
      on an isolated core, so that the in-band work does not increase the
      rate of cache misses for the out-of-band duties.
  16. 30 Jun, 2019 2 commits
  17. 29 Jun, 2019 2 commits
    • Philippe Gerum's avatar
      lib/clock: drop meaningless parameter from evl_sleep() · c78307fd
      Philippe Gerum authored
      evl_sleep() only accepts absolute timespecs, so there is no point in
      providing a pointer for collecting the remaining time upon interrupt.
    • Philippe Gerum's avatar
      lib/proxy: enable fixed granularity for writes · 85018fc2
      Philippe Gerum authored
      This change allows the application to specify a fixed granularity for
      writes to the target file, such as connecting the proxy with an
      eventfd for instance, guaranteeing fixed-size 64bit writes to the
      evl_poll() is also enabled for the proxy, with POLLOUT|POLLWRNORM
      raised when the output has drained, i.e. all data have been sent to
      the target file.
  18. 27 Jun, 2019 1 commit
  19. 13 Jun, 2019 1 commit
  20. 29 May, 2019 1 commit
  21. 22 Apr, 2019 1 commit
  22. 10 Mar, 2019 1 commit
  23. 07 Mar, 2019 1 commit
  24. 04 Mar, 2019 9 commits