The nanokernel LIFOs could only have one fiber pending on one of
them concurrently. If a second fiber wanted to take a contested
LIFO, if would kick the pending fiber out of the wait 'container',
but would not put it in back in the ready queue with an error. Instead,
it would, for all intents and purposes, remove it from the scheduling
mechanism of the nanokernel: the fiber would be 'lost' at that point.
The nanokernel LIFOs now make use of the fiber pend queue, and thus
allow multiple fibers to pend concurrently.
sysgen is updated since the microkernel initializes statically two
LIFOs, one for the command packets and one for the timer packets, and
the LIFO data structure has changed.
The nano_timers use the LIFOs and look at their internals, so they are
updated as well.
Change-Id: I250a610fcdee9d32172c88d38e6c3cfd5b437d15
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The nanokernel semaphores could only have one fiber pending on one of
them concurrently. If a second fiber wanted to take a contested
semaphore, if would kick the pending fiber out of the wait 'container',
but would not put it in back in the ready queue with an error. Instead,
it would, for all intents and purposes, remove it from the scheduling
mechanism of the nanokernel: the fiber would be 'lost' at that point.
The nanokernel semaphores now make use of the fiber pend queue, and thus
allow multiple fibers to pend concurrently.
Change-Id: If8a8cee55d47fa1454ee84c56950fd4da20cd436
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Adapt nano_fifo to use the struct _nano_queue and the _nano_wait_q
interface built on it.
The nano_fifo is the first to be adapted to use these since it currently
is the only nanokernel object that can handle multiple waiters, and the
_nano_wait_q abstraction was taken directly from it. This allows an easy
transition and can reuse the same tests to verify the abstraction is
working correctly.
Change-Id: Ie96e6cf1cb21c99ab2fb9832f9b454a9e1ebd300
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This will allow using it for nanokernel objects wait queue, and thus
having all the code for multiple-waiter nanokernel objects in one
location and reusable by all objects.
Change-Id: Ica27fea3d4bc74342e4c54fc8ea5a3425c293e80
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The 'channel' wording was misleading.
Change-Id: Idbfc2322fd6ba8e26d59255c9b9a6e2274df22a8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The 'channel' wording was misleading.
Change-Id: I36ccd0944c057fd9f6356c67c2f5f0dc867920a9
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The 'channel' wording was misleading.
Change-Id: Ibcd5dc2fe83cea860475380470647ba23ac88a2a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The 'channel' wording was misleading.
Change-Id: I0f6f620e728d24988159cb80ee98edcaf7c52ec0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The microkernel server's stack area can be defined by the kernel
library itself, without relying on sysgen to do it.
Change-Id: I9359946ce9ca9138970db4e264fd25d8b92034c6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves workload monitoring logic from microkernel server file and
relocates it so it resides with other workload monitoring code.
This change means that the various variables use for workload monitor
computations no longer need to be globally visible.
This move also allows correction of two pre-existing issues:
1) Eliminates reference to non-existent POWERSAVEOFF configuration
option.
2) Test to see if idle task has been deselected is no longer done
if prior test has shown that it has just been selected, since
the two conditions are mutually exclusive.
Change-Id: Ibd04b789e9ed40910c33261285c07f5a1044eee7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
1) Removes leading underscore from non-global API name.
2) Adds missing function comment block.
3) Adds an important caveat regarding the way workload monitor
calculations are done.
Change-Id: I66963f6a7a0d419f97a6a41cee4efb0eaf510585
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Remove workload monitoring logic from system clock tick file and
relocate it so it resides with other workload monitoring code.
Note: There is still some workload monitoring logic in the microkernel
server that needs to be consolidated.
Change-Id: I399a90d6a1ca4792f6f40cbb66ce8c1c6f15ceaf
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Shorten API name by removing extraneous wording.
Change-Id: Iff67c4d7e82b7093e3d4d8a7ce61a3011e0ff517
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Merges content of microkernel's taskcall.c file into cmdPkt.c.
Change-Id: Ifc3642a6f0ff4fb98423a36b1e7d18acfade2991
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
These conditionals are no longer required.
Change-Id: I70db7328cd48db7dceeb4ee982a048c3e07980d1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Change _nano_ticks to 64-bit with the functions that operate it
for the consistency with microkernel.
Introduce *_tick_delta() functions that return 64-bit value
and *_tick_delta_32() that return low 32 bits.
Change-Id: Id02c9f4b2b5c309ad9aa0a82bb7f4330af7e34a3
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
In order to better support different compilers, each test that
uses inline assembler, includes a compiler specific header file
that contains the proper code.
Change-Id: I7e2e27a0663501f934a5bb3539f7e23670a1e755
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
If a source code file depends on a configuration option,
that, in turn, depends on a compiler, this file has to
include toolchain.h.
toolchain.h includes a compiler specific header file that
sets the proper configuration option.
Change-Id: I7c9002522a8c6d6fd945e27a450ebe46ba9d4892
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
In order for better compiler support make sure that
absolute symbol macros are specific for a supported compiler.
As the patch modifies gen_config_abssym sources, at least,
host/src/gen_config_abssym host tool needs rebuild.
Change-Id: Iece19611e2410a9753e538c725c5c81a447bf978
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
In order to have a better compiler support consolidate
inline assembler code in a set of header files.
If another compiler is used, that supports a different
inline assembler format, asm_inline_<compiler name>.h
heder files have to be provided.
Change-Id: Iecc7d96419efd767a8463933badd4db4a557de5b
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Revises comments to make it clear that the timer structure and
its fields are not part of the public API. Also eliminates an
unnecessary forward reference issue by defining the linked list
fields of the timer structure using the structure name itself.
Change-Id: Ic6489c38ab4e3a6408a0b9475bdd2956ae51c4a4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Relocates routine that updates active microkernel timers when the
system clock is incremented so that it is co-located with the
rest of the microkernel timer object routines. Also renames the
routine to conform to the revised kernel naming conventions.
Change-Id: I264833fd0aad210057ad8c0cd6a929e1656197db
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Folds this routine into task_tick_get(), since their co-location
into the same file means that there is no need for one to be a
wrapper function for the other. Also enhances the comments describing
the resulting routine.
Change-Id: I23210991b13be8864af0faf7e1fc4f23aa9252c2
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves routines that have nothing to do with microkernel timer objects
from the time support file to the file containing system clock support.
Change-Id: I7ab3e579877d689dc9487ca3330fe25e2e4afdd0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Renames routine to conform with coding conventions and enhances
comments describing routine. Also converts routine to a non-global
routine, since it's only called from one place.
Change-Id: Id2ca15169eeb34248a1adfaecdef0ccd04e313d1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This file contains content that really belongs in the files that
implement the microkernel's system tick logic and the microkernel's
timer object logic. Once the content is relocated, the file is
empty and can be deleted.
Change-Id: Ia116424d0bf11a759e5d995443121be98a320e29
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves the architecture-independent microkernel's handler for
fatal task errors into the file containing other abort-related
routines, since it doesn't have anything to do with the
microkernel server code it previously resided with.
Change-Id: I284eb05339cdff955f02018edfd0e53619b283b4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
1) Updates comments to better describe the purpose of the file.
2) Corrects an excessively long line.
3) Eliminates an unnecessary #ifdef, which isn't required now that
the file has been moved to the main microkernel source directory.
Change-Id: I765095e6989213d82092aecd8a16b495b3d4b8d4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Relocates the microkernel server implementation so that it appears
in the intuitive kernel subdirectory, and give it a more meaningful
name.
Change-Id: Id93620b6f5e4797bbbeef9eadf02490e19220d7e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Does a minor reshuffling of logic to ensure that the idle task
continues to busy wait even if _workload_loop() unexpectedly
returns. Also enhances associated comments to make the operation
of the idle task a bit clearer.
Change-Id: Ie6fd3fde0b088770815b1946415d213ee0e54a4b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
1) Fixes up comments to improve readability.
2) Corrects lines whose length violates the limit specified by
coding conventions.
3) Removes two extern statements that are no longer needed
due to the recent consolidation of idle-related code.
4) Substitutes the proper symbolic value for two numeric literals.
Change-Id: I7f979ab84b7f888f4015a406a84d8483a105255c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Consolidates all architecture-independent microkernel code dealing
with advanced power management into the main microkernel idling file,
so that it can be more easily maintained.
Change-Id: I140575508e32fe25d5210b8611ad1ffdf55b7529
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
These options are no longer required as malloc-type support has
been previously eliminated.
Change-Id: I93fdb93395bc53c8a550a64fa61a7339d74ba278
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory to kernel/nanokernel, then
deletes the sub-directory itself. Both of the relocated files are
associated with fundamental nanokernel capabilities, which makes
their inclusion in the main nanokernel source directory logical.
Change-Id: Ifae46a50c60f67e9226d3a33cd0086b644b291ba
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory to kernel/nanokernel, then
deletes the sub-directory itself. Both of the relocated files are
used during nanokernel initialization, which makes their inclusion
in the main nanokernel source directory logical.
Change-Id: I1cac0561317f808eab2de74ece9868c62c70b6d8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
microkernel source directory, then deletes the sub-directory itself.
Change-Id: I5b20310828c26038015b159cb6c57906a8258727
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
microkernel source directory, then deletes the sub-directory itself.
Change-Id: Ic8e158e4e9be9e4ba21a935c371c49beee4ad276
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
microkernel source directory, then deletes the sub-directory itself.
Change-Id: Ifd56369e5209b06fae39ee69403ea234fb392b4a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Moves all files in this sub-directory up one level, to the main
nanokernel source directory, then deletes the sub-directory itself.
This change means that all nanokernel source files (with the
excecption of its include files) are now in the main nanokernel
source directory, which is a more intuitive arrangement.
Change-Id: I6bd4b1bb6fdd9be13d57b320947f520a5bc73914
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Relocates start_task() so that it appears in the main microkernel
directory, alongside its complementary routine abort_task();
this corrects a long-standing anomaly in which this microkernel-
specific routine appeared in the nanokernel portion of the tree.
With this move, the start_task.c file and its parent nanokernel/task
sub-directory no longer serve any purpose and are removed. (Note that
no changes are required for ARC architecture support, which does not
support microkernel capabilities and doesn't use this sub-directory.)
Change-Id: I973e1c32c9a8ddcacdc08159069ae7cdfea0f107
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This renaming will impact the following functions:
nano_node_tick_delta
task_node_tick_delta
Change-Id: I5d3fdfe0121674d88b8f3d8777150b2242b88d1a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer support the concept of nodes.
This will impact:
task_node_cycle_get_32
isr_node_cycle_get_32
nano_node_cycle_get_32
This change also updates the nanokernel test API to work with the change.
Change-Id: I68de883b07d4775b09fda13e503c040b3f14baa7
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer support the concept of nodes. This will impact the
following function names:
task_node_tick_get
isr_node_tick-get
Change-Id: I2591193976578689e70b9d6833d5a89a4dc0c4ce
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
We no longer support the concept of nodes. This will impact the following
functions:
task_node_tick_get_32
isr_node_tick_get_32
nano_node_tick_get_32
Change-Id: I27184c76516da16a0c3f335656f9efcee2fb549d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>