Go to file
Andy Ross eefd3daa81 kernel/smp: arch/x86_64: Address race with CPU migration
Use of the _current_cpu pointer cannot be done safely in a preemptible
context.  If a thread is preempted and migrates to another CPU, the
old CPU record will be wrong.

Add a validation assert to the expression that catches incorrect
usages, and fix up the spots where it was wrong (most important being
a few uses of _current outside of locks, and the arch_is_in_isr()
implementation).

Note that the resulting _current expression now requires locking and
is going to be somewhat slower.  Longer term it's going to be better
to augment the arch API to allow SMP architectures to implement a
faster "get current thread pointer" action than this default.

Note also that this change means that "_current" is no longer
expressible as an lvalue (long ago, it was just a static variable), so
the places where it gets assigned now assign to _current_cpu->current
instead.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-02-08 08:51:04 -05:00
.github ci: github: doc: Add a GH workflow to test build the docs 2020-02-07 18:10:15 -06:00
.known-issues doc: add .known-issue regex for struct bt_mesh_model_pub warnings 2019-12-12 12:39:35 -06:00
arch kernel/smp: arch/x86_64: Address race with CPU migration 2020-02-08 08:51:04 -05:00
boards boards: qemu_cortex_r5: Reduce memory footprint when running 2020-02-08 08:31:48 -05:00
cmake cmake: pass extra dtc flags to python scripts 2020-02-05 13:04:44 -06:00
doc doc: fixed path for ctf metadata 2020-02-07 15:58:05 -05:00
drivers kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
dts dts: arm: stm32f4: Add CRYP support for STM32F4xx SoC series 2020-02-07 10:45:51 -06:00
ext global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
include kernel/smp: arch/x86_64: Address race with CPU migration 2020-02-08 08:51:04 -05:00
kernel kernel/smp: arch/x86_64: Address race with CPU migration 2020-02-08 08:51:04 -05:00
lib kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
misc
modules kconfig: modules: Avoid including Kconfig.tls-generic twice 2020-02-07 17:47:00 +01:00
samples samples: crypto: Add AES-GCM sample 2020-02-08 13:40:33 +02:00
scripts sanitycheck: make pyserial optional 2020-02-07 19:48:24 -06:00
soc kconfig: Remove assignments to CONFIG_<arch> syms and hide them 2020-02-08 00:50:08 -06:00
subsys kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
tests tests: lib: os: onoff: address Coverity complaint 2020-02-08 08:40:28 -05:00
.checkpatch.conf checkpatch: suppress mailback option in conf file 2020-02-06 08:31:53 -05:00
.clang-format
.codecov.yml
.editorconfig editorconfig: Set insert_final_newline true 2019-04-10 14:15:38 +02:00
.gitattributes
.gitignore docs: guide: Add build system information 2019-11-15 14:58:51 -05:00
.gitlint gitlint: match max title length restriction with checkpatch 2019-05-29 14:43:16 -04:00
.mailmap mailmap: add entry for Sean Nyekjaer 2019-11-04 14:33:31 +01:00
.shippable.yml ci: bump docker image to 0.11.3 for west 0.7.0 2020-02-07 07:25:41 -06:00
.uncrustify.cfg
CMakeLists.txt kconfig/cmake: Check that one of the CONFIG_<arch> symbols is set 2020-02-08 00:50:08 -06:00
CODE_OF_CONDUCT.md
CODEOWNERS CODEOWNERS: adapt for debug and tracing 2020-02-07 15:58:05 -05:00
CONTRIBUTING.rst
Kconfig kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.zephyr kconfig: Make BUILD_NO_GAP_FILL independent 2020-02-08 09:59:20 +02:00
LICENSE
Makefile
README.rst global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
VERSION release: post release patch level = 99 2019-12-09 21:53:34 -05:00
version.h.in cmake: explain BUILD_VERSION and KERNEL_VERSION_* 2019-05-09 11:52:05 +02:00
west.yml manifest: mcuboot version with fixed USB recovery 2020-02-08 10:01:47 +02:00
zephyr-env.cmd
zephyr-env.sh zephyr_env.sh: Remove semicolons at ends of lines 2019-12-10 14:34:46 -08:00

.. raw:: html

   <a href="https://www.zephyrproject.org">
     <p align="center">
       <img src="doc/images/Zephyr-Project.png">
     </p>
   </a>

   <a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
   src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
   <img
   src="https://api.shippable.com/projects/58ffb2b8baa5e307002e1d79/badge?branch=master">


The Zephyr Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.

The Zephyr kernel supports multiple architectures, including ARM Cortex-M,
Intel x86, ARC, Nios II, Tensilica Xtensa, and RISC-V, and a large number of
`supported boards`_.

.. below included in doc/introduction/introduction.rst

.. start_include_here

Getting Started
***************

Welcome to Zephyr! See the `Introduction to Zephyr`_ for a high-level overview,
and the documentation's `Getting Started Guide`_ to start developing.

Community Support
*****************

Community support is provided via mailing lists and Slack; see the Resources
below for details.

.. _project-resources:

Resources
*********

Here's a quick summary of resources to help you find your way around:

* **Help**: `Asking for Help Tips`_
* **Documentation**: http://docs.zephyrproject.org (`Getting Started Guide`_)
* **Source Code**: https://github.com/zephyrproject-rtos/zephyr is the main
  repository; https://elixir.bootlin.com/zephyr/latest/source contains a
  searchable index
* **Releases**: https://zephyrproject.org/developers/#downloads
* **Samples and example code**: see `Sample and Demo Code Examples`_
* **Mailing Lists**: users@lists.zephyrproject.org and
  devel@lists.zephyrproject.org are the main user and developer mailing lists,
  respectively. You can join the developer's list and search its archives at
  `Zephyr Development mailing list`_. The other `Zephyr mailing list
  subgroups`_ have their own archives and sign-up pages.
* **Nightly CI Build Status**: https://lists.zephyrproject.org/g/builds
  The builds@lists.zephyrproject.org mailing list archives the CI
  (shippable) nightly build results.
* **Chat**: Zephyr's Slack workspace is https://zephyrproject.slack.com.  Use
  this `Slack Invite`_ to register.
* **Contributing**: see the `Contribution Guide`_
* **Wiki**: `Zephyr GitHub wiki`_
* **Issues**: https://github.com/zephyrproject-rtos/zephyr/issues
* **Security Issues**: Email vulnerabilities@zephyrproject.org to report
  security issues; also see our `Security`_ documentation. Security issues are
  tracked separately at https://zephyrprojectsec.atlassian.net.
* **Zephyr Project Website**: https://zephyrproject.org

.. _Slack Invite: https://tinyurl.com/y5glwylp
.. _supported boards: http://docs.zephyrproject.org/latest/boards/index.html
.. _Zephyr Documentation: http://docs.zephyrproject.org
.. _Introduction to Zephyr: http://docs.zephyrproject.org/latest/introduction/index.html
.. _Getting Started Guide: http://docs.zephyrproject.org/latest/getting_started/index.html
.. _Contribution Guide: http://docs.zephyrproject.org/latest/contribute/index.html
.. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _Zephyr Development mailing list: https://lists.zephyrproject.org/g/devel
.. _Zephyr mailing list subgroups: https://lists.zephyrproject.org/g/main/subgroups
.. _Sample and Demo Code Examples: http://docs.zephyrproject.org/latest/samples/index.html
.. _Security: http://docs.zephyrproject.org/latest/security/index.html
.. _Asking for Help Tips: https://docs.zephyrproject.org/latest/guides/getting-help.html