Updating global variable's name to follow a consistent naming convention.
Change accomplished with the following script:
#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \
! -path "./host/src/genIdt/*" \
! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';
Change-Id: Icf5900c057f3412d3c7725c07176fe125c374958
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Updating local variable's name to follow a consistent naming convention.
Change accomplished with the following script:
#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \
! -path "./host/src/genIdt/*" \
! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';
Change-Id: I80ccb884f1ffd8f3740cd9298787462485b08024
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
The 'proc' name was a remnant of legacy naming.
Change-Id: I1ee47e47728e4bd927d7fe2284f72ace6b9aebc6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This notation is more concise and carry the same information.
Change-Id: Iba2023d37c2f3168fa44750441a29a6e024c0d7e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
A number of fibers pend on a LIFO, then the task queues data on it, once
for each waiter. Each time, the first fiber in the queue wakes up, is
context-switched to, verifies the data is the one expected, and gives a
semaphore. The task finally must be able to obtain the semaphore an
amount of times equals to the number of fibers.
Change-Id: I2709ec56368fc72d365bd752657fb319a9b6c394
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
A number of fibers pend on a semaphore, then the task give the semaphore
once for each waiter. Each time, the first fiber in the queue wakes up,
is context-switched to, and gives another semaphore. The task finally
must be able to obtain the second semaphore an amount of times equals to
the number of fibers.
Change-Id: I36bcd6f5b1b0df73fdb35c2dbbbc639fec9dbae8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Append '_non_preemptible' to _fifo_put, _lifo_put, _sem_give and
_stack_push.
The original names do not convey the fact that these routines are
usable only by fibers and ISRs because they do not invoke a context
switch if they cause a fiber to become ready.
Change-Id: I8ddc24cbc7ebcbed42479ef84b04a74ef21d1647
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
State that a task 'giving' an object to a waiting fiber will be
preempted immediately. Remove useless _Swap() comments.
Change-Id: I78e9871acc046dc9b003f926d45b0b52ba48d2b4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
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>