Skip to content
Permalink
Branch: master
Commits on Jul 19, 2019
  1. arch: POSIX: Fix race with unused threads

    aescolar committed Jul 17, 2019
    Fix a race which seems to have been presenting itself
    very sporadically on loaded systems.
    The race seems to have caused tests/kernel/sched/schedule_api
    to fail at random on native_posix.
    
    The case is a bit convoluted:
    When the kernel calls z_new_thread(), the POSIX arch saves
    the new thread entry call in that new Zephyr thread stack
    together with a bit of extra info for the POSIX arch.
    And spawns a new pthread (posix_thread_starter()) which
    will eventually (after the Zephyr kernel swapped to it),
    call that entry function.
    (Note that in principle a thread spawned by pthreads may
    be arbitrarily delayed)
    The POSIX arch does not try to synchronize to that new
    pthread (because why should it) until the first time the
    Zephyr kernel tries to swap to that thread.
    But, the kernel may never try to swap to it.
    And therefore that thread's posix_thread_starter() may never
    have got to run before the thread was aborted, and its
    Zephyr stack reused for something else by the Zephyr app.
    
    As posix_thread_starter() was relaying on looking into that
    thread stack, it may now be looking into another thread stack
    or anything else.
    
    So, this commit fixes it by having posix_thread_starter()
    get the input it always needs not from the Zephyr stack,
    but from its own pthread_create() parameter pointing to a
    structure kept by the POSIX arch.
    
    Note that if the thread was aborted before reaching that point
    posix_thread_starter() will NOT call the Zephyr thread entry
    function, but just cleanup.
    
    With this change all "asynchronous" parts of the POSIX arch
    should relay only on the POSIX arch own structures.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jul 15, 2019
  1. native_posix: Replace system timer driver

    aescolar committed Jul 12, 2019
    The native_posix timer driver was still using the
    legacy timer API.
    Replace it with a new version, which is aligned with
    the new kernel<->system timer driver API,
    and which has TICKLESS_CAPABLE support
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jul 13, 2019
  1. sanitycheck: Add missing section to whitelist

    aescolar authored and nashif committed Jul 12, 2019
    In a3bea88 (PR #16352)
    _bt_br_channels_area was added to the code but not the
    sanitycheck sections whitelist => Add it
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jul 12, 2019
  1. sanitycheck: update sections whitelist

    aescolar committed Jul 12, 2019
    In c20ff11
    and 5f19c81
    (PR #16897)
    _bt_settings_area was replaced with _settings_handlers_area
    
    Update sanitycheck sections whitelist accordingly
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. arch: POSIX: Do not assume 32bit pointers

    aescolar committed Jul 12, 2019
    Correct the storage type of the thread status pointer
    not assuming 32bit pointer and integer size
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jul 8, 2019
  1. nrf52_bsim: Add nrfx path to include path

    aescolar committed Jul 3, 2019
    To allow NRF drivers to include nrfx HAL or drivers headers
    like with the real HAL, include the top nrfx/ folder
    just as the real nrfx does.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jul 4, 2019
  1. CODEWONERS: syntax fix: Remove comma

    aescolar committed Jul 4, 2019
    A comma was added to a new path in
    9dbdd81
    
    But GitHub's CODEOWNERS parsing cannot handle commas in paths
    => Remove it
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jul 2, 2019
  1. sanitycheck: Minor optimization in BinaryHandler

    aescolar authored and nashif committed Jul 2, 2019
    Do not search for the valgrind binary (which) if valgrind
    was not selected to be used.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. sanitycheck: Record time used in BinaryHandler

    aescolar authored and nashif committed Jul 2, 2019
    So the time used to run boards which use the BinaryHandler can be
    reported, record the time used from spawning the process until
    it finnishes or is killed.
    The BinaryHandler is used by the "native" boards, unit tests,
    nsim and Renode.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jun 17, 2019
  1. CODEOWNERS: Clarify behaviour

    aescolar authored and nashif committed Jun 15, 2019
    Clarify the last matching rule, as it is not too intuitive
    (developers may have expected that all matching regexes would
    be added as code owners)
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jun 15, 2019
  1. CODEOWNERS: Add reviewer for native_posix docs and flash driver

    aescolar authored and nashif committed Jun 15, 2019
    Add aescolar as reviewer for the posix arch boards
    and flash driver
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Jun 7, 2019
  1. doc: Remove API labels

    aescolar committed Jun 6, 2019
    The API label does not exist anymore. Remove mentions of it
    from the documentation.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on May 27, 2019
  1. native_posix: Run in real time by default with host BT

    aescolar committed May 27, 2019
    For native_posix, set NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME
    by default when a host BT adapter is selected even if TEST
    was also set. As using host peripherals one normally needs
    also to run with the host time.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on May 8, 2019
  1. CODEOWNERS: remove use of commas

    aescolar committed May 8, 2019
    Commas are not allowed in this file and prevent parsing by github
    
    Error introduced in
    7c7db00
    
    Fixes #15998
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Apr 28, 2019
  1. nrf52_bsim: Add header to allow reusing native_posix drivers

    aescolar authored and nashif committed Feb 18, 2019
    This board and the native_posix board share the POSIX architecture.
    Some of the native_posix drivers/backends only rely on the
    underlaying operating system API, and do not require any special
    HW model to operate.
    Therefore it is quite easy to reuse some of them into this board.
    
    Currently the only limitation for some, is the interface they use
    in the board to register their command line arguments.
    This header provides a minimal shim to rename the, otherwise
    equivalent, call.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Apr 18, 2019
  1. native_posix: cmdline: Hint user about wrong options

    aescolar authored and nashif committed Mar 30, 2019
    Be a bit more friendly to users, by providing some hints
    about possible reasons why a command line option was not
    understood.
    Also describe in the help message that which options are
    avaliable depends on what has been selected in this build.
    
    Fixes: #15046
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Apr 17, 2019
  1. doc: labels: Add links to feature process

    aescolar authored and nashif committed Apr 12, 2019
    Added a few links in the labels description section
    to the feature process section.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Apr 10, 2019
  1. doc: Reorganize development model section

    aescolar authored and nashif committed Apr 10, 2019
    Renamed the page "review_process.rst" to "dev_env_and_tools.rst"
    as the old name did not cover all its content.
    Moved the labels page content into this
    "Developemnt Environment and Tools" page.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. doc: dev_process: Add description about GH labels usage

    aescolar authored and nashif committed Mar 30, 2019
    There has been some confusion about how GitHub labels
    should be used.
    This commit adds a new doc page, which tries to clarify this.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  3. doc: Add to 1.14 release notes native_posix and nrf52_bsim changes

    aescolar authored and nashif committed Apr 10, 2019
    Added information to the release notes about the new drivers
    in native_posix, the new nrf52_bsim board and the BabbleSim
    integration in CI and testcases.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Mar 31, 2019
  1. doc: API lifecycle: Require creating a issue to track removal

    aescolar authored and nashif committed Mar 31, 2019
    As discussed in the TSC meeting of 2019/03/27:
    To ensure that we do not forget to remove an API 2 releases later
    and to provide a bit better visibility about when the removal
    is planned, require that a GH issue be created, and that this
    issue be added to the roadmap for the apropriate release.
    
    As a free bonus:
    Removed a redundant line in the list and added one missing article.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Mar 26, 2019
  1. arch: POSIX: Add Kconfig option to stop on all faults

    aescolar authored and galak committed Feb 15, 2019
    Added an option to stop the execution of the posix arch based
    executable on the first fault, even if the fault stemmed from a
    non essential thread.
    Having it fail faster, in the first fault, will ease debugging
    in many cases.
    The option is disabled by default to preserve the old behavior.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Mar 25, 2019
  1. doc: Bluetooth: Correct how to run native_posix

    aescolar authored and carlescufi committed Mar 24, 2019
    1. The build paragraph was listed with the run option.
       But, we need to pass an argument to the native_posix board,
       so "ninja run" alone is not good enough.
       Plus, it was not coherent with the rest of the text, as
       the paragraph intended to tell people how to build.
    2. Added "sudo" to the run line, as the user needs extra
       permissions to connect to a host BT controller.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Mar 18, 2019
  1. doc: application: Correct note about external modules

    aescolar authored and galak committed Mar 16, 2019
    A note in the Modules (External projects) section indicated
    that in the future it would be possible to do something that
    can be already done.
    So, let's clarify the note with how it can be done.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. doc: Bluetooth: Expand BabbleSim section

    aescolar authored and nashif committed Mar 13, 2019
    Added some more content to the section about how to simulate
    with BabbleSim and a couple of extra links.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Mar 13, 2019
  1. uart: native_posix: Fix out of bounds access

    aescolar authored and galak committed Mar 13, 2019
    Fix an out of bound access in the native_posix uart driver,
    when generating the string to autoattach a terminal to the UART.
    (The space for the null termination was missing)
    
    Fixes: #14401
    Coverity issue CID: 195855
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. uart: native_posix: Check fcntl() return value

    aescolar authored and galak committed Mar 13, 2019
    fcntl() may (very unlikely) fail when setting the new pseudoterminal
    to non-blocking.
    Let's check for this condition, handle it, and in the process
    silence a coverity issue.
    
    Fixes #14396
    Coverity CID: 195872
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Feb 20, 2019
  1. doc: Add more coverage documentation

    aescolar authored and nashif committed Feb 20, 2019
    Add more documentation about how to generate coverage reports
    for POSIX arch based boards
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Feb 14, 2019
  1. tracing: POSIX arch: Trace switch to main thread

    aescolar authored and nashif committed Feb 14, 2019
    Add tracing of the switch to the main thread
    
    Relatest to #13357
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. tracing: POSIX arch: Remove redundant trace call

    aescolar authored and nashif committed Feb 14, 2019
    The thread switching tracing calls are done by the kernel,
    and not by the archs. So, remove the redundant trace call.
    
    Related to #13357
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  3. tracing: Add missing isr_exit() for posix arch boards

    aescolar authored and nashif committed Feb 14, 2019
    For the native_posix board, and for the nrf52_bsim boards,
    the sys_trace_irs_exit() call was missing. Add it.
    
    Relates to #13357
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Feb 11, 2019
  1. test: Kconfig: Correct HAS_COVERAGE_SUPPORT description

    aescolar authored and galak committed Feb 11, 2019
    HAS_COVERAGE_SUPPORT can be set both on boards with enough RAM to
    store the coverage results, or for POSIX ARCH based ones
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Feb 8, 2019
  1. doc: native_posix: Add section about subsystems' backends

    aescolar authored and nashif committed Feb 6, 2019
    Add section to describe a bit the currently available subsystems
    backends for native_posix
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Commits on Feb 6, 2019
  1. arch: posix: posix_cheats: Add some comments

    aescolar authored and nashif committed Feb 5, 2019
    Add a few comments in posix_cheats.h explaining why the file
    exists and how it is used.
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  2. arch: posix: posix_cheats: Do not rename types

    aescolar authored and nashif committed Feb 5, 2019
    There is no need to rename the POSIX types, so let's not do it to
    simplify things
    Also remove an unnecessary guard (POSIX_ARCH) to avoid mystifying
    this any more than necessary
    
    Related to #13054
    
    Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Older
You can’t perform that action at this time.