1. 10 Apr, 2019 2 commits
  2. 03 Jul, 2018 2 commits
  3. 17 Jul, 2017 1 commit
  4. 15 Apr, 2017 1 commit
  5. 12 Feb, 2016 1 commit
    • Philippe Gerum's avatar
      cobalt/registry: return -EAGAIN upon lack of registry slot · 364a91b4
      Philippe Gerum authored
      -ENOMEM is confusing in this case, does not actually reflect the error
      condition, and does not match the error code commonly returned by
      POSIX services for denoting a (temporary) lack of resources.
      Besides, this source of error was not even mentioned in the
      documentation of the affected services.
      
      All error codes must be detected, and any program that might have
      specifically checked for -ENOMEM during error recovery in the affected
      services was potentially confused, so this change does not introduce a
      significant ABI variation.
      364a91b4
  6. 17 Nov, 2015 1 commit
  7. 15 Oct, 2015 2 commits
  8. 03 Oct, 2015 1 commit
    • Gilles Chanteperdrix's avatar
      posix/mutex: fix autoinit · dfa9ad71
      Gilles Chanteperdrix authored
      If several threads call simultaneously pthread_mutex_lock() on a mutex
      initialized with PTHREAD_MUTEX_INITIALIZER, the current automatic
      intialization may result in several initializations of the mutex.
      Serialize the automatic initialization with a global mutex to avoid
      that.
      
      This can be done only for automatic initialization, as
      pthread_mutex_init() may be called from a non Xenomai thread, which
      could not sleep on a cobalt mutex, and serializing with a plain Linux
      mutex would cause a switch to secondary mode for pthread_mutex_lock() in
      case of automatic initialization.
      
      Using a condition variable would create a cancellation point, whereas
      pthread_mutex_lock() and pthread_mutex_unlock() can not be cancellation
      points.
      dfa9ad71
  9. 02 Oct, 2015 1 commit
  10. 01 Oct, 2015 1 commit
  11. 16 May, 2015 1 commit
    • Philippe Gerum's avatar
      cobalt/mutex, lib/cobalt: detect attempts to sleep while holding a mutex · e3153cf2
      Philippe Gerum authored
      Going to sleep intentionally while holding a mutex is an application
      issue. When user consistency checks are enabled (XENO_OPT_DEBUG_USER),
      any attempt to do so will trigger a SIGDEBUG signal to the offending
      thread, conveying the SIGDEBUG_RESCNT_SLEEP code.
      
      This change implicitly disables fast locking optimizations for
      user-space threads when XENO_OPT_DEBUG_USER is enabled. Since the
      debugging code present or future may already add some overhead, this
      seems acceptable anyway.
      e3153cf2
  12. 11 May, 2015 1 commit
    • Philippe Gerum's avatar
      lib: share the common setup and bootstrap code · 83b0f189
      Philippe Gerum authored
      Make pure POSIX applications and Copperplate-based ones share the same
      auto-init mechanism. This means that all applications now
      automatically recognize a set of base common options, which is
      currently:
      
      --cpu-affinity=<cpuset>, --[no-]sanity, --quiet[=level], --silent and
      --version.
      
      Applications which do not want Xenomai to interpose on the main()
      routine transparently for handling these options and bootstrapping the
      service libraries may disable this feature by passing the
      --no-auto-init switch to xeno-config when collecting the linker
      flags. In this configuration, the system must be bootstrapped manually
      by a call to xenomai_init() from the application code though.
      
      This change is C++ friendly, since it also enables the Xenomai high
      level services (e.g. VxWorks, pSOS) before the static constructors
      run, by default.
      83b0f189
  13. 26 Mar, 2015 1 commit
  14. 25 Oct, 2014 1 commit
  15. 08 Sep, 2014 1 commit
    • Philippe Gerum's avatar
      cobalt/kernel, lib/cobalt: introduce built-in drivers for user-mapped heaps · 79d53fb8
      Philippe Gerum authored
      We change the way application processes bind to the private and shared
      memory heaps used in fastsync support. Aside of an obscure and
      outdated implementation, using /dev/rtheap for this purpose led to a
      couple of nasty issues:
      
      - the requirement for abusing mmap()'s offset argument in the no-MMU
        case, so that different processes can map in distinct private heap
        areas.
      
      - as a consequence of the previous point, the exposure of kernel
        addresses to userland (passed as differenciating "area" tags in the
        mapping offset) creates an issue with mixed 32/64bit ABI models.
      
      To fix this, we introduce built-in, RTDM-based memory device drivers
      in the Cobalt kernel (aka "UMM" for user-mapped memory), which expose
      mmap() interfaces for binding to the proper private or shared
      heap. The drivers are called by lib/cobalt when initializing a new
      application process, to perform all the necessary mappings.
      
      In addition, a third built-in driver honors (read-only) requests to
      get status information about the system heap.
      79d53fb8
  16. 03 Sep, 2014 1 commit
  17. 21 Aug, 2014 1 commit
  18. 28 Jun, 2014 1 commit
  19. 22 Jun, 2014 1 commit
  20. 15 Jun, 2014 1 commit
  21. 12 Jun, 2014 1 commit
  22. 02 Jun, 2014 1 commit
  23. 20 Feb, 2014 1 commit
  24. 17 Jan, 2014 1 commit
  25. 05 Nov, 2013 1 commit
  26. 09 Sep, 2013 1 commit
    • Philippe Gerum's avatar
      lib/cobalt: switch pthread_create() caller back to primary mode · cea1f8a3
      Philippe Gerum authored
      In addition, cleanup a few wrapped calls to make them unambiguous,
      i.e.:
      
      __COBALT()/__RT() => route to lib/cobalt implementation
      __STD() => route to glibc implementation
      __WRAP() => route to real-time API implementation, defaulting to lib/cobalt
      
      The latter makes sense as an API may override the lib/cobalt
      implementation of a set of services.
      cea1f8a3
  27. 06 Jul, 2013 2 commits
  28. 03 Jul, 2013 1 commit
  29. 29 Jun, 2013 2 commits
    • Philippe Gerum's avatar
      cobalt/kernel: drop <asm/xenomai/atomic.h> · b251b887
      Philippe Gerum authored
      We define no arch-specific implementations for atomic operations
      anymore. We use the regular linux helpers in kernel code, and generic
      GCC atomic builtins in userland.
      
      <asm-generic/xenomai/atomic.h> becomes a userland only header.
      b251b887
    • Philippe Gerum's avatar
      cobalt: introduce uapi headers · d928926f
      Philippe Gerum authored
      Following the uapi introduction in recent kernels, this jumbo patch
      splits the former Xenomai POSIX headers into kernel and userland
      counterparts, privatizing the former into the kernel section when
      applicable.
      
      This change is aimed at centralizing the shared API types and
      definitions used in system calls, making it easier to track changes to
      the APIs that the kernel presents to user space, and solving inclusion
      dependency issues the right way.
      
      Headers defining the API bits shared between the Cobalt kernel and the
      support libraries in userland are available from include/cobalt/uapi,
      organized as follows:
      
      - uapi/*.h => Cobalt/POSIX interface bits
      - uapi/rtdm => RTDM bits
      - uapi/sys/*.h => Low-level Cobalt kernel bits
      
      As a consequence of this split, files below include/cobalt/kernel
      become kernel-only headers, and POSIX headers in include/cobalt are
      exclusively reserved for inclusion in user-space builds.
      
      As an added benefit, this change significantly reduces the number of
      headers to be installed for building Xenomai applications.
      d928926f
  30. 18 Jun, 2013 2 commits
    • Philippe Gerum's avatar
      lib/cobalt: fix naming for consistency · 12047c2d
      Philippe Gerum authored
      xeno_* identifiers, and all extern symbols become cobalt_*.
      
      In addition, hidden global variables are prefixed by a double
      underscore.
      
      This change causes the UAPI level to be increased, due to renaming
      xeno_sigwinch_handler() to cobalt_sigshadow_handler().
      12047c2d
    • Philippe Gerum's avatar
      kernel/cobalt: reorganize file hierachy · 629fa126
      Philippe Gerum authored
      The main changes introduced are as follows:
      
      - Xenomai/cobalt core (nucleus) moved at top level, with the arch-dep
      bits, POSIX and RTDM personalities in sub-directories.
      
      - Renamed include/cobalt/nucleus to include/cobalt/kernel.
      
      - include/asm-* directories moved to include/cobalt/.
      
      - Removal of asm-<arch>/bits, with most code reintroduced as regular
        implementation files into lib/cobalt/sysdeps/<arch>/.
      629fa126
  31. 12 Jun, 2013 2 commits
    • Philippe Gerum's avatar
      cobalt/nucleus: introduce SCHED_WEAK scheduling class · 3667859d
      Philippe Gerum authored
      This code enables support for binding threads from the Linux
      SCHED_FIFO/RR scheduling classes to the Xenomai domain as members of
      the SCHED_WEAK class, with up to 100 priority levels from [0..99]
      included.  When enabled, SCHED_WEAK is the low priority class of the
      Xenomai system, providing no real-time guarantee.
      
      Members from the SCHED_WEAK class are weakly scheduled by Xenomai,
      only for the purpose of synchronizing with real-time threads from
      other scheduling classes.  However, they cannot compete for CPU
      resources with real-time threads, and leave the primary domain upon
      return from Xenomai syscalls automatically (*).
      
      This feature is an extension of Xenomai's special handling of
      SCHED_OTHER threads, to the SCHED_FIFO/RR POSIX classes from a regular
      Linux kernel. If disabled, SCHED_WEAK is interpreted as an alias to
      SCHED_OTHER by the Xenomai scheduler, restricted to priority
      0. Conversely, SCHED_OTHER threads are eventually members of Xenomai's
      SCHED_WEAK class at priority 0, when this feature is enabled.
      
      In the wake of the SCHED_WEAK introduction, automatic propagation of
      updates to the Xenomai scheduling parameters to linux/libc via the
      SIGSHADOW_RENICE signal has been removed.
      
      (*) Like with SCHED_OTHER, Xenomai assumes no real-time requirement
      for SCHED_WEAK threads. Therefore, they are automatically moved back
      to secondary mode upon return from a Xenomai syscall, unless they hold
      a mutex, which would defer the transition until the mutex is released.
      3667859d
    • Philippe Gerum's avatar
      lib/cobalt: allow for overriding Cobalt service implementation · 1a190ca3
      Philippe Gerum authored
      We provide a mean for overriding Cobalt wrapper routines with
      user-provided routines.
      
      Each "foo" Cobalt routine shadowing a POSIX service may then appear
      as:
      
      __real_foo() => Original POSIX implementation.
      __cobalt_foo() => Cobalt implementation.
      __wrap_foo() => Weak alias to __cobalt_foo(). May be overriden
      by some extension library.
      
      Extension libraries overriding some of the shadowed POSIX routines
      shall provide:
      
      * Their own implementation of the POSIX service as __wrap_foo()
      * An entry for the "foo" symbol in some override definition file, to
      be installed in $(prefix)/lib, and named after the interface. This
      file must have the same format than lib/cobalt/cobalt.wrappers.
      
      E.g. a new interface "foo" overriding POSIX symbols should install a
      file named $(prefix)/lib/foo.wrappers. This file will be picked
      automatically by the xeno-config script when built for the Cobalt
      core.
      
      The Cobalt implementation of any overriden "foo" routine is still
      callable as __COBALT(foo(args...)). Any call reference to foo() will
      branch to the user-defined implementation overriding Cobalt's.
      
      e.g. Library "foo" wants to provide its own implementation of service
      sched_yield().
      
      lib/foo
      	/foo.wrappers
      		...
      		--wrap sched_yield
      		...
      
      	/pthread.c
      		int __wrap_sched_yield(void)
      		{
      			/* Eventually branch to Cobalt's version. */
      			return __COBALT(sched_yield());
      		}
      
      A Makefile rule should install lib/foo/foo.wrappers into $(prefix)/lib.
      
      $ cd buildir
      $ .../xenomai/configure --with-cobalt-override=.../lib/overlib/overlib.wrappers
      
      NOTE: for pratical reasons, xeno-config and wrap-link.sh scripts
      expect all POSIX wrapper files to match the "*.wrappers" glob pattern.
      1a190ca3
  32. 14 Dec, 2012 1 commit
    • Philippe Gerum's avatar
      cobalt: remove HAL interface · bb4f2d90
      Philippe Gerum authored
      Originally, the HAL interface was aimed at abstracting the real-time
      enabler on top of which the nucleus sits, when running over the linux
      kernel. Along the years, we only used the Adeos pipeline for this
      purpose, and 3.x is writing this dependency in stone for the Cobalt
      core.
      
      Therefore the HAL layer becomes pointless, and removing it simplifies
      a great deal of low level Xenomai code, making architecture ports even
      simpler.
      
      In the same move, we dismiss support for legacy pipelines. A pipeline
      from the recent "core" series, exposing API revision #2 or better is
      required to build and run Xenomai 3.x.
      
      NOTE: nios2 and sh4 are not ready for prime time, since we don't have
      a core pipeline implementation for them yet. We leave them in tree
      though, waiting for catch-up.
      bb4f2d90
  33. 21 Mar, 2012 1 commit