1. 19 Mar, 2020 2 commits
    • 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>
  2. 26 Feb, 2020 1 commit
  3. 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.
  4. 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, ...);
  5. 13 Nov, 2019 2 commits
  6. 19 Aug, 2019 1 commit
  7. 21 Jul, 2019 1 commit
  8. 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.
  9. 30 Jun, 2019 2 commits
  10. 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.
  11. 27 Jun, 2019 1 commit
  12. 13 Jun, 2019 1 commit
  13. 29 May, 2019 1 commit
  14. 22 Apr, 2019 1 commit
  15. 10 Mar, 2019 1 commit
  16. 07 Mar, 2019 1 commit
  17. 04 Mar, 2019 9 commits