Commit graph

225 commits

Author SHA1 Message Date
Inaky Perez-Gonzalez
2abd863149 doc: remove reference to task IRQs, deprecated
Per:

commit a83f895
Author: Andrew Boie <andrew.p.boie@intel.com>
Commit: Benjamin Walsh <benjamin.walsh@windriver.com>

    microkernel: deprecate task IRQs

    This mechanism does not add enough value to the kernel to be worth
    maintaining it. Drivers that need deferred processing of interrupts
    can simply define their own task and have the interrupt handler
    release an event that the task waits on.

    The API is marked as deprecated and it is removed from unit test
    coverage as well as the documentation.

    Change-Id: Ib87b91cb41e9b6d7fdf0dc62b240a531b6a8889f
    Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>

Change-Id: I0d891772b1fb4246ec9ee9f4764b2121333ae972
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-15 01:44:54 +00:00
Inaky Perez-Gonzalez
0eb6a42a55 doc: fix broken link to nanokernel fibers
Original link "fiber services" does not exist, so renamed to the one
at the head of "nanokernel_fibers.rst".

Change-Id: I39c89e5dbe9b8d0462eb2aa8d84db65b22625fdc
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-15 01:44:53 +00:00
Inaky Perez-Gonzalez
585a6af62a doc: fix warnings (invalid C++ reference)
Must use :c:type instead of :cpp:type.

Change-Id: I600c7a018e1b1492e967b05f44fec14afd87eccc
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-15 01:44:53 +00:00
Inaky Perez-Gonzalez
9795410a62 doc: fix warnings due to :c:option: and :option:
:c:option:`xyz` is non usable without a . c:option:: declaration, so moved
to *xyz`; likewise :option:`xyz` where no .. option:: xyz is declared.

Change-Id: I011ccf2aac244125dbe2d09d197e443bd4c12fe2
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-15 01:44:52 +00:00
Inaky Perez-Gonzalez
2e99832616 doc: fix :option: x-refs to squash doc generation warnings
Move to use :option:`CONFIG_XYZ` vs :option:`XYZ` to generate propert
links and avoid warnings about unexistant targets.

Change-Id: I4b46041f25e538462b123ccc8337f733033cc0e7
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 20:00:52 +00:00
Inaky Perez-Gonzalez
88322e4382 doc: remove unused CONFIG_ options, fix x-ref to existing ones
Config options KERNEL_EVENT_{INTERRUPT, CONTEXT, SLEEP} don't exist
any more, removed.

Move to use :option:`CONFIG_XYZ` vs :option:`XYZ` to generate propert
links and avoid warnings about unexistant targets.

Change-Id: Ibafa155f474a05329a8cac7bff5c55800d9f31a4
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 20:00:52 +00:00
Inaky Perez-Gonzalez
bf94c8f3b3 doc: remove warning on failed code highlighting
Four code snippets fail to be properly recognized by the code
highlighter; the makefile snippets seem to be because of the $
character (and I have found a way to escape it out). The C code, I
haven't been able to find out why.

Killed the warning by setting the code-block style to 'none' on all of
them. It is not the best sollution, but it beats a polluted build
process.

Change-Id: I8fa7d327354a93bacad40e25596c9dbaf9ea1e92
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 20:00:50 +00:00
Inaky Perez-Gonzalez
bde2899f99 doc: fix "header inconsistency" in interrupts doc.
Change-Id: I1da7125c486005536fe1bda4d1403e28e62e8da9
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 20:00:45 +00:00
Inaky Perez-Gonzalez
b9ac9fadde doc: fix 'unexpected indentation' warnings
Add a blank line in most places is the fix needed, to have the
formatting engine recognize it properly.

Change-Id: Iccaa0e51146b1e2c138e89ab1dd0067fc1409e4d
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 20:00:45 +00:00
Andrew Boie
39f9be2615 doc: nanokernel_interrupts: fix dangling link
The "IDT Security" section was removed since the IDT is now always
in a read-only region; dynamic IRQs have been deprecated and will
be removed from the kernel.

Change-Id: Idbb7ff987bbb4f777b524d87690485d34f372d43
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-14 19:28:03 +00:00
Jithu Joseph
a409b3db7a doc : Corrections to memory_map doc page
Few lines in the doc were out of sync with the code base.

Jira: ZEP-312
Change-Id: Ic0d3508f0f903e43000e17b4a32c1280ae0978dc
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-05-26 10:58:11 +00:00
Fabrice Olivero
128dcbbe13 kernel event logger: add possibility to use custom timestamp
By default, kernel event logger is using the system timer. But on
some platforms where the timer driver maintains the system timer
cycle accumulator in software, such as ones using the LOAPIC timer,
the system timer behavior leads to timestamp errors. For example,
the timer interrupt is logged with a wrong timestamp since the HW
timer value has been reset (periodic mode) but accumulated value not
updated yet (done later in the ISR).

This patch is adding the possibility to register a timer callback
function that will be used by the kernel event logger. For example,
on Quark SE, this allows using RTC or AON counter which accuracy is
sufficient and behavior more straight forward compared to system
timer.

Change-Id: I754c7557350ef29fc10701e62a35a5425e035f11
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-23 21:27:49 +00:00
Fabrice Olivero
f39b9b85a1 kernel event profiler: add dynamic enable/disable/configure
Added CONFIG_KERNEL_EVENT_PROFILER_DYNAMIC flag for enabling that
capability. When set, nothing will be logged by default

Change-Id: I03552483e5a6bfd9e2505eda56908f0d0ae98618
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-12 02:19:19 +00:00
Fabrice Olivero
68e7fca45c Set kernel event logger timestamps to HW cycles
OS tick period (usually 10 ms) is not sufficiently precise for task
execution analysis (like processing CPU load per context)

With that modification, the timestamp used by the kernel event logger
is 32-bit LSB of platform HW timer (for example Lakemont APIC timer
for Quark SE).
This timer period is very small and leads to timestamp wraparound
happening quite often (e.g. every 134s for Quark SE).

This wraparound must be considered when analyzing kernel event logger
data and care must be taken when tickless idle is enabled and sleep
duration can exceed maximum HW timer value.

Change-Id: Idc545da8f828a7357a69d83ff25c9afd09dab3c4
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-12 01:51:09 +00:00
Andrew Boie
15800ce78a nanokernel: deprecate dynamic IRQs
We have not found any use-cases for dynamic IRQs where a static
IRQ did not also suffice. Deprecate so that we can eventually
remove from Zephyr and nontrivially decrease the complexity of
the kernel.

Change-Id: I509655371773aeaca7d01134dd850eb4cd95f387
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-15 16:02:12 +00:00
Andrew Boie
a83f895dd5 microkernel: deprecate task IRQs
This mechanism does not add enough value to the kernel to be worth
maintaining it. Drivers that need deferred processing of interrupts
can simply define their own task and have the interrupt handler
release an event that the task waits on.

The API is marked as deprecated and it is removed from unit test
coverage as well as the documentation.

Change-Id: Ib87b91cb41e9b6d7fdf0dc62b240a531b6a8889f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-15 16:02:12 +00:00
Gerardo Aceves
46e5fc6330 doc: Edit microkernel API links
Edited the microkernel API sections to get the proper linakage.

Change-Id: I1bc95c6e21ed996c4c5d72188c5f018038e3e958
Signed-off-by: Gerardo Aceves <gerardo.aceves@intel.com>
2016-04-13 15:04:04 +00:00
Anas Nashif
530a422a98 doc: create subsystem section
Add sensors and networking into the new section and seperate
those from the kernel documentation.

Change-Id: I585845c3ba09173ced7caa0b7fbc1f1a81a26f96
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-12 22:52:43 +00:00
Anas Nashif
73fcb9f503 doc: move device driver to a new section
Put all device drivers and device model documentation into one
section.

Change-Id: Iba6a50796b02b7f9234c23dca706be62fd7b4259
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-12 22:52:42 +00:00
Vlad Dogaru
146b76d839 doc: Add sensor section to kernel primer
Create a new top-level section in the primer that includes sensor
drivers and the synchronous call API.

Change-Id: I0c1b734ec56abc20724ff682caba618ab0965230
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-04-08 20:10:45 +00:00
Dmitriy Korovkin
9b2452047d kernel: Combine nano_timers and nano_timeouts
To avoid code duplication nano_timers use nano_timeout
mechanism.

Change-Id: I916bffd2b86e29ee7b7ff7bbb009cd4c844e2a44
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 09:20:10 +00:00
L.S. Cook
5e46cfd2d0 doc: Edit microkerenel_mailboxes for ReST syntax, content
flow, readability

Add some :dfn: syntax, spelling fixes, and minor edits

Change-Id: Ia37406ccccde677150dbff5da95d53c3917b1efb
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-19 11:05:25 +00:00
L.S. Cook
fb4b8d2933 doc: Edit nanokernel_synchronization section
Fix for imperative API descriptions, note needs work (see comment).

Change-Id: I300ff03ee5c6b6cb50cf2b1614f22940a0b10213
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-19 10:40:53 +00:00
L.S. Cook
a1b9254697 doc: Edit nanokernel_timers for proper ReST syntax, grammar, etc.
Minor edits to clarify wording, readability of rendered documentation

Change-Id: I4144cfb8e191234d5fb3b6aa0fc3324b85cd286a
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-19 10:40:13 +00:00
L.S. Cook
1be71d97ed doc: Edit nanokernel_fibers for doc structure with rst, grammar
To enhance readability, add bold, lists in sentence form (as per
the style guide) and other parallel content from microkernels section.

Change-Id: Ida989ec7187bf7a035803644b5cc710571b66e3e
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-19 10:40:13 +00:00
L.S. Cook
0b04465a8c doc: Edit microkernel_task_irqs.rst for consistency in styling.
Added some rst styling, minor punctuation fixes, and doc flow edits.

Change-Id: I1f4bd5dd1ac788b12fc498d1ad3297260f05e7fa
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-19 00:21:46 +00:00
L.S. Cook
e017d92dfe doc: Edit microkernel_pipes for ReST syntax, readability, grammar
Add :dfn: and other .rst kinds of syntax and parallel format to
other documents in the microkernel sections. Corrected a few
typos.

Change-Id: I8e0d36a2f9091f551674fdf0518bb66453ada49b
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-19 00:19:44 +00:00
L.S. Cook
c6be6f271c doc: Edit nanokernel_tasks for consistency and ReST :dfn: syntax
Corrected an "is is" and other minor punctuation + grammatical edits.

Change-Id: I26f51809215a8ac77a20bc9d424e6a806e29ee50
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-18 22:29:58 +00:00
L.S. Cook
9b1bd225ec doc: Edit microkernel_fifos for consistent .rst style and formatting.
Making all the files in this section consistent with :dfn: in the intro
paragraph, API headings, present-tense verbs in APIs, parallel wording.

Change-Id: I5259c443076b1ac6602352dab42d35d5aca6e5b5
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-08 00:44:26 +00:00
L.S. Cook
fd2c760593 doc: Edit microkernel_mutexes.rst; add ReST syntax, clarifications.
Making all the files in this section consistent with :dfn: in
the intro paragraph, API headings, present-tense verbs in APIs.
Clarified paragraphs on priorty-bazed waiting and priority
inheritance.

Change-Id: I26cc49926bc49c9c68300b6249aeb52c1be33625
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-08 00:42:12 +00:00
L.S. Cook
023e1281e6 doc: Edit microkernel_timers.rst with better ReST syntax to enhance readability.
Added ReST syntax dfns, added bold and lists.  Reworded a couple sentences
that could be stated more clearly.

Change-Id: I997b54e1dcbc44d683919008770dd90857a96e47
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-04 15:09:37 +00:00
L.S. Cook
80edd833dc doc: Edit microkernel_events for clarity, ReST syntax, and parallelism.
Updated the Concepts subsection with a clearer topic outline, added bold
and dfn; added heading to Example: Defining Private Event... ; fixed some muddy
language in paragraph about event handler functions.

Change-Id: I040ae8ee2be7fd4742f782e5f505a9cdcece7b62
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-03 09:50:46 +00:00
L.S. Cook
32fd061e66 doc: Add clarification to common execution contexts docs
A couple paragraphs contain ambiguous verbs that are unclear.
(For example: Line 23. Does the kernel perform a busy-wait,
or does it merely permit a task or fiber to perform a busy-wait?)
Based on original, I guess the latter and attempted to correct this
in the docs.

Also fixed spelling error.

Change-Id: I0699835a9681c1a4873575fbf9a69bc6d854bee4
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-03 09:50:34 +00:00
L.S. Cook
6a1d23f4f9 doc: Edit microkernel_semaphores.rst for consist structure and APIs.
To have consistency throughout the docs, APIs should all be in
imperative verb. Updating this, and adding other consistent structure
to match the rest of microkernel section docs.

Change-Id: Ic2285496895ae9edfcc523f8fc2f99bcb935227f
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-03 09:49:24 +00:00
Jennifer Marandola
dcadd30f45 doc: Doc updates for C++ feature with updates from code review.
Updated note text based on code review.

Change-Id: I0f32c5821b37062d23ddbf2252ae8b3d4c8739b5
Signed-off-by: Jennifer Marandola <jennifer.marandola@windriver.com>
2016-02-27 10:03:00 +00:00
L.S. Cook
da415702d2 doc: Minor edits needed on microkernel_fibers.rst
General grammar edits: removed an "is is", added clarification, and
removed Latin abbreviation as per style guide reqs.

Change-Id: Ie9365dea2cdf27c107675487d4bf392711f4acb2
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-26 21:18:08 +00:00
L.S. Cook
96a2d2e199 doc: Edit microkernel_memory_pools.rst for consistency in structure.
Much of this doc is comparable to memory_maps, so edits make the overall
language and structure consistent among files. Added heading syntax to
APIs, make imperative verbs on API notes, as discussed in code reviews and
on previous edits.

Change-Id: I8e14b44007acdf5422d75810dde78aef1a9c653a
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-26 21:15:08 +00:00
L.S. Cook
d873c5a91d doc: ReST syntax added to memory_maps.rst to enhance readability
Minor language corrections, example heading, bullet and bold added
to be consistent with the other microkernel reference docs.

Change-Id: I371cffcb60d09308c1b26701830dbbc0ddeb745d
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-26 21:15:08 +00:00
L.S. Cook
13d064c58c doc: Edited synchronous_call.rst for typos, ReST syntax
API notes needed a bit of clarification, fixed typo of file name.

Change-Id: I57438165fb2fc3da796fcde19d58a46862ffbbd9
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-25 21:32:06 +00:00
L.S. Cook
bebd38c8d1 doc: Edit common_kernel_clocks.rst
Corrected typos and added headings to API section to
enhance readability.

Change-Id: I5a43edfdd6a8ac7735d8f00823058f6a2661439f
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-24 17:08:26 +00:00
L.S. Cook
cd26742b17 doc: Edit microkernel_tasks.rst for grammar and clarity
Corrected a few typos and misspellings. Corrected grammar to add clarity to the
section on task groups.  Added cleaner headings to APIs to enhance readability.

Change-Id: I6ff4d447775db67dc7008aa30bd2bbb4ab6c32de
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-24 17:02:19 +00:00
Dan Kalowsky
8d0129656c doc : getting_started : correct path
The path to the sample applications is a mis-match of previous and the
current values.  Correcting it to represent the new value.

Change-Id: I54ffe823335b95f1076b1346d149b359b4f2e7bd
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-23 23:10:57 +00:00
Rodrigo Caballero
8b10e6d382 doc: Update and include nanokernel_example.rst
This file was updated and included in the nanokernel
primer information. It showcases the simple use of
nanokernel semaphores, timers and fibers.

Change-Id: Iaaa961eccf4f0df5d4c009d053b9d28e96c8d87d
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-19 11:18:49 -06:00
Anas Nashif
3320df7949 docs: fixed API linking
Change-Id: If9daa0e11c967ee19684dd9d08438f749abf9d5e
2016-02-16 06:16:48 +00:00
Anas Nashif
1ab2d24c1a docs: Update information about tree structure
add boards, tests sub-directories to the tree.

Change-Id: I353fd4a4b2b23f7d3a7ca22d42b555ffb1b14ce5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-14 18:40:35 -05:00
Anas Nashif
47db990d44 doc: fix path to samples after restructering
Change-Id: I0366acd913188ddcdf626b95ff05b8c9c305b777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Juan Manuel Cruz
ee2b119877 doc: adds the task monitor documentation
Change-Id: I659bc206a636ffc723f3ac72b5b90f9a6ebcc565
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-09 13:03:19 -05:00
Gerardo Aceves
7c9e4990a2 doc: Fixed consistency issues
Fixed file's reference label.
Fixed cross-reference labels.

Change-Id: Id397aa9a142c692f4e2e552c9bebff626e4692a0
Signed-off-by: Gerardo Aceves <gerardo.aceves@intel.com>
2016-02-08 16:16:59 -05:00
Andrew Boie
897ffaeb2c irq: rename irq_connect() to IRQ_CONNECT()
It's not a function and requires all its arguments to be build-time
constants. Make this more obvious to the end user to ease confusion.

Change-Id: I64107cf4d9db9f0e853026ce78e477060570fe6f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
2c1a95aee6 device: rename SYS_GET_DEVICE_NAME/SYS_GET_DEVICE
Rename them to DEVICE_NAME_GET and DEVICE_GET to fit in the 'device'
namespace.

Change-Id: I407a7f284ed4d1c071961b46615eea859c2e825f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
99a4f13bbc device: rename synchronous_call_ APIs
Rename them to device_sync_ to fit in the device_ namespace.

Change-Id: I1088dda958584ed90b97137298050fee44c20ee4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:24 -05:00
Andrew Boie
2a1ae3f436 ARM: ARC: put sw_isr_table in ROM by default
We can save a great deal of RAM this way, it only needs to be
in RAM if dynamic interrupts are in use.

At some point this config option broke, probably when static
interrupts were introduced into the system.

To induce build (instead of runtime) errors when irq_connect_dynamic()
is used without putting the table in RAM, the dynamic interrupt
functions are now conditionally compiled.

Change-Id: I4860508746fd375d189390163876c59b6c544c9a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:21 -05:00
Andrew Boie
009a19f164 x86: remove option to force IDT in RAM
This option misunderstands how XIP works. The IDT is ALWAYS in ROM,
the question is whether crt0 will copy it into RAM or not. You can't
save ROM space in this way.

Change-Id: I58025e3d71ead35730d0a5026213299b4fcb5eb9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:21 -05:00
Andrew Boie
583126adf9 microkernel: remove task_irq_free() API
This is being removed for a few reasons:

- AFAICT this is the only API in Zephyr that follows an allocate/free
model.

- There are no public APIs in the interrupt subsystem for releasing
or reconfiguring an interrupt. This code was relying on arch-specific
private APIs. If we really want to keep this capability we should
make these APIs public and consistent across arches.

- The use-case for this API is not clear, as Zephyr is not intended
for hot-pluggable peripherals. Built-in hardware tends to need its
interrupt for its entire life cycle.

- The current implementation of dynamic interrupts on x86 does not
support freeing a dynamic IRQ that was reserved with
irq_connect_dynamic(), causing this code not to work. To add this
would require reimplementing _get_dynamic_stub() to use a bitfield
or set of bitfields to track unused stubs rather than the simple
counter it uses now.

Change-Id: I7a03c134fb3498b91a1816318a88b293e26b846c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:21 -05:00
Andrew Boie
d9cfbd5a61 interrupts: new static IRQ API
The interrupt API has been redesigned:

- irq_connect() for dynamic interrupts renamed to irq_connect_dynamic().
  It will be used in situations where the new static irq_connect()
  won't work, i.e. the value of arguments can't be computed at build time
- a new API for static interrupts replaces irq_connect(). it is used
  exactly the same way as its dynamic counterpart. The old static irq
  macros will be removed
- Separate stub assembly files are no longer needed as the stubs are now
  generated inline with irq_connect()

ReST documentation updated for the changed API. Some detail about the
IDT in ROM added, and an oblique reference to the internal-only
_irq_handler_set() API removed; we don't talk about internal APIs in
the official documentation.

Change-Id: I280519993da0e0fe671eb537a876f67de33d3cd4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:17 -05:00
Peter Mitsis
d63a4f7bf7 nano_timers: Simplify nano_xxx_timer_test() API family
Simplifies the nanokernel timer API so that the timeout parameter must be
specified when invoking nano_isr_timer_test(), nano_fiber_timer_test(),
nano_task_timer_test() and nano_timer_test().

This obsoletes the following APIs:
	nano_fiber_timer_wait()
	nano_task_timer_wait()
	nano_timer_wait()

Note that even the though the new API requires that the timeout parameter
be specified, there are currentl only two acceptable values:
	TICKS_NONE and TICKS_UNLIMITED

Theoretically, the current implementation would allow one to supply a
finite positive value for the timeout and the system would wait up to
that many ticks for the timer to expire. However, it is thought that
that unnecessarily complicates the nanokernel timer model and so it is
left as an unsupported option.  Should that change, then that feature
could be enabled by updating the documentation.

Change-Id: I8835c5342ab5025d6f70fdfbed54a50add7568d7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:15 -05:00
Peter Mitsis
5c01c09f4d nano_stack: Simplify nano_xxx_stack_pop() API family
Changes the nanokernel stack API so that the timeout parameter must be
specified when invoking nano_isr_stack_pop(), nano_fiber_stack_pop(),
nano_task_stack_pop() and nano_stack_pop().

This obsoletes the following APIs:
	nano_fiber_stack_pop_wait()
	nano_task_stack_pop_wait()
	nano_stack_pop_wait()

Note that even though the new API requires that the timeout parameter
be specified, there are currently only two acceptable values:
	TICKS_NONE and TICKS_UNLIMITED
This nanokernel option does not support CONFIG_NANO_TIMEOUTS.

Change-Id: Ic7f16ee30c3534115ceffa19ef8591ecc5a79080
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
f0b55aa624 nano_lifo: Simplify nano_xxx_lifo_get() API family
Changes the nanokernel LIFO API so that the timeout parameter must be
specified when invoking nano_isr_lifo_get(), nano_fiber_lifo_get(),
nano_task_lifo_get() and nano_lifo_get().

This obsoletes the following APIs:
	nano_fiber_lifo_get_wait()
	nano_fiber_lifo_get_wait_timeout()
	nano_task_lifo_get_wait()
	nano_task_lifo_get_wait_timeout()
	nano_lifo_get_wait()
	nano_lifo_get_wait_timeout()

Change-Id: Ie9f93e46da42ea33c32544c02ab1d70b893cc198
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
54b782a88b nano_sema: Simplify nano_xxx_sem_take() API family
Changes the nanokernel semaphore API so that the timeout parameter must be
specified when invoking nano_isr_sem_take(), nano_fiber_sem_take(),
nano_task_sem_take() and nano_sem_take().

This obsoletes the following APIs:
	nano_fiber_sem_take_wait()
	nano_fiber_sem_take_wait_timeout()
	nano_task_sem_take_wait()
	nano_task_sem_take_wait_timeout()
	nano_sem_take_wait()
	nano_sem_take_wait_timeout()

Change-Id: If7a4bce1bd8ec8d6410d04f3c16ff1922ff0910e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
cd6db374de nano_fifo: Simplify nano_xxx_fifo_get() API family
Changes the nanokernel FIFO API so that the timeout parameter must be
specified when invoking nano_isr_fifo_get(), nano_fiber_fifo_get(),
nano_task_fifo_get() and nano_fifo_get().

This obsoletes the following APIs:
	nano_fiber_fifo_get_wait()
	nano_fiber_fifo_get_wait_timeout()
	nano_task_fifo_get_wait()
	nano_task_fifo_get_wait_timeout()
	nano_fifo_get_wait()
	nano_fifo_get_wait_timeout()

Change-Id: Icbd2909292f1ced0bad8a70a075478536a141ef2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
8ba05cc2ad update documentation to use boards where applicable
Change the terminology in the documentation and use board instead
of platform where applicable.

Change-Id: I812598e1948ee7df8739e5cc9029278e9e849c7f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif
10bb38c186 Use SoC instead of platform.
Change terminology and use SoC instead of platform. An SoC provides
features and default configurations available with an SoC. A board
implements the SoC and adds more features and IP block specific to the
board to extend the SoC functionality such as sensors and debugging
features.

Change-Id: I15e8d78a6d4ecd5cfb3bc25ced9ba77e5ea1122f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Peter Mitsis
05e0c02a5d fifo: Simplify task_fifo_get() API family
Changes the FIFO API so that the timeout parameter must be specified
when invoking task_fifo_get() thereby making the following APIs obsolete:
    task_fifo_get_wait()
    task_fifo_get_wait_timeout()
    _task_fifo_get()

Change-Id: Iac626d9d6d4836033e06ffd5a2ca415ab2630b1a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:06 -05:00
Peter Mitsis
5deb202a8c fifo: Simplify task_fifo_put() API family
Changes the FIFO API so that the timeout parameter must be specified
when invoking task_fifo_put() thereby making the following APIs obsolete:
    task_fifo_put_wait()
    task_fifo_put_wait_timeout()
    _task_fifo_put()

Change-Id: Ifbbfb7018fd9a71551ccba648fda6d2d59d589a6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
4eae500445 mutex: Simplify task_mutex_lock() API family
Changes the mutex API so that the timeout parameter must be specified
when invoking task_mutex_lock() thereby obsoleting the following APIs:
    task_mutex_lock_wait()
    task_mutex_lock_wait_timeout()
    _task_mutex_lock()

Change-Id: I15d4bddbdc2707b3cbdab672498170da1c47b8db
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
9cc9bdcd53 mem_pool: Simplify task_mem_pool_alloc() API family
Changes the mem_pool API so that the timeout parameter must be specified
when invoking task_mem_pool_alloc() thereby obsoleting the following APIs:
	task_mem_pool_alloc_wait()
	task_mem_pool_alloc_wait_alloc()
	_task_mem_pool_alloc()

Change-Id: Ifa88f13bca98ca3c7d0e1a3b64b40a00068619e0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
e2cb5f5bdd mem_map: Simplify task_mem_map_alloc() API family
Changes the mem_map API so that the timeout parameter must be specified
when invoking task_mem_map_alloc() thereby obsoleting the following APIs:
    task_mem_map_alloc_wait()
    task_mem_map_alloc_wait_alloc()
    _task_mem_map_alloc()

Change-Id: I8905d07fa4b8c3729ca144e8f09e7ad0c7bf0f43
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
f863d66dd8 semgroup: Simplify task_sem_group_take() API family
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_group_take() thereby obsoleting the following APIs:
	task_sem_group_take_wait()
	task_sem_group_take_wait_timeout()
	_task_sem_group_take()

Change-Id: I64e3f4c9f1e74a86b49d4a0e55b82ecee7733220
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
40eba989e2 semaphore: Simplify task_sem_take() API family
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_take() thereby obsoleting the following APIs:
	task_sem_take_wait()
	task_sem_take_wait_timeout()
	_task_sem_take()

Change-Id: I746d5c966a3b81ffe014333af51aa10ea8a63263
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
57c7977ecf pipes: Simplify task_pipe_get() API family
Changes the pipe API so that the timeout parameter must be specified
when invoking task_pipe_get() thereby obsoleting the following APIs:
	task_pipe_get_wait()
	task_pipe_get_wait_timeout()
	_task_pipe_get()

Change-Id: If249e57d086fef15fdc1616965f53b310ac9cf9d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
f5d90e1584 pipes: Simplify task_pipe_put() API family
Changes the pipe API so that the timeout parameter must be specified
when invoking task_pipe_put() thereby obsoletingg the following APIs:
	task_pipe_put_wait()
	task_pipe_put_wait_timeout()
	_task_pipe_put()

Change-Id: Ie5693716828e9d8681434c0d130792279ab97acc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
d3e4b72da2 mailbox: Simplify task_mbox_data_block_get() API family
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_data_block_get() thereby obsoleting the
following APIs:
    task_mbox_data_block_get_wait()
    task_mbox_data_block_get_wait_timeout()
    _task_mbox_data_block_get()

Change-Id: I284be505e6de792ba5483611d1299063162550e1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
a67b7070b7 events: Simplify task_event_recv() API family
Changes the event AIP so that the timeout parameter must be specified
when invoking task_event_recv() thereby making the following APIs obsolete:

	task_event_recv()
	task_event_recv_wait()
	task_event_recv_wait_timeout()
	_task_event_recv()

Change-Id: I165a8efbdedb431fee0c20e9ad1f1942c04124c0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
1a163f53b7 task_irq: Simplify task_irq_test() API family
Changes the task IRQ API so that not only does task_irq_test() become
task_irq_wait(), but that the timeout parameter must also be specified.
Use of task_irq_wait() obsoletes the following APIs:
	task_irq_test()
	task_irq_test_wait()
	task_irq_test_wait_timeout()
	_task_irq_test()

Change-Id: Ie4d15f29941429249e9fbb258d29ec2b3ae73a93
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
b4ba8087e7 mailbox: Simplify task_mbox_get() API family
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_get() thereby obsoleting the following APIs:
    task_mbox_get_wait()
    task_mbox_get_wait_timeout()
    _task_mbox_get()

Change-Id: Ie028223ec342666e61d3d69750aec37dbe2b493e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
96116cadbb mailbox: Simplify task_mbox_put() API family
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_put() thereby obsoleting the following APIs:
	task_mbox_put_wait()
	task_mbox_put_wait_timeout()
	_task_mbox_put()

Change-Id: I174857bdf32fe7e59b79838185666cd557312814
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Allan Stephens
ed78a03da2 doc: Enhance information about microkernel mailboxes
Completely overhauls Kernel Primer section on mailboxes to fill in
a host of omissions, correct errors, and improve readability.

Change-Id: I7f27230f59a593f6b7f44f399363ba423156b43e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:25:03 -05:00
Johan Hedberg
5619d1114b Bluetooth: Rename LE scan & advertising APIs for consistency
To have a clear split between LE & BR/EDR rename these APIs with the
appropriate prefixes.

Change-Id: I983df2b5880947d96f0ad289d12f3383f44894be
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:00 -05:00
Tomasz Bursztyka
55fdd1fd33 device: Provide generic API to handle synchronous calls in drivers
Introduce the device_sync_call_t object type and its API.

This object type allows one thread to perform synchronous calls into a
driver. Only one thread can do such calls per instance of the
device_sync_call_t object since it makes a global record of what type of
thread is waiting on it.

Based on an idea from Dmitriy Korovkin and Peter Mitsis, moving their
proposal to a more generic API provides the solution for all device
drivers that exposes synchronous API in an interrupt based
implementation.

Change-Id: I793fac76645396bf4eb6be38b5a130ac6bde8f73
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:57 -05:00
Juan Manuel Cruz
bc1a79c4c3 irq: removes priority parameter from IRQ_CONFIG macro
Removes the 'priority' parameter from the IRQ_CONFIG macro.
This parameter was not used anymore in any architecture.
The priority is handled in the IRQ_CONNECT macro.
The documentation is updated as well.

Change-Id: I24a293c5e41bd729d5e759113e0c4a8a6a61e0dd
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:24:57 -05:00
Peter Mitsis
53af19050d timer: Remove deprecated routines
Removes the following deprecated routines:
	nano_cycle_get_32()
	task_cycle_get_32()
	fiber_cycle_get_32()
	isr_cycle_get_32()

Those routines have all been replaced by sys_cycle_get_32().

Change-Id: I8709952633bb87c8963e88caffe1036fb9add527
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:55 -05:00
Peter Mitsis
78ed31ac01 kernel: Replace nano/task_cycle_get_32()
Replaces calls to nano_cycle_get_32() and task_cycle_get_32()
with sys_cycle_get_32() as that is the preferred API to use.

Change-Id: I0ad1c50083c4cfdd9a26c2f20ba24e065410d90d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:55 -05:00
Peter Mitsis
92b21c7153 timer: Rename _sys_clock_cycle_get()
Renames _sys_clock_cycle_get() (provided by the timer driver)
to sys_cycle_get_32().  It is the preferred method to read the
hardware clock.

Change-Id: Ifea5213d8c04a8bf7b9114b048c5db0ccee61549
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:55 -05:00
Peter Mitsis
b858a99f7b doc: Fix ring buffer doc build errors
Change-Id: Ibef77ca5fc16a2532d56111d216e26f948718078
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:54 -05:00
Peter Mitsis
18cc029e3b Remove fiber/isr_tick_get[_32]() APIs
Removes the following context based APIs:
	isr_tick_get_()
	isr_tick_get_32()
	fiber_tick_get()
	fiber_tick_get_32()
The routines sys_tick_get() and sys_tick_get_32() are to be used instead.

Change-Id: I3fa1338f174b10e783bfb00941edadfff16eeaba
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:54 -05:00
Peter Mitsis
cd9893d563 microkernel: Elminate task_tick_xxx() APIs
Eliminates task_tick_xxx APIs in favor of sys_tick_xxx APIs.
	task_tick_get()    -> sys_tick_get()
	task_tick_get_32() -> sys_tick_get_32()
	task_tick_delta    -> sys_tick_delta()
	task_tick_delta_32 -> sys_tick_delta_32()

Change-Id: Ie8c2bc114a08f091997faaf68f6fc5536b2ba25d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:54 -05:00
Peter Mitsis
c40e84c57a nanokernel: Rename nano_tick_xxx APIs
Renames the following nanokernel tick APIs.
	nano_tick_get()      -> sys_tick_get()
	nano_tick_get_32()   -> sys_tick_get_32()
	nano_tick_delta()    -> sys_tick_delta()
	nano_tick_delta_32() -> sys_tick_delta_32()

Change-Id: Ie969545335d76df94b4e2d200fef86a93596f5e8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Allan Stephens
6b07c1d548 doc: Update descriptions for semaphore APIs
Standardizes appearance, corrects errors, improves readability,
and fils in gaps. Also relocates documentation for internal APIs.

Removes mention of non-existent task_sem_group_take() API from
the Kernel Primer document. The microkernel's semaphore group logic
currently allows a task to take a semaphore from a semaphore group
in a blocking manner.

Change-Id: Ib41a43775a97483a5adc552b70575ae4269aba35
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
8c658e11b1 nanokernel: Add task_sleep()
This routine allows the background task to sleep for a specified
number of ticks.

Change-Id: I2533005e3d9a564c2ca0de8333e224743cefb658
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
699b4ee03d nanokernel: Add generic stack routines
Adds the following generic stack routines:
	nano_stack_push()
	nano_stack_stack_pop()
	nano_stack_pop_wait()

Those routines are convenience wrappers for invoking the task, fiber and
ISR (if applicable) specific implementations.

Change-Id: I6e7bb2ca69bb2e3d5ed955654390746e76e4ab92
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
836eaee18a nanokernel: Add generic semaphore routines
Adds the following generic semaphore routines:
	nano_sem_take()
	nano_sem_take_wait()

Those routines are convenience wrappers for invoking the task, fiber and
ISR (if applicable) specific implementations.

Change-Id: I09d715d07263eb0ee526231120ba65d1e3feebce
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
16c7452f6b nanokernel: Add generic lifo routines
Adds the following generic lifo routines:
	nano_lifo_put()
	nano_lifo_get()
	nano_lifo_get_wait()
	nano_lifo_get_wait_timeout()

Those routines are convenience wrappers for invoking the task, fiber and
ISR (if applicable) specific implementations.

Change-Id: I5252e4643fe4772f1309b26c1b3e4319f5035956
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
3d2afc63c0 nanokernel: Add generic timer routines
Adds the following timer routines:
	nano_isr_timer_start()
	nano_isr_timer_stop()
	nano_isr_timer_test()
	nano_timer_start()
	nano_timer_stop()
	nano_timer_test()
	nano_timer_wait()

Change-Id: Ib93f2ef2ffaa12dea3ddb52e9f3ae758b2987300
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Dmitriy Korovkin
a4f6a32169 doc: Add flags to irq_connect(), IRQ_CONNECT_STATIC() and task_irq_alloc()
Change-Id: I671208ac3b1e9f6c26917e86c99337ff195ae2d4
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:24:44 -05:00
Anas Nashif
833fb90087 doc: fix parameters to IRQ_CONFIG
Change-Id: I5c3e22ad2311faf76ada79a61eac7ccac5864334
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:43 -05:00
Peter Mitsis
111323fc90 doc: Fix typo in nanokernel semaphore APIs
Change-Id: If3206b3113b7a47efc520887f53b3299e8da2404
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:43 -05:00
Allan Stephens
7ed2678916 doc: Remove documentation for microkernel command packet sets
Update semaphore documentation to remove mention of command
packet sets, which no longer exist.

Change-Id: I19303f7f497b7d8299723d01c91ae4f4513162f0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:42 -05:00
Allan Stephens
6fe1e2357f doc: Fix typo in description of microkernel semaphores
Change-Id: Iaa5e511aa0ca901fcf2f57f49dd4816898fada37
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Allan Stephens
935a809cc6 doc: Add documentation for using private events
This reflects the changes made in commit df6be15aa5...

Change-Id: Ibe1bc167390268c0e335a0b4060a600ef55d1add
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00
Allan Stephens
a891c045a7 doc: Add section on floating point services to Kernel Primer
Change-Id: Ic96385595740796e6bb28425cacd05a1285a89bb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:36 -05:00