Commit graph

3017 commits

Author SHA1 Message Date
Peter Mitsis
1da807e7a8 unified: Tweak msgq API parameters
- Reorders parameters where necessary
 - Adds alignment parameter to K_MSGQ_DEFINE() for buffer alignment
 - Renames parameters where necessary so they are more intuitive

Change-Id: I0b53105c04109127897bf4790e6908082f82da4e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-19 14:54:44 +00:00
Peter Mitsis
578f9111ed unified: Tweak mem_map API parameters
- Reorders parameters where necessary
 - Adds buffer alignment parameter to K_MEM_MAP_DEFINE()

Change-Id: Ifa1a09c62492cd6db8bdd83f31a5ca5ba072b484
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:31:51 +00:00
Peter Mitsis
937042c22a unified: Update mem_pool doxygen style function headers
Change-Id: I3b751522bbabaec5c5146cc28b85d188344a693f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:30:40 +00:00
Allan Stephens
7e6540a301 unified: Fix bug in invocation of init functions
Now invokes any microkernel-level init functions used by
legacy applications.

Change-Id: I8f68ddba764f13d037a679b74121713983f4aaba
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-18 15:29:17 +00:00
Peter Mitsis
b2fd5be4dc unified: Rework K_THREAD_DEFINE()
K_THREAD_DEFINE() can no longer specify a thread group. However, it now
accepts a 'delay' parameter just as k_thread_spawn() does.

To create a statically defined thread that may belong to one or more thread
groups the new internal _MDEF_THREAD_DEFINE() macro is used. It is only used
for legacy purposes.

Threads can not both have a delayed start AND belong to a thread group.

Jira: ZEP-916
Change-Id: Ia6e59ddcb4fc68f1f60f9c6b0f4f227f161ad1bb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-17 17:52:33 +00:00
Peter Mitsis
1209270bf8 unified: Relocate mailbox doxygen style function headers
Change-Id: I06e9ce40da650df67f05db8779a5f6199e6091d5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-15 07:41:23 +00:00
Peter Mitsis
40680f6eb9 unified: Tweak mailbox API parameters
Tweak mailbox API parameters so that not only are their descriptions
correct, but their names match across header file and C file.

Change-Id: Ieeb3a40fb7c535a5eac2e06533d01d13aaf69181
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-15 07:41:23 +00:00
Peter Mitsis
e5d9c58301 unified: Tweak pipe API parameters
- Reorders parameters where necessary
 - Adds alignment parameter to K_PIPE_DEFINE()
 - Renames parameters where necessary so they are sync'd
   between header and source files

Change-Id: I4f2367abc28aff646cc90beb9f08bb266e143b0c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-15 07:09:58 +00:00
Allan Stephens
be315245a0 unified: Fix bug in memory pool defragmentation code (ZEP-1051)
Reverts a change that was made to the defragmentation routine
when memory pool support was ported from the microkernel to the
unified kernel.

The change was intended to improve the readability of the algorithm,
but introduced a subtle change in behavior. For example, when
k and i are zero and the number of block set entries is one
the original algorithm did not execute the while loop, while the
revised algorithm executed the loop once.

Change-Id: I2b0263a8d7b80846013c459847817d314f803457
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-14 21:15:42 +00:00
Benjamin Walsh
b4b108de4d unified: rename sched.h to ksched.h
Build breaks when enabling CONFIG_NEWLIB_LIBC because it has its own
sched.h file.

This is a bad symptom of a greater issue: the build system passes many
'-I<path>' options to the compiler, and that allows including header
files by simply specifying their names (when located somewhere else than
<zephyr>/include/) and can cause clashes when several files in different
locations have the same name, like in this case.

Fixes ZEP-1062.

Change-Id: I81d1d69ee6669a609cd0c420b1b8f870d17dcb67
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-14 20:49:36 +00:00
Benjamin Walsh
3751123fa9 unified: align prototype and definition of k_thread_priority_set
Change-Id: I7299ded2fc66acb5806499ea26e1e5daedc7cc9c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-14 20:49:36 +00:00
Allan Stephens
1d07bd1bff unified: Eliminate support for dynamic timers
Gets rid of official support for dynamic timer allocation
in the unified kernel, since users can easily define and
initialize timers at any time. Legacy support for dynamic
timers is maintained for backwards compatibility reasons
for the time being ...

Change-Id: I12b3e25914fe11e3886065bee4e96fb96f59b299
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-13 13:54:00 +00:00
Allan Stephens
018cd9a656 unified: Eliminate k_stack_init_with_buffer()
Folds this API into k_stack_init() to provide a single API
that requires the caller to pass in the stack buffer, just
as is done for other kernel objects initialization APIs
involving the use of a buffer.

Change-Id: Icad5fd6e5387d634738d1574f8dfbc5421cd642d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-13 13:54:00 +00:00
Allan Stephens
399d0ad55a unified: Rationalize thread priority APIs
* Gets rid of k_current_priority_get(). Users can just call
  k_thread_priority_get(k_current_get()) instead.

* Declares k_thread_priority_get() in kernel.h, where it
  really belongs.

* Removes duplicate declaration of k_thread_priority_set().

Change-Id: I616ae6f2e06c95ecba3b92324186b3fa29162fd1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-13 13:53:59 +00:00
Benjamin Walsh
a6e85b248a unified: fix remaining issues for building without SYS_CLOCK_EXIST
Do not include timeout_q.h when !SYS_CLOCK_EXIST, this allows removing
_unpend_thread_timing_out() in that case.

Have _abort_thread_timeout() return 0 (success) when !SYS_CLOCK_EXIST.

With this change, the minimal footprint nanokernel project compiles for
the unified kernel.

Change-Id: Ifbf9167a82fb3ebcf6941bf3f85c105c23c9060c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:44 +00:00
Benjamin Walsh
ce9f782a7f unified: use _is_thread_pending() rather than poking in _timeout
That's what the interfaces are for.

Change-Id: Ida0b4d6561c7848a63bcb06537e0dbaafd8dbbfd
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:43 +00:00
Benjamin Walsh
48efb384f8 unified: do not compile out _k_neg_eagain when !CONFIG_ERRNO
It is always needed by the kernel, since the return codes are now
errnos. CONFIG_ERRNO is the mechanism for having a per-thread errno, not
using errno values.

Change-Id: I4ed14896a342f4122793d91b13c41b4a6a74716d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:42 +00:00
Benjamin Walsh
1a5450bb8e unified: merge NANO_TIMERS and NANO_TIMEOUTS with SYS_CLOCK_EXISTS
Timers are based off timeouts now, which can only be enabled when the
system clock is enabled. So the three are really just one setting now.

Keep the NANO_TIMERS and NANO_TIMEOUTS around for now until all
middleware that rely on them is updated. They are always enabled when
SYS_CLOCK_EXISTS is enabled.

Change-Id: Iaef1302ef9ad8fc5640542ab6d7304d67aafcfdc
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:41 +00:00
Benjamin Walsh
8ae55deaf9 unified: remove unused references from nano_private.h
Leftover from the nanokernel.

Change-Id: I06f43f182ddbf40617b97aea424252e9c46a95e1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:40 +00:00
Benjamin Walsh
c742d7e6b3 unified: cleanup kernel initialization
- ensure dummy thread's stack is aligned
- rename nano_init() to prepare_multithreading
- move _Swap() to main thread into its own function

Change-Id: I6c8dbe2a4e034f3db90b55d1a5e30bc73bac3d50
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:39 +00:00
Benjamin Walsh
b7ef0cba5f unified: remove last instances of struct tcs
Change-Id: I956bf0e96266e68ac1743f02a82ffafe77ebb0e8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:38 +00:00
Benjamin Walsh
055262c159 unified: remaining timeout cleanup
Rename remaining functions to fit with kernel naming convention for
internal interfaces. Use struct k_thread instead of struct tcs.

Change-Id: I28cd7f6f4d7ddaeb825c8d2999242d8d2dd93f31
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:37 +00:00
Benjamin Walsh
601b354ffe unified: clean-up timeout code for unpending a thread
Integrate _timeout_remove_tcs_from_wait_q() into
_unpend_thread_timing_out().

Change-Id: Id57d9fd8f9e877e580460091172aaabf451f3d4b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:37 +00:00
Benjamin Walsh
688973e5ab unified: streamline "timeout add" internal interfaces.
Rename _do_timeout_add to _add_timeout, rename _TIMEOUT_ADD to
_add_thread_timeout to better reflect their functionalities. Have the
latter call the former, remove _do_timeout_add and
_nano_timer_timeout_add.

Change-Id: Ica86bea10d99d72bf78379598a942d277e7002d0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:36 +00:00
Benjamin Walsh
0bd7e0d148 unified/mem_pool: use K_NO_WAIT, not TICKS_NONE
TICKS_NONE is only for legacy API.

Change-Id: Iffd53fbd4115da51dac18b4d74786d164353dbfb
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:35 +00:00
Benjamin Walsh
7caef4581d unified: streamline "timeout abort" internal interface
Rename _do_timeout_abort to _abort_timeout, rename _timeout_abort to
_abort_thread_timeout to better reflect their functionalities. Have the
latter call the former, remove _do_timeout_abort and
_nano_timer_timeout_abort.

Change-Id: I0fea9474b19a2eb47a37489eb06c0d1d56886c9c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:34 +00:00
Benjamin Walsh
179fd3a80c unified/legacy: disable clock-based work_q APIs when no system clock
Change-Id: I15e76499a8425539a631819960976801356d8fa6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:33 +00:00
Benjamin Walsh
35497d6c5e unified: cache the next thread to run
When adding a thread to the ready queue, it is often known at that time
if the thread added will be the next one to run or not. So, instead of
simply updating the ready queues and the bitmask, also cache what that
thread is, so that when the scheduler is invoked, it can simply fetch it
from there. This is only done if there is a thread in the cache, since
the way the cache is updated is by comparing the priorities of the
thread being added and the cached thread.

When a thread is removed from the ready queue, if it is currently the
cached thread, it is also removed from the cache. The cache is not
updated at this time, since this would be a preemptive fetching that
could be overriden before the newly cached thread would even be
scheduled in.

Finally, when a thread is scheduled in, it now becomes the cached thread
since the fact that it is running means that by definition it was the
next one to run.

Doing this can speed up considerably some context switch times,
especially when a thread is preempted by an interrupt and the same
thread is scheduled when the interrupt exits.

Change-Id: I6dc8391cfca566699bb9b217eafe6bc6a063c8bb
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:31 +00:00
Benjamin Walsh
7bc86c0344 unified: use sys_dlist_peek_head_not_empty()
When fetching the next thread to run, we know at least one thread is
available.

Change-Id: I568c33a61b6a0a6d6a7f79c337caecffd5ef70b6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-10 21:27:30 +00:00
Kumar Gala
d12d8af186 unified: move code from nanokernel into unified kernel
As the unified kernel should replace the nanokernel and microkernel
lets go ahead and move code shared between the nanonkernel and unified
kernel into the unified kernel.

Change-Id: I8931efa5d67025381d5d0d9563e7c6632cece87f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-10 00:46:40 +00:00
Anas Nashif
33118f9212 sensor: grove: use global sensor init priority
Change-Id: Ie56ee7e4b267b4dc67026be4531834f550134969
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 20:53:29 +00:00
Anas Nashif
d3fe63702f kernel: boot banner requires early console, so select it
If you select the BOOT_BANNER on its own, nothing happens and
you are left to wonder what is going, it happens very early in
the boot process and requires very early console initialisation.

Change-Id: Id548491f7e3f7f399ddc572199ce39e6fc268ed4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:07:25 +00:00
Ricardo Salveti
81e7749cd5 kernel: event logger needs ring buffer
Change-Id: Ia5bb7e0c7cf7f94b03aad9826d5798af7813d0b5
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-06 12:56:19 +00:00
Dmitriy Korovkin
19f2884738 unified: Fix build broblem caused by concurrent make processes in single dir
Make sure that kernel/unified, that is included in libs-y does not
built recursively through building kernel/ directory.
Make sure that any lib.a library is not included into libzephyr.a
and thus object modules from those lib.a files are linked only if a
function from that object module is referenced from the application.

Jira: ZEP-1025

Change-Id: Id3a3e96ca0b8abc9aedde0ffb9baa0164e380464
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-05 10:29:31 +00:00
Ramesh Thomas
c4c0ed414b power_mgmt: Reduce complexity in handling of power hooks
Simplified some documentation, removing inconsistencies and making
it easier to understand by separating PM infrastructure areas and
soc specific components that implement the hooks.

Removed the DEVICE_SUSPEND_ONLY policy as it is redundant and
causes high complexity in the flow. It is also not practical
to use it because it was meant to be used without doing CPU or SOC
low power state operations. This means it would do device PM
operations in the ISR of the system timer used by the scheduler.
This can disrupt the scheduler time.

Added a check of a flag around the notification sent from the ISR
of the wake event and created APIs to set/clear it. This will
allow disabling the notification when not needed from
_sys_soc_suspend().

Jira: ZEP-972
Change-Id: Id7aa7d2683384eabed518d4efac446ecc84c3498
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-10-05 10:05:42 +00:00
Iván Briano
9c7b5eacea unified: Fix building of the unified kernel
Change-Id: I6824cdb9123a574a56af10efdebdc1c8b82427f8
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-10-04 18:11:05 -03:00
Peter Mitsis
340d00ab51 unified: Simplify k_msgq_purge()
Simplifies k_msgq_purge() at the expense of making the case of an
already empty message queue a little slower.

Change-Id: I8fafd6d49233efbf23b95d171f81bf795e828454
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-04 20:04:46 +00:00
Peter Mitsis
96cb05ca50 unified: Add tickless idle support for x86 and ARM
Change-Id: I42d20355321f431900727768a0836ee18e96b667
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-04 20:02:50 +00:00
Peter Mitsis
a04c0d70e1 unified: Rename k_thread_static_init structure
Renames the k_thread_static_init structure to better follow
Zephyr naming conventions.

Change-Id: I479add2aefa3421ebc0b879e0d04c0c7ffd7f107
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-04 19:57:58 +00:00
Luiz Augusto von Dentz
ee1e99b3b7 unified: Add k_work_pending
This adds k_work_pending which can be use to check if a k_work is
pending execution.

Change-Id: Ifd56e8d65d555c7e9722c547fe83e13e886d63cd
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-04 17:30:42 +03:00
Luiz Augusto von Dentz
cd4501c453 nano_work: Add nano_work_pending
This adds nano_work_pending which can be use to check if a nano_work
is pending execution.

Change-Id: Iae0492a750de93fcd7e89e3a2e74509ffce4983b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-04 17:29:59 +03:00
Benjamin Walsh
bbe361ccaf nano: remove duplicated typedef
Obtained from device.h, which includes microkernel.h when building for a
microkernel system.

Caught by LLVM.

Change-Id: I98a00269b2b6cb38c851b176323de1228d65603d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-04 12:28:27 +00:00
Peter Mitsis
0cb65c3c0d unified: Eliminate k_mem_pool_t typedef
Replaces it with a pointer as there is no need for an opaque memory
pool type.

Jira: ZEP-916
Change-Id: I5493eed25c9c34e1b850dc3b20699864edb22d28
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-03 20:17:02 +00:00
Peter Mitsis
0ca7cea8f3 unified: Relocate internal thread group APIs
Moves the following internal thread group APIs from the public
kernel.h header file to the more private thread.c source file as
they do not need to be public APIs.
	_k_task_list_start[];
	_k_task_list_end[];
	_FOREACH_STATIC_THREAD()
	is_in_any_group()

Change-Id: I0b731fb0c20a5574cb1b3c1397803af82918d69d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-03 20:17:02 +00:00
Daniel Thompson
9a81ffa7ad device: Make device_get_binding() const correct
Currently passing a constant string (other than a string
literal) to device_get_binding() generates a spurious warning.
The warning is spurious because device_get_binding() does not,
nor is it ever likely to, modify its argument. To fix the
warning we modify the prototype to make clear name will never
be modified.

Change-Id: I2df22de61eb2580b2086a685549900d7ed4a322d
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-29 13:46:43 +00:00
Dmitriy Korovkin
9558d47fd3 unified: Build kernel objects as a static library
Building kernel objects as a static library allows not
to include the initialization function for an object
type if this type is not used by the application.
It reduces memory footprint

Change-Id: I2b3c79cb2591fdd1ce15d27684c4a874e759c559
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-28 19:13:36 +00:00
Dmitriy Korovkin
284042d746 unified: Invoke kernel object initialization with SYS_INIT macro
Kernel object initialization needs to follow the common initialization
scheme.

Change-Id: I6693678ed7c4975b3c588061013fa0c5d24968c3
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-28 19:13:35 +00:00
Dmitriy Korovkin
4223ba7964 unified: Add initialization priority level for kernel objects
The separate initialization priority provides more
flexibility when it's needed to arrange the initialization
sequence.

Change-Id: Ie1b7b48d282618f6d641320bf3b24f63716a7342
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-28 19:13:35 +00:00
Benjamin Walsh
ba5ddc189e unified: implement k_uptime_{get,delta}()
Simple conversion from ticks for now.

Change-Id: Ib81fc738d45641a6a3a88d2adec1f3eb861f3f97
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-23 21:39:40 +00:00
Peter Mitsis
19547d09f7 unified: Eliminate useless check in idle thread
There is no reason to check if the idle thread is a cooperative thread
before invoking k_yield(); it is safe to unconditionally invoke it every
iteration.

Rationale: If the idle thread is cooperative, k_yield() must be invoked
to allow a new thread to get scheduled to run. If the idle thread is
preemptive, then k_yield() effectively becomes a no-op.

Change-Id: Ide3204c92381640b5d12b39ca0f258d56d8cc3d0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 19:53:22 +00:00
Peter Mitsis
ba26615a47 unified: Remove unused _nano_get_earliest_deadline()
The routine _nano_get_earliest_deadline() is still used by both
the microkernel and nanokernel.

Change-Id: I14501e6d41ca5faac27dead5873ef897e79831aa
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 19:53:22 +00:00
Peter Mitsis
7e9d7058cc unified: Remove #if 0 code block from wait_q.h
Change-Id: Ic916c161b7faa9260e85899682c43d97f24e5197
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 19:53:21 +00:00
Peter Mitsis
e02c720e3d unified: Remove obsolete wait_q.h macros
Removes the following wait_q.h macros
  _NANO_OBJECT_WAIT()
  _TIMEOUT_UPDATE()
  _TIMEOUT_TICK_GET()

Change-Id: I7cb78728aaad74acf7f121c79f03d32fa6af5aac
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 19:53:21 +00:00
Peter Mitsis
b27249486a unified: Remove references to obsolete task_timeout
Change-Id: I7c3b1b8418809914d3daf9d68ed8e4c3b99dd0b1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 19:53:20 +00:00
Peter Mitsis
3259d0e3c4 unified: Replace _nano_get_earliest_deadline()
Replaces _nano_get_earlist_deadline() with the more streamlined
routine _timeout_get_next_expiry().

Change-Id: Iee7ec727f0500cb28e37a364036fd40a483b40c3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 19:53:20 +00:00
Dmitriy Korovkin
bf9972113f unified: Add legacy task_offload_to_fiber() routine
For unified kernel the routine is implemented through
a wait queue.

Change-Id: Iceab7b821e3b55e0773ad780f4b9b0a1dfc21f5d
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-23 18:51:06 +00:00
Peter Mitsis
653ff0b949 unified: Remove check in _reschedule_threads()
The routine _reschedule_threads() does not need to check that the
scheduler is locked as this is done as part of _must_switch_threads().

Change-Id: I701b811512836eef591b2adcd708991ec9324b3d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-23 18:25:49 +00:00
Andy Ross
8d8b2acb26 k_timer: Don't allocate dynamic timers by default
Most apps run fine with static k_timer objects.  Don't pay the cost
for the timer pool if no one asks for it.

Also turn off the allocate/free API in the header if it can't possibly
work at runtime as it's an obviously-detectable error that would
otherwise be visible only at runtime.

Change-Id: I492e6e01c4213e3544f707247eea6e4bc601fefd
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-09-23 18:25:37 +00:00
Benjamin Walsh
0bee91dae1 unified: fix some leftover K_<obj>_DEFINE macros
The K_<obj>_DEFINE macros in the unified kernel create objects of name
'name', and not a pointer named 'name' to an object. Some macros
contained the code from early prototyping.

Change-Id: I7262570fbe0b267012874eac0185b4e0cd7f523d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-22 21:09:22 +00:00
amirkapl
d305da61e9 power_mgmt: Update Power Management device driver API
Have one function that can be used for all possible device
purposes using a control code instead of the suspend
resume functions, makes it generic for device control.
Added device power states.
The older replaced APIs will be deprecated in a future patch

Jira: ZEP-954
Change-Id: I6dd3ebfd0fde3546b2d8397f19842f5758fda0c4
Signed-off-by: Amir Kaplan <amir.kaplan@intel.com>
2016-09-22 00:23:43 +00:00
Dmitriy Korovkin
7f14618227 unified: Enable memory pools in mailbox tests
Change-Id: I216fbff4db7e97bfca3574f6bfc5294d73ae8e9c
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-20 22:04:46 +00:00
Dmitriy Korovkin
3c426888a1 unified: Implement memory pools
Due to the memory pool structure only static declaration of
memory pool is possible.

Change-Id: I4797ed88fd2ac3b7812ff26e552e1745611c4575
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-20 22:04:46 +00:00
Peter Mitsis
45403678aa unified: Add support for semaphore groups
Semaphore groups are enabled by default. Disabling them will both
decrease the footprint as well as improve the performance of the
k_sem_give() routine.

Change-Id: If6c1b0e2e1f71afd43e620f05f17068039d12b05
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-20 11:45:28 -04:00
Peter Mitsis
68d1f4b562 unified: Add timeslice support
Change-Id: I5b6c1ef5c015d1ddaea21b1c5447336b1b04db39
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-20 15:28:54 +00:00
Peter Mitsis
bd69658571 unified: Add _is_next_thread_current()
The routine _is_next_thread_current() checks if the current thread
is still the highest priority thread that is ready to run.

It is useful for determining if a thread must be swapped out when
timeslicing is in effect.

Change-Id: Ide7b89742a64f6082ca4c679a4b2fbd60792e30f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-20 15:28:54 +00:00
Peter Mitsis
685254f524 unified: Preemption check to include sched lock
Change-Id: I8dc635bc53036938b249220d655dceb1f6f413f0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-09-20 15:28:53 +00:00
Benjamin Walsh
7e6dacd65f unified/build: allow building the unified kernel
Added needed kconfig options. KERNEL_V2 selects MICROKERNEL to allow
middleware and application that differentiate between NANOKERNEL and
MICROKERNEL to run unmodified.

Build the unified/ kernel directory: do not touch the
nanokernel/microkernel directories.

Invoke sysgen for both microkernel and unified kernel. Only have sysgen
reference include/microkernel if building an original microkernel.

Change-Id: If74779146143434f7ee274bbef32d6c894b9f1a1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
456c6daa9f unified: initial unified kernel implementation
Summary of what this includes:

    initialization:

    Copy from nano_init.c, with the following changes:

    - the main thread is the continuation of the init thread, but an idle
      thread is created as well

    - _main() initializes threads in groups and starts the EXE group

    - the ready queues are initialized

    - the main thread is marked as non-essential once the system init is
      done

    - a weak main() symbol is provided if the application does not provide a
      main() function

    scheduler:

    Not an exhaustive list, but basically provide primitives for:

    - adding/removing a thread to/from a wait queue
    - adding/removing a thread to/from the ready queue
    - marking thread as ready
    - locking/unlocking the scheduler
      - instead of locking interrupts
    - getting/setting thread priority
      - checking what state (coop/preempt) a thread is currenlty running in
    - rescheduling threads
    - finding what thread is the next to run
    - yielding/sleeping/aborting sleep
    - finding the current thread

    threads:

    - Add operationns on threads, such as creating and starting them.

    standardized handling of kernel object return codes:

    - Kernel objects now cause _Swap() to return the following values:
         0      => operation successful
        -EAGAIN => operation timed out
        -Exxxxx => operation failed for another reason

    - The thread's swap_data field can be used to return any additional
    information required to complete the operation, such as the actual
    result of a successful operation.

    timeouts:

    - same as nano timeouts, renamed to simply 'timeouts'
    - the kernel is still tick-based, but objects take timeout values in
      ms for forward compatibility with a tickless kernel.

    semaphores:

      - Port of the nanokernel semaphores, which have the same basic behaviour
      as the microkernel ones. Semaphore groups are not yet implemented.

      - These semaphores are enhanced in that they accept an initial count and a
      count limit. This allows configuring them as binary semaphores, and also
      provisioning them without having to "give" the semaphore multiple times
      before using them.

    mutexes:

    - Straight port of the microkernel mutexes. An init function is added to
    allow defining them at runtime.

    pipes:

    - straight port

    timers:

    - amalgamation of nano and micro timers, with all functionalities
      intact.

    events:

    - re-implementation, using semaphores and workqueues.

    mailboxes:

    - straight port

    message queues:

    - straight port of  microkernel FIFOs

    memory maps:

    - straight port

    workqueues:

    - Basically, have all APIs follow the k_ naming rule, and use the _timeout
    subsystem from the unified kernel directory, and not the _nano_timeout
    one.

    stacks:

    - Port of the nanokernel stacks. They can now have multiple threads
    pending on them and threads can wait with a timeout.

    LIFOs:

    - Straight port of the nanokernel LIFOs.

    FIFOs:

    - Straight port of the nanokernel FIFOs.

Work by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
         Peter Mitsis <peter.mitsis@windriver.com>
         Allan Stephens <allan.stephens@windriver.com>
         Benjamin Walsh <benjamin.walsh@windriver.com>

Change-Id: Id3cadb3694484ab2ca467889cfb029be3cd3a7d6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
851c537f29 kernel: add CONFIG_MDEF
Easier to build logic for when an MDEF file is to be parsed since
unified kernel needs to do it as well. Can also be useful for testing,
when toggling between static and dynamic objects in the same test case.

Change-Id: I51eb8919e18443516ade13caab04698d37d91803
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Andrew Boie
d6053db355 kernel: abolish FUNC_NO_FP
These impede debugging and we have CONFIG_OMIT_FRAME_POINTER
now which does this globally for the entire kernel.

Change-Id: I46939223e27dd298ca3ed162ff5790cb2e9ed2a2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-09 21:13:30 +00:00
Andrew Boie
7d432bbd0a microkernel: remove deprecated task IRQs
Change-Id: I02264a587b77ae597133b9c52b342b8e5520a131
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 16:15:59 +00:00
Marcus Shawcroft
530e285770 kernel: Rename CONFIG_CUSTOM_RANDOM_GENERATOR to CONFIG_RANDOM_GENERATOR
Initialization code in nano_init.c gated by the config parameter
CONFIG_CUSTOM_RANDOM_GENERATOR is out of step with the rest of the
tree where support for this config parameter was removed by
commit 27bcb431cb ("Random number generator driver unification")

Change-Id: If6086fd85e61579c646d09029ef129e8a3b464b8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-08-31 10:40:28 +00:00
David B. Kinder
d748577706 doc: Fix terminology in Kconfig files for 'platform'
Completing the terminology change started with change 4008
by updating the Kconfig files processed to produce the
online documentation, plus header files processed by
doxygen.  References to 'platform' are change to 'board'

Change-Id: Id0ed3dc1439a0ea0a4bd19d4904889cf79bec33e
Jira: ZEP-534
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-18 21:17:29 +00:00
Andrew Boie
4760753ab0 Revert "microkernel: remove deprecated task IRQs"
This reverts commit d73a9bb9c6.
The patch was intended for 1.6.0 release.

Change-Id: Id42058b746a3d2a54e4b1a2983eb58bd10b1ed40
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 20:37:25 +00:00
Andrew Boie
d73a9bb9c6 microkernel: remove deprecated task IRQs
Change-Id: I06393c8ee0e864105cd0183c92e453638679fe81
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 16:55:42 +00:00
Juro Bystricky
19d84d8e00 nano_init.c: STACK_CANARY_INIT fix for ARC
An updated version of ARC GCC reports this error:
nano_init.c:340: Error: inappropriate arguments for opcode 'mov'

The offending in-line assembly code tried to move register value into a
memory location.

Use store "st" instruction instead of "mov" istruction to store
a value in memory.

Change-Id: I91ebd20495612da4d5639a3ef848379705f6dedd
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-07-27 15:23:15 +00:00
Johan Hedberg
a95b6eeafb nano_work: Fix never yielding from fiber
If the delayed work FIFO never goes empty (e.g. because the work
callback keeps resubmitting or there's a very active ISR feeding items
there) then the fiber would never yield, causing all sorts of problems
for the system. Adding an explicit fiber_yield() call at the end of
the while-loop solves the issue.

Change-Id: I233b9fc18fc9db9172daf8689bd22d09952089cb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-27 14:44:13 +00:00
Allan Stephens
2275cae089 kernel: Remove unneeded ASSERT from memory pool subsystem
Eliminates assert check that complains about an attempt to allocate
a memory pool block larger than the largest possible block size.
In such cases the allocation code now just returns a NULL pointer
indicating that it was unable to allocate the requested block, just
as it does when a block smaller than the maximum size cannot be
allocated because none is currently available.

Note: One scenario in which it isn't unreasonable for an application
writer to request a block that is too big is the case where a receiving
task using a mailbox first receives an excessively large message without
its data and then tries to retrieve the data into a memory pool block
allocated by the mailbox. Rather than forcing the application writer
to check to see if the size of the received message is too big for the
memory pool, or adding code to the mailbox subsystem to do such a check,
it's easier to pass on the request to the memory pool and simply have it
return NULL, which causes the mailbox to report that data retrieval
failed. The application can then perform a single check that catches
both the case where the memory pool simply ran out of blocks and the case
where it didn't have any block big enough to handle the message.

Change-Id: Ifd2cdd8a5927b93d3e9c5df301544e522131d2c6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-26 04:53:07 +00:00
Andrew Boie
917159188c nano_init: force nanokernel stack alignment
The interrupt stack pointer is now aligned, and we error out if
the sizes of the interrupt and main task stacks aren't a multiple
of the stack alignment.

Change-Id: I2a70c82fc94e25cc6c7a9d5ec165bf2370b8a166
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-20 21:26:00 +00:00
Andrew Boie
6a1474e75b nanokernel: support GCC compiler atomic builtins
Arches now select whether they want to use the GCC built-ins,
their own assembly implementation, or the generic C code.

At the moment, the SDK compilers only support builtins for ARM
and X86. ZEP-557 opened to investigate further.

Change-Id: I53e411b4967d87f737338379bd482bd653f19422
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-18 23:20:52 +00:00
tulasinagraj
ce2574a30b nanokernel: remove duplicate symbols in image file
Jira ZEP-68,zephyr.elf shows duplicate routines which increases the foot print.
Current fix removes duplicate routines and reduces foot print of the image

Change-Id: I01a2e5a8a02481ab33a2bb09e9c545d6879c1b81
Signed-off-by: tulasinagraj <tulasi.r@tcs.com>
2016-07-18 18:47:03 +00:00
Allan Stephens
7bbf48bf5b kernel: Cosmetic cleanups to memory pool code
Improves a handful of comments, and removes some unneeded blank lines.

Change-Id: Ia2b951d23131b0080104c18c06324342de3359ef
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:40 +00:00
Allan Stephens
ff48e07f70 kernel: Rename fields of private memory pool type
Revises two fields of the memory pool structure to better reflect
that block sets are involved.

Change-Id: I44a751e7457270391fbe99705010345448df2ff4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:40 +00:00
Allan Stephens
dc9556c4f7 kernel: Rename field of private memory pool type
Revises the memory pool block set field that points to its array
of quad-blocks to better reflect that quad-blocks are involved.

Change-Id: I159805ce8eee9091221cb1f494a4ab082e3736e5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:39 +00:00
Allan Stephens
c0fd08e82d kernel: Rename private memory pool types
Revises the names of 2 types to make them better reflect the
data structures they represent, namely:

- block set: a collection of memory pool blocks of a given size
- quad-block: four contiguous memory pool blocks of a given size

Change-Id: I3e424586e97157eea185fba6836e2e89d10d9cd6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:39 +00:00
Allan Stephens
569d08a940 kernel: Eliminate unused memory pool structure field
Eliminates the memory pool field indicating the size of the
pool's memory buffer, since it isn't used anywhere.
(Anyway, it could be computed by multiplying the maximum
block size by the number of maximum-sized blocks.)

Change-Id: Ia11554bdc2b246a1ba0ea33f05c5e6ce6a32ca13
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:39 +00:00
Allan Stephens
28c427d6c0 kernel: Invert polarity of memory pool's quad-block memory status field
Alters the use of the field so that a 1 bit indicates that the
associated block is available (i.e. can be allocated from the pool),
and a 0 bit indicates the block is unavailable (i.e. it is already
allocated or does not exist).

The revised definition of this field is more intuitive, since it follows
the conventional "1 = thing is present, 0 = this is not present" model.

Change-Id: Id133d1940aca0dd1c3c1672f989d0c0bb083ebc5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:38 +00:00
Allan Stephens
8b925dc5de kernel: Optimize memory pool initialization routine
No longer initializes the quad-block descriptors for block sets,
except for the one containing the largest size blocks. The descriptors
for the other block sets don't need initialization since sysgen already
ensures the block pointer field is NULL, and the block status field can
be anything (since it is ignored if the pointer is NULL).

Change-Id: I72cdf772329ef3e6d1babd9da11706d11611e61a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:38 +00:00
Allan Stephens
6f3f29a0f3 kernel: Enhance memory pool defragmentation routine
Adds missing check to prevent defragmentation algorithm from
going past the end of a block set's array of quad-blocks.
Optimizes quad-block deletion algorithm so that it simply moves
the final array entry into the slot for the deleted entry,
rather than shifting all of the entries in between them.

Also enhances comments to make it easier to understand
what is going on.

Change-Id: Ic281c6f3c6dd5df9ec532a302b4103f3d929665b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:38 +00:00
Allan Stephens
a8b0301087 kernel: Standardize memory pool block set computation
Now use a standard routine for identifying which block set to use,
rather than duplicating the identification code in multiple places.

Change-Id: I2f6577879c23183f3f91e4418d1ea0b2f6eec184
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:35 +00:00
Allan Stephens
032041e644 kernel: Enhance memory pool block deallocation routine
Revises algorithm to call an existing routine to free an allocated
block, rather than duplicating the logic to do the freeing.

Also enhances comments to make it easier to understand what is
going on.

Change-Id: Ie7a83a8a2e978e8a685c27e07acb5b70aea37afa
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:35 +00:00
Allan Stephens
4b67b115d3 kernel: Enhance memory pool block deallocation routine
Revises algorithm for deallocating an existing block to make it
more compact (and efficient). Address calculation is simplified
and unnecessary error checking is removed (& replaced by asserts).

Also enhances routine name and comments to make it easier to
understand what is going on.

Change-Id: If1803ee09c8f4f73693c0cff9e433a7938f14398
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:35 +00:00
Allan Stephens
f2abf7425a kernel: Enhance memory pool defragmentation routine
Enhances comments to make it easier to understand what is going on.
(Doesn't change actual defragmentation algorithm.)

Change-Id: I294f55b8f233d88c01ce30ba9ccff88000dc7936
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:34 +00:00
Allan Stephens
5a8c054544 kernel: Enhance memory pool block allocation routine
Enhances routine name and comments to make it easier to understand
what is going on. (Doesn't change actual allocation algorithm.)

Change-Id: I7d982ed8eeda3a2edd4602c5a10003aa8532457d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:34 +00:00
Allan Stephens
18f4557513 kernel: Enhance memory pool block allocation routine
Revises algorithm for allocating an existing free block to make it
more compact (and efficient) by using the same logic to handle the
allocation of any block within a quad-block.

Also enhances routine name and comments to make it easier to
understand what is going on.

Change-Id: I55ca513e6f85df2b548502262e4dbe6bb272596b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:33 +00:00
Allan Stephens
ea5a523c43 kernel: Enhance memory pool block allocation routine
Converts check for a request for an impossibly large block
from a run-time check to an assertion. (The run-time check logic
was faulty anyway, since an excessive request would result
in a negative value for "offset", which would then get used
as an array index!)

Also enhances comments to make it easier to understand what is
going on.

Change-Id: I3faa86be177dcbc76912e23fabc2d24724fcba18
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:33 +00:00
Allan Stephens
e6112a0cb8 kernel: Enhance memory pool initialization routine
Makes a couple of minor optimizations to initialization algorithm:

- Now initializes block status array for largest size blocks once,
  rather than twice.
- Doesn't initialize "count" field of block size descriptors to zero,
  since sysgen ensures that this happens automatically.

Also enhances comments for initialization routine to make it easier
to understand what is going on.

Change-Id: I00d907c0f2a86f5b6ea8a63475b40074fe89357c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:33 +00:00
Allan Stephens
06dc3090d5 kernel: Eliminate unused memory pool structure field
Eliminates memory pool field associated with a capability that was
never implemented. (This field was initialized, but never subsequently
referenced.)

Change-Id: I58cf8c4bb846a66b4c8754654ffc3ff55abcff7f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:32 +00:00
Andrew Boie
5b9378ab7e nanokernel: move dataCopy() and bssZero() to common code
Used by ARC, ARM, Nios II. x86 has alternate code done in assembly.

Linker scripts had some alarming comments about data/BSS overlap,
but the beginning of BSS is aligned so this can't happen even if
the end of data isn't.

The common code doesn't use fake pointer values for the number of
words in these sections, don't compute or export them.

Change-Id: I4291c2a6d0222d0a3e95c140deae7539ebab3cc3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 18:23:11 +00:00
Andrew Boie
ef29812d51 nios2: support more global pointer scenarios
We now allow use of -mgpopt=global and -mgpopt=data. The 'global'
option is now the default instead of compiler-default local, expanding
global pointer usage to all small data in the system.

For systems where all RAM is less than 64K, the 'data' option may be
appropriate.

Some fixes had to be made to the system in order to get around some
issues:

* prep_c.c no longer uses fake linker variables to figure out the size
of data or BSS, as these gave the linker fits as it tried to compute
relative addresses to them.

* _k_task_ptr_idle is create by sysgen and placed in a special section.
Any small data in a special section needs to be declared extern
with __attribute__((section)) else the compiler will assume it's in
.sdata.

* same situation with extern references to k_pipe_t (fixed pipe_priv
test)

For legacy applications being ported to Nios II which do things that
freak out global pointer calculation, it can be disabled entirely.

Change-Id: I5eb86ee8aefb8e2fac49c5cdd104ee19cea23f6f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-06 18:14:31 +00:00
Juan Manuel Cruz
870ca36a0b tracing: _k_command_stack is explicitly not tracked.
Jira: ZEP-379
Change-Id: I94a1695fd4efb288dac9cfcaa4d3423e2970e108
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-06-16 16:30:46 +00:00
Benjamin Walsh
d8994f69be nanokernel: add nano_fifo_put_list() APIs
Introduce the family of nano_fifo_put_list and nano_fifo_put_slist APIs,
which allow queuing a list of elements on a nanokernel fifo in one
shot. When called from an ISR or a fiber, the behaviour is not really
different than calling nano_fifo_put for each element to enqueue.
However, when called from a task, it allows the task to enqueue the full
list without yielding to fibers that were waiting on the fifo.

All fibers currently waiting on the fifo will be awakened and given an
element from the list in their order of priority. When some elements are
not matched with a receiver, they are queued normally.

There are two ways of passing a list: with either an ad-hoc queue, by
passing the head and the tail elements, or with a sys_slist_t object.
For the latter, the object must be reinitialized afterwards.

Change-Id: I6ac077f556dc39995191e9149c4a047a3433826f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-06-13 20:24:41 +00:00
Luiz Augusto von Dentz
967f8fb602 nanokernel: Add callback to _nano_timeout once again
It is now safe to introduce the callback since nano_timer_init now
calls _nano_timeout_init which does takes care of initializing all
the fields properly.

Change-Id: I5735eeebef233a0a541ec8b2a354b65da98082fc
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 00:35:05 +00:00
Luiz Augusto von Dentz
4afb4e4150 nano_timer: Make nano_timer_init call _nano_timeout_init
With the introduction of _nano_timeout_init it prefered to call it
to initialize the _nano_timeout fields properly.

Change-Id: I83e9c63f9bb2903c508264d1199d2c687c330ec8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 00:34:55 +00:00
Luiz Augusto von Dentz
d6f039ed79 nanokernel: extract _nano_timeout_init from _nano_timeout_tcs_init
This will allow initializing a nano timeout that is not associated with
a thread.

Change-Id: Ic71175b0059396b19a0e3616f4fab570071c3d48
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:53:17 +00:00
Luiz Augusto von Dentz
b559c1bca2 nano_work: Add delayed version
This adds a delayed version of nano_work API which is useful when
handling timeouts since the same stack/workqueue can be shared.

Change-Id: Iac43796fe96deb0a9c8976c91a65104b57779b00
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:52:51 +00:00
Kumar Gala
9ec2f3be80 Cleanup whitespace in Kconfig files
Convert leading whitespace into tabs in Kconfig files.  Also replaced
double spaces between config and <prompt>.

Change-Id: I341c718ecf4143529b477c239bbde88e18f37062
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-05-25 13:28:07 -05: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
Anas Nashif
65febf9417 Revert "nanokernel: Add callback to _nano_timeout"
This reverts commit f4465c651c.

Breaks samples/sensor/bmi160/ in Arduino 101:

ipm_console0: 'IMU: Binding...'
ipm_console0: 'Testing the polling mode.'
ipm_console0: 'Gyro (rad/s): X=-0.006517, Y=0.007581, Z=0.011172'
ipm_console0: 'Acc (m/s^2): X=-2.221632, Y=-4.826304, Z=74.965716'
ipm_console0: 'Temperature (Celsius): 31.661555'
ipm_console0: 'Exception vector: 0x00000003, cause code: 0x00000006, parameter 0x00000000'
ipm_console0: 'Address 0x0074006e'
ipm_console0: 'Fatal fault in ISR ! Spinning...'

Change-Id: I3c38ba4795c9996e42816c0581e249c1b5f70bc2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-21 18:28:57 -04:00
Luiz Augusto von Dentz
f4465c651c nanokernel: Add callback to _nano_timeout
This adds a callback to struct _nano_timeout which is called in ISR
context allowing more flexible handling of timeouts.

Change-Id: If837b0b51b24dfffebac6f99f4d66fdf01c164f0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-21 12:02:57 +00:00
Benjamin Walsh
9977951f93 kernel: catch overflowing kserver stack with asserts
Overflowing the k_server command stack will now trigger an __ASSERT()
when CONFIG_ASSERT=y.

Change-Id: Icf6f4242ab8a9897918769415a0f7485602d7630
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-05-18 22:06:39 +00:00
Vlad Dogaru
818a2e2975 nanokernel: Introduce workqueue API
Add a generic API for drivers to start workqueues and submit work
items.  This is needed by drivers which need to schedule code that might
sleep from an ISR to run in fiber context.

Also add the option to start a system-wide workqueue.

Both additions are optional.  They can be deactivated for systems that
do not need them.

Change-Id: Ia843568fde5daf6d4279ef7bf241c26c1e3dcfb7
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-05-12 15:26:39 +00:00
Anas Nashif
7e5692d914 device: add documentation for device_get_binding
Moved comments from code to header.

Jira: ZEP-160
Change-Id: Ifd0f3c930289256e682b5941d77433aca3d3f941
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:27 +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
Benjamin Walsh
1b5b6e44f7 kernel: add _IS_IDLE_TASK()
Add a way of finding if a microkernel task is the idle task instead of
of duplicating:

  task_priority_get() == (CONFIG_NUM_TASK_PRIORITIES - 1)

which could be subject to change.

Only available for microkernel, since there is no such concept in the
nanokernel.

Change-Id: Ie8930981f1a2ac5ff16f905f4eb4e333c8b59c5d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-05-11 20:22:24 +00:00
Chuck Jordan
48e1749721 kernel: _MOVE_INSTR needs to be defined for CONFIG_ARC
In order to build test/kernel/test_stackprot/microkernel for the ARC,
the _MOVE_INSTR needs to define what the move instruction is for this
target.

Change-Id: I087cc5baa4c41297ce52323556e94aab424aa891
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-05 00:06:03 -07:00
Peter Mitsis
46e6c6f8cb microkernel: lock interrupts in _k_state_bit_[re]set()
Locks interrupts in the microkernel routines _k_state_bit_reset() and
_k_state_bit_set(). This is a necessary pre-requisite for allowing
microkernel objects to pend on nanokernel objects since that feature
will require the manipulation of the microkernel queues in the context
of an ISR as well as the kernel server fiber.

Change-Id: I2d263707e0d3aed75bba971df878daa3d7ae1d11
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:35 +00:00
Peter Mitsis
59c21a5f62 microkernel: Fibers and ISRs may invoke microkernel no-op
Adds support that allows fibers and ISRs to invoke the microkernel
no-op kernel service request. This is useful for cases when the
nanokernel needs to invoke the microkernel task scheduler.

Change-Id: I1f4b2a39ac6b5e44bb1b6c6b3cd6034262bbada8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:35 +00:00
Peter Mitsis
e53c1851e9 nanokernel: Fix nanokernel object timeout recalculation
Fixes the timeout recalculation in the following routines:
	nano_task_fifo_get()
	nano_task_lifo_get()
	nano_task_sem_take()
	_nano_task_sleep()
Without this fix, a task that called one of the previously listed
routines could in theory sleep/wait up to almost twice the requested
timeout.

Change-Id: I53196be84e65874e94a62d5b0be1b7aaaaeda91f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:35 +00:00
Peter Mitsis
1cbc9089ee nanokernel: [un]block tasks on nanokernel objects infrastructure
Adds the nanokernel infrastructure to permit microkernel tasks
to block/unblock on nanokernel objects. Multiple tasks may wait
on a nanokernel object's dedicated task wait queue.

It is important to note that when data is posted to the object
all the tasks on that object's dedicated task wait queue may be
woken up but the data is not immediately given to any of the tasks.
This is done to maintain consistent behavior with the nanokernel
as in a nanokernel system, fibers are given preference in both
waiting on and getting data from a nanokernel object.

Change-Id: Ia5c7f21ae59a367d9fec23dafc3a918d9e767db5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:33 +00:00
Peter Mitsis
4ce3c0004b microkernel: [un]block tasks on nanokernel objects infrastructure
Adds the microkernel infrastructure to permit a microkernel task
to [un]block on a nanokernel object. Unlike tasks that [un]block
on microkernel objects, the work for [un]blocking tasks on nanokernel
objects will not always be done in the kernel service fiber. One of
the repercussions of this is that in many cases the microkernel task
scheduler must be explicitly invoked (by issuing a no-op kernel
service call).

Origin: Original
Change-Id: I2b145668cef142a7a4034e191116fcb344a9b8b3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:33 +00:00
Peter Mitsis
b58878bb89 kernel: Init back pointer to microkernel task
Fibers initialize this back pointer to NULL as they are (by definition)
not microkernel tasks.  Microkernel tasks initialize it to their
corresponding 'ktask_t'.

However for nanokernel systems, the back pointer is always NULL. This
is because there is only one task in a nanokernel system (the background
task) and it can not pend on a nanokernel object--it must poll.

Change-Id: I9840fecc44224bef63d09d587d703720cf33ad57
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:33 +00:00
Peter Mitsis
f0948a4cbc microkernel: Add TF_NANO wait flag reason
Adds the TF_NANO wait flag reason to indicate that a task is pending
on a nanokernel object.

Change-Id: Ic20ef79398da7d9118bdf775e22b8f8a31501f7f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:32 +00:00
Andrew Boie
68b3b6135e errno: implement _get_errno() in common code
We really should have more faith in the compiler, it generates
code to implement this exactly like the arch-specific assembly
versions, and on ARM is actually 4 bytes shorter.

FUNC_NO_FP used to disable the usual C preamble to update the
frame/stack pointers, which is how the sizes are still the same
or less. It's debatable how useful the occasional use of
FUNC_NO_FP is in practice since it hinders debugging and in a
production build frame pointers should be globally disabled, but
we can address that later.

Change-Id: I6c4b64ab3e3a9b6f91d52fa8c92e6e79a986fc77
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 17:04:14 +00:00
Geoff Thorpe
ded3070c1c nanokernel: tighten _is_thread_essential()
Of the 3 related functions;
  _thread_essential_set()
  _thread_essential_clear()
  _is_thread_essential()

The first two are parameter-less and always operate on
"_nanokernel.current". The last one takes a 'thread' parameter but will
operate on _nanokernel.current if the parameter is NULL. All calls to
_is_thread_essential() pass NULL!

This change makes the 3 functions consistent by removing the parameter
to the 3rd function. This should also be marginally more efficient,
though consistency was the motivation. This change corrects the doc
preamble to all 3 functions.

(These functions would probably be better as inlines. Also, the choice
of when to use wrappers seems a bit arbitrary. E.g. there's nothing
for setting/testing the "FIBER" flag.)

Change-Id: Ie3589f8a28b227c6d7a3a31b664d3b3e6e9c6d17
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
2016-05-03 17:42:54 +00:00
Geoff Thorpe
8b16cac073 microkernel: use _thread_essential_set()
This wrapper exists so that the ESSENTIAL bit doesn't have to be set
explicitly in _nanokernel.current. (And a note is added to nano_init to
avoid a nasty gotcha there.)

Change-Id: I4026ac0cfeace60e36abdbccf15554759f2dbf7a
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
2016-05-03 17:42:54 +00:00
Andrew Boie
7327c9ee1f nanokernel: move C atomic operations to centralized code
These C variants of atomic operations can work on any arch,
have platforms select them if they don't have ASM equivalents.

Change-Id: I38eb03bb58beff865681ee56ef7bc0fcded1e906
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:19 +00:00
Andre Guedes
36c8e09a3a device: Include errno.h
The file device.c uses errno codes so it should include errno.h.

Change-Id: I93e806a9b20b2c9bcb245ac5e86fba70486c9591
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:49 +00:00
Daeseok Youn
fa442b0287 microkernel: Match alignment with open parenthesis
fix alignment coding style issue

Change-Id: I29fefd994ffe772a6a52995b83ad5b0bf9a0dd2c
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
2016-04-26 11:10:37 +00:00
Jithu Joseph
592882e5f4 power_mgmt: APIs for devices to signal busy
Certain Low power SOC states (e.g. deep sleep)  will result in device
IP blocks losing state. In such a scenario it can be useful to have
a mechanism for devices (driver code) to signal the power manager /
policy that they are in the middle of a transaction.

We expect the device driver code to make a call to
device_busy_set(device *) before initiating a transaction and
device_busy_clear(device *) on completion. It is expected that device
driver developers will add this as necessary in their drivers.

Further an API is provided  for power manager application / policy to
check this. Based on this the power manager / policy can  decide
whether or not to go into a particular power state.

Change-Id: I0fedd90b98e182cd41b53c7f9e08655532822faa
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-04-23 02:14:21 +00:00
Daniel Leung
dd5e90ec6c device_get_binding() returns NULL if driver_api is not set
This changes the behavior of device_get_binding() so that
it returns NULL if driver_api is not set. This provides
a way for driver to state that it has not been initialized
properly, and prevents app from using it since no reference
to the device struct will be returned.

This implements the idea specified in [1]. The idea is to
reuse an existing resource by piggy-backing onto driver_api,
thus avoiding an extra "device state" variable in the device
struct. This differs from the code specified in the mailing
list by checking driver_api for NULL first. This avoids
the unnecessary strcmp() if driver_api is NULL.

[1] https://lists.zephyrproject.org/archives/list/devel@lists.zephyrproject.org/message/MZB5PYBSRHV3NIEHJYXYQVLTPFIIHPB3/

Change-Id: I978b1a6683cd56c8a72532d6368c47e67515c82d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-12 19:30:35 +08:00
Peter Mitsis
5aaf7ab930 nano_fifo: Fix problem with nano_fifo and timeouts
Fixes a problem where the nanokernel FIFO state information could get
out of sync due to a timeout.

The nanokernel FIFO structure nano_fifo now maintains two separate
queues: one for waiting fibers and the other for posted data. This
permits the safe and independent querying of the queues as needed
when getting and/or putting data from/on the nanokernel FIFO.

Change-Id: Ifbcb5004558b06fc55cad2a955f5be20e716b392
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-12 01:22:42 +00:00
Dmitriy Korovkin
4fc7d0242c kernel: Make idle task sleep
Device drivers may use task_sleep() routine during the initialization.
As device driver initialization is carried by idle task, it can not
be sheduled out as any other task. Idle task goes into a wait loop
instead.

In order to invoke task_sleep() device drivers must enable
CONFIG_NANO_TIMEOUTS option.

Change-Id: Ib73a2ad1f3c0bda44c24f2417e102bfaa3a13a15
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-04-08 15:08:33 +00:00
Daniel Leung
546b8ade37 refactor common driver initialization priorities
Most of the SoC and board Kconfig use the same values for
driver initialization priorities. So refactor them, and
discard duplicate ones.

The shared IRQ init priority was changed so that the kernel
default init and device init priorities can be standardized
across all SoC/boards. Same goes for DesignWare SPI driver.

This also changes the UART_CONSOLE_PRIORITY and
IPM_CONSOLE_PRIORITY to UART_CONSOLE_INIT_PRIORITY and
IPM_CONSOLE_INIT_PRIORITY, to standardize across all drivers.

Note that this does not take away the ability to override
those values. This just provides reasonable defaults such
that there is virtually no need to override.

Change-Id: Ibbd95d802c637df06f9a2fd48763ee1e6f4ff627
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-28 15:58:29 -07:00
Daniel Leung
8df10d4584 kconfig: untangle ordering and dependencies
There are two major issues with the kconfig:

() Some of the config options have incorrect dependencies inside help
   under menuconfig. For example, CONFIG_GPIO depends on BOARD_GALILEO.

() Since the SoC and board specific kconfig files are parsed first,
   the help screen would say, for example, CONFIG_SPI is defined at
   arch/arm/soc/fsl_frdm_k64f/Kconfig. This is incorrect because
   the actual config is defined in drivers/spi/Kconfig.

These cause great confusion to users of menuconfig/xconfig.

To fix these, the SoC and board defaults are now to be parsed last.

Note that the position swapping of defaults in this patch is due to
the fact the the default parsed last will be used.

And, spi_test is broken due to the fact that it requires
CONFIG_SPI_INTEL_PORT_1, but never enables it anywhere. This is
bypassed for now.

Origin: refactored and edited from existing files
Change-Id: I2a4b1ae5be4d27e68c960aa47d91ef350f2d500f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Ramesh Thomas
4104bbfb08 power_mgmt: Add device power management support
Added device power management hook infrastructure. Added
DEVICE_INIT_PM and SYS_INIT_PM macros that creates device
structures with the supplied device_ops structure containing
the hooks.

Added example support in gpio_dw driver.  Updated the sample
app and tested using LPS and Device Suspend Only policies.

Change-Id: I2fe347f8d8fd1041d8318e02738990deb8c5d68e
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-26 14:35:11 -04:00
Ramesh Thomas
bb19e6f82f power_mgmt: Make names consistent with new RFC
Changed names of Kconfig flags, variables, functions, files and
return codes consistent with names used in the RFC. Updated
relevant comments to match the changes.

Origin: Original
Change-Id: Ie7941032d7ad7af61fc02928f74538745e7966e8
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-26 14:35:11 -04:00
Dmitriy Korovkin
661d2f3a16 microkernel: Add support for *_sleep() during initialization
Add support for task_sleep() and fiber_sleep() during the
system initialization. When CONFIG_NANO_TIMEOUTS defined,
before the k_server() starts, kernel uses nanokernel
system clock announce and task sleep functionality.

To give device drivers early sleep functionality, the system
clock has to start on SECONDARY initialization level, same
as most of the drivers.

Change-Id: Ie1d391945cd1cfb9a5dc199783c2d224eb1b0ef3
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 10:17:15 +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
Anas Nashif
6b8c6403ec kconfig: move kernel options close together
have micro and nano kernel next to eachother.

JIRA: ZEP-107
Change-Id: I8d6e4354cf6a8cdf1193c641b112a078cd7ec460
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-17 13:00:20 +00:00
Juan Manuel Cruz
57cd459e71 debug: fixes issue on debug tracing for pool struct
Change-Id: I6af44e2388db76b4f6d38f634ae983a0d458871d
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-14 22:17:10 +00:00
Anas Nashif
207d0e799e kconfig: remove redundant EVENT_LOGGER option
KERNEL_EVENT_LOGGER selects EVENT_LOGGER which is then used to
enabling building. Skip EVENT_LOGGER and use KERNEL_EVENT_LOGGER
directly.

Change-Id: Ib9cf3a58b12bf4e78f264d8e8ac48a8104120c3b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:51 -04:00
Anas Nashif
a033c14dd1 kconfig: add power management options into a menu
Change-Id: I8e847c7f3305b63647f01a83a002a7962056732a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:50 -04:00
Anas Nashif
a13b04e022 kernel: fix boot banner option
Add missing option for adding time stamp to boot banner.

Change-Id: Idda61feeef4a89c1aa8bb7e81b52272babeb1efe
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14 16:50:50 -04:00
Juan Manuel Cruz
568df1b17d debug: add debug tracing support for task initialization
Change-Id: I3d6ec2364f97b415bc27c0ce36df289e8eae9397
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:13:30 +00:00
Juan Manuel Cruz
787b41c8a3 debug: adds object tracing capability to microkernel timers
Microkernel timers are defined at compile time as a static list
but they are allocated dynamically in kernel execution.

The object tracing list will only list those timers that are
currently allocated at debug time. For this reason, timers
can be removed from the tracing list at any time.

A very simple double linked list was implemented to reduce the
complexity of the action to remove an item from the list from O(n)
to O(1) and simplify the remove implementation.

Change-Id: Ib7ea718b52e7c719a32b3fa4ff1d7e6b00482c28
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:13:15 +00:00
Juan Manuel Cruz
f240bf18f7 debug: adds object tracing capability to nano stack
Change-Id: I0a13741a0b250fa587293936110291a4e6eec809
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:12:26 +00:00
Juan Manuel Cruz
d151776e59 debug: thread monitor allow to access more thread information
The thread monitor allows to iterate over the thread context
structures for each existing thread (fiber/task) in the system.

Thread context structures do not expose thread entry information
directly. Although all the information can be scavenged from memory
stacks. Besides, accessing the information depends on the stack
implementation for each architecture.

By extending the tcs we allow a direct access to the thread
entry point and its parameters, only when thread monitor is
enabled.

It also allows a task to access its kernel task structure
through the first parameter of the thread.

This allows a debugger application to access the information directly
from the thread context structures list.

Change-Id: I0a435942b80eddffdf405016ac4056eb7aa1239c
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:11:39 +00:00
Anas Nashif
4f9239984f Revert "microkernel: Add support for *_sleep() during initialization"
This reverts commit 0d50329105.

This breaks sanitychecks in CI. The early_sleep kernel test case is failing
randomly.

Change-Id: I015f20699c052b4089076699fc0180945c4d3d16
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 22:08:44 +00:00
Juan Manuel Cruz
c15259aca1 debug: expose thread monitor in object tracing header
Exposes the CONFIG_THREAD_MONITOR functionality as part of the
object tracing header.

Change-Id: I2022a580df2cf33e543b980dc9c33b9adca3d3bf
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:07:16 +00:00
Juan Manuel Cruz
caa17577ef debug: kernel's object tracing api
Restructure the kernel's object tracing implementation
to provide a public API that allows debug tools to use
the debug hooks easier and allows kernel developers
to extend the kernel's object tracing scope and include
new kernel objects easier.

The API provides the trace list abstraction to keep track
of different types of kernel objects. The API contains
a simple single-linked list implementation that allows
to save space and simplifies the access to the data for
debug tools such as gdb.

Change-Id: Ic4d393d584576f67f2c5b706e61bae08869debba
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 12:00:07 +00:00
Jithu Joseph
6182fca156 memory_pool: Refactor code into a helper function
Moves some code from pool_alloc into a helper function,
to avoid code duplication when implementing a pool based heap.

Change-Id: I29b9bc1b8ba166a2187df5ea037aad4d4a522f69
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-03-10 23:19:59 +00:00
Jithu Joseph
9e45411a59 memory_pool_heap: malloc/free access over a heap memory pool
Specifying  HEAP_SIZE keyword in an app's MDEF file, results in
creating a new memory pool, which can be accessed using the
task_malloc() and task_free() APIs, which have the usual malloc/free
like semantics.

Expected format in MDEF file
HEAP_SIZE    <value>

Change-Id: I0569cffeecf8a2c23c20c7b359256123ece91982
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-03-10 23:19:59 +00:00
Dmitriy Korovkin
0d50329105 microkernel: Add support for *_sleep() during initialization
Add support for task_sleep() and fiber_sleep() during the
system initialization. When CONFIG_NANO_TIMEOUTS defined,
before the k_server() starts, kernel uses nanokernel
system clock announce and task sleep functionality.

To give device drivers early sleep functionality, the system
clock has to start on SECONDARY initialization level, same
as most of the drivers.

Change-Id: I5b3cf3da4c8d8398a966e901ab211f2fcee18dd6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-10 18:39:33 +00:00
Yannis Damigos
baddeadda1 arch: & kernel: Updated Kconfigs to remove errors in html generation
This patch updates some help sections to remove the "ERROR:
Unexpected indentation" messages during hmtl documentation
generation.

Change-Id: Idcdc17727b921b6145f9eb28d85975ceca273ce2
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-04 13:26:15 +00:00
Anas Nashif
29d0d234e1 device: add missing license header
Change-Id: Ice01a19373ad17a9f8080f93c066d8be31a3b115
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-02 12:56:17 +00:00
Benjamin Walsh
fcfb4b6bda kernel: add fiber_wakeup()
Like for the other context-specific APIs, also provide a
context-agnostic wrapper.

Change-Id: Icf0a62f4c06aec42f0febc298edbd8bdeec63749
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
7a613adc14 kernel: fix xxx_fiber_wakeup() if the timeout has expired
A call to xxx_fiber_wakeup() if the timeout had expired would put the
fiber on the fiber ready queue _again_, corrupting it, or could remove
the fiber from a nanokernel object wait queue, prematurely un-pending
it.

We now verify the fiber is indeed still on the timeout queue and also
not on a wait queue, meaning the fiber is indeed sleeping.

Change-Id: Iba454d79ab50db01632b0591fb7b589221b5110b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
2aee77f8cf kernel: record when a fiber is removed from a wait queue
Until now, this was not needed since the checks for being on a wait
queue were only performed if a fiber was known to be on a timeout queue
as well. However, an upcoming fix for _fiber_wakeup() needs to verify if
a fiber is on a wait queue even if it is not timing out, because said
fix needs to check if the fiber is timing out as well.

Change-Id: If1694ceb551f2029d6a145963e81d3826956fd1d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
b1903d7e48 kernel: have _nano_timeout_abort() return an error code
An upcoming fix for _fiber_wakeup() will need to know if the fiber was
dequeued from a timeout queue.

Change-Id: I09ca039098c09a997db73f4719261352f0af07c1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Peter Mitsis
b4313cef6f nanokernel: Add routines for waking a fiber
Adds the following routines for waking a fiber that was previously
put to sleep using fiber_sleep().
    isr_fiber_wakeup()
    fiber_fiber_wakeup()
    task_fiber_wakeup()

Change-Id: I7d78ee6997163d71b92f388a7b4c484f2e97862b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis
cee79a7ca9 nanokernel: Change fiber_start() return type
The fiber_start() family of routines now return a nanokernel
thread id (nano_thread_id_t).  This is a pre-requisite step for
allowing fiber_sleep() operations to be cancelled.

Change-Id: I74a3885eda3252c158f4a48e90244569633469c3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis
06e2b4e129 nanokernel: Change fiber_delayed_start() return type
Instead of returning a 'void *', the nanokernel fiber_delayed_start()
family of routines now return a handle of type nano_thread_id_t.

Consequently, the nanokernel fiber_delayed_start_cancel() family of
routines now accept a parameter of type nano_thread_id_t instead of
'void *'.

The complete list of affected nanokernel routines is:
    fiber_delayed_start()        fiber_delayed_start_cancel()
    fiber_fiber_delayed_start()  fiber_fiber_delayed_start_cancel()
    task_fiber_delayed_start()   task_fiber_delayed_start_cancel()

Change-Id: Ibd4658df3ef07e79a81b7643a8be9ea5ffe08ba0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Ramesh Thomas
3888735e0d adv_power:Advanced Power Management APIs
This is part of an ongoing development of power management
support in zephyr. This implementation builds upon an existing
hook interface and adds more enhancements. This was tested
with reference implementations on quark_d2000 and quark_se.

Change-Id: I28092b7ec90ce1f1cc661cf99ca88708910c8eb2
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-02-12 11:20:32 -08:00
Ramesh Thomas
72e248b11b adv_power:Rename PM functions according to coding convention
Renamed functions and labels used in power management code
according to coding convention.  Only doing this to relevant
functions and not touching functions that will be removed in
future patches.

The stack used during resume would be necessary so
renamed that too.

Change-Id: I2f09a349b0f0fd6520c11b4cd73f4c8e1a13f100
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-02-12 10:57:51 -08:00
Benjamin Walsh
038790a945 sys_clock/microkernel: do not announce ticks until microkernel is up
This is a prologue to reverting:

	commit 3c66686
	Author: Benjamin Walsh <benjamin.walsh@windriver.com>
	Date:   Tue Feb 9 17:34:02 2016 -0500

		sys_clock: start the microkernel ticker in the MICROKERNEL init level

to allow the devices initializing in pre-MICROKERNEL init levels to poll
the hi-res clock (sys_cycle_get_32()), which relies on the system clock
having been started.

This change allows starting the system clock in the NANOKERNEL init
level by delaying announcing the ticks until the MICROKERNEL init level.

Change-Id: I43d54bb5e2f182d4edd880da0124a0817f911943
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-11 17:10:49 -05:00
Anas Nashif
1e825f9c0f remove redundant checking for CONFIG_STACK_CANARIES
The file is already guarded with

obj-$(CONFIG_STACK_CANARIES) += compiler_stack_protect.o

So no need to check for CONFIG_STACK_CANARIES again in the file itself.

Change-Id: I09cf274679a1678f02478fca799a3f6507e77211
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:48:45 +00:00
Peter Mitsis
76357932d8 arm: Enable support for sys_thread_busy_wait()
It is now safe to enable sys_thread_busy_wait() for ARM as an earlier
patch has fixed the build system to link against the correct intrinsics
library.

Change-Id: Ib5ed036d996461b91f372b2b3e8f597a925d3292
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-11 14:13:05 +00:00
Dan Kalowsky
21a99e639d nanokernel : clean up comments
Moving comments back to the 70 character limit.  Also moving some of the
comments up to be included in the doxygen headers instead of inline.

Change-Id: I56a6015e5fd6da81e9a06701217e62e899b6aa62
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-11 01:10:15 +00:00
Juan Manuel Cruz
65ec185f79 logger: include task monitor in kernel event logger
Zephyr includes a Task Monitor feature that allows to
track events on the microkernel server scheduler.
Task monitor is integrated as a profiler point for the
Kernel Event Logger feature.

Change-Id: I7b8be5872439a333f976eada1aa3511d93b46388
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-09 13:53:41 -05:00
Juan Manuel Cruz
d481b3ff4c logger: removes TASK_MONITOR_CAPACITY symbol
Task monitor is being tracked as a profiler point of the kernel
event logger. Now, the capacity to register task monitor events
is dictated by KERNEL_EVENT_LOGGER_BUFFER_SIZE symbol.

Change-Id: Ia4fe04c7d46fe41524c53447ad51af2e03ea5a15
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-09 13:03:19 -05:00
Juan Manuel Cruz
a641710aea logger: removes old task monitor structures.
Kernel event logger keeps track of task monitor events.
Old structures are not needed anymore.

Change-Id: I2267bdb3c2f27ea87d8675c4ecf0646ea62761ae
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-09 13:03:19 -05:00
Peter Mitsis
61e6f4a299 sys_clock: Lock interrupts when processing announced ticks
Interrupts must be locked when processing announced ticks in
_nano_sys_clock_tick_announce().  This prevents higher priority
interrupts from interrupting the tick announcement and possibly
corrupting the timeout and/or timer queues.

Change-Id: I4e87fc5b3ad36161e0accb50b2691f975f5877e5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:28 -05:00
Benjamin Walsh
a4ec963138 init: use SYS_INIT() where it makes sense
Mostly SoC initialization and some kernel subsystems, but also some
device drivers like the interrupt controllers.

Change-Id: I8dc1844c33acd877c075b6b03558fdca6f87500b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
dcfd4e96f4 device: remove obsolete DEVICE_DEFINE/INIT_CONFIG_DEFINE()
They have been replaced by DEVICE_INIT().

Change-Id: I06551f37593a3debb7eb221badd267bb5c7040c0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
d340d4cb3f device: use DEVICE_INIT everwhere
This is the last step before obsoleting DEVICE_DEFINE() and
DEVICE_INIT_CONFIG_DEFINE().

Change-Id: Ica4257662969048083ab9839872b4b437b8b351b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
0303d8cab9 device: rename SYS_DEFINE_DEVICE()
Rename it to DEVICE_DEFINE() so that it fits in the 'device' namespace.

Change-Id: I3af3a39cf9154359b31d22729d0db9f710cd202b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
bfc27206b2 device: rename DECLARE_DEVICE_INIT_CONFIG()
Rename it to DEVICE_INIT_CONFIG_DEFINE(), because (a) it was not fitting
in any namespace and (b) it is not used to declare, but rather define a
object.

Change-Id: I1da5822f06b85a9fb024b5b184afd0ccc01012ec
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:25 -05:00
Benjamin Walsh
2858cbf829 idle: fix tasks waiting when NANO_TIMEOUTS is enabled
Fix an issue where, if a task is pending on a nano timeout, the duration
it wants to wait is not taken into account by the tickless idle code.
This could cause a system to wait forever, or to the limit of the timer
hardware (which is forever, for all intents and purposes).

This fix is to add one field in the nanokernel data structure for one
task to record the amount of ticks it will wait on a nano timeout. Only
one task has to be able to record this information, since, these waits
being looping busy waits, the task of highest priority is the only task
that can be actively waiting with a nano timeout. If a task of lower
priority was previously waiting, and a new task is now waiting, it means
that the wait of the original task has been interrupted, which will
cause said task to run the busy loop on the object again when it gets
scheduled, and the number of ticks it wants to wait has to be recomputed
and recorded again.

Change-Id: Ibcf0f288fc42d96897642cfee00ab7359716703f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:24 -05:00
Peter Mitsis
8e35cc8eb4 build: Add C++ support
Adds C++ support to the build system.

Change-Id: Ice1e57a13598e7a48b0bf3298fc318f4ce012ee6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:23 -05:00
Anas Nashif
2fe1a05b74 task monitor: remove ifdef, we check in Makefile already
Change-Id: I507c3e803a0d781e6cb84f03684d1ed0043678b8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:23 -05:00
Peter Mitsis
a0e4568760 c++: Add extern "C" { } block to header files
Adds extern "C" { } blocks to header files so that they can be
safely used by C++ source files.

Change-Id: Ia4db0c36a5dac5d3de351184a297d2af0df64532
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:22 -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
Peter Mitsis
a6b20d4c04 nano timeouts: Add support macros
The macros _NANO_TIMEOUT_TICK_GET() and _NANO_TIMEOUT_ADD() will be
used in later commits to help simplify the nanokernel APIs.

Change-Id: I668af85d775eab112953d064d9c91de607f60a59
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
58acef1162 kconfig: Fix INT_LATENCY_BENCHMARK description
Fixes the routine names referenced in the INT_LATENCY_BENCHMARK
kconfig option description.

Change-Id: I74c67a8f54cfc3b0ce75fc390d7ab6bd39561d6f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
4146b346b4 x86: streamline irq_lock()/irq_unlock()
The routines _int_latency_start() and _int_latency_stop() have been
replaced by macros that evaluate to nothing when the kernel config
option INT_LATENCY_BENCHMARK is not enabled thereby giving a performance
boost to the x86 versions of irq_lock() and and irq_unlock().

Change-Id: Iabfa7bf001f5b8396e7bcf5eebd6b1aa342bac46
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Benjamin Walsh
1ffdea1eb9 idle: add infrastructure for tickless support in nanokernels
An architecture that supports tickless idle in the nanokernel can allow
selecting TICKLESS_IDLE by forcing NANOKERNEL_TICKLESS_IDLE_SUPPORTED to
be enabled.

Change-Id: I4e45b619c599913d40b7bc19902094fb361b1e3b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Dirk Brandewie
ad99c3f93b kconfig: remove useless tickless idle dependency
Re-applying this patch, which was lost when moving to kbuild:

	commit 64c0f13f9380 ("kconfig: remove useless tickless idle dependency")
	Author: Benjamin Walsh <benjamin.walsh@windriver.com>
	Date:   Mon May 11 15:13:46 2015 -0400

	kconfig: remove useless tickless idle dependency

	TICKLESS_IDLE_THRESH depends on TICKLESS_IDLE, which depends on
	ADVANCED_POWER_MANAGEMENT, which itself already depends on
	MICROKERNEL. There is thus no point in having TICKLESS_IDLE_THRESH
	depend on MICROKERNEL.

Change-Id: I95edcc7b927dd122b80f376c96233decdcc9afab
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:13 -05:00
Benjamin Walsh
38a601e578 idle: add support for nanokernel tickless idle
The architectures need to add support for it in their nano_cpu_idle()
and nano_cpu_atomic_idle() implementations, as well as in their
interrupt entry and exit code.

Change-Id: I44a241c56e624dc8e32e08db29a84489314cd7a4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Daniel Leung
699564c69c microkernel: fix build issue when CONFIG_TASK_MONITOR=y
Note that the A->Comm is a pointer to the microkernel functions,
and thus is highly probable that the high 8-bit is occupied.
Therefore adds a new field in the monitor struct to store the pointer.

Change-Id: I7bcb34108c89a97cc38b2ac411ae4139b62786f3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:12 -05:00
Dmitriy Korovkin
e02a6fe585 init: Move SECONDARY init level to the idle task.
Move SECONDARY init level from essential pseudo-fiber
to the idle task, so the device initialization routines
may use interrupts and wait for interrupts.

Change-Id: I5afa92d8b304de5b295450f0a8a761385b7c2566
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:25:10 -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
18ea9a4d05 pipe, cosmetic: Put constant in comparisons on the right
Updates comparisons in the pipe code to put the constant on the
right side of the test. This improves compliance with checkpatch.

Change-Id: I8e55afd94e0532dd7a67bd83e737846279654dff
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
Peter Mitsis
95de74e121 mailbox, cosmetic: Put constant in comparisons on the right
Updates comparisons in the mailbox code to put the constant on the
right side of the test. This improves compliance with checkpatch.

Change-Id: If84cfbe4bbca312fabbb70d45f05675c9c15d011
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Dirk Brandewie
88ce5bc8f5 kernel: remove CONFIG_INT_LATENCY_BENCHMARK fences from code path
Add null definitions for the interrupt latency measurement API so we
can remove compile fences in C code.

Change-Id: If86eedf79afcb49002108814dd4fb864956eb667
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:04 -05:00
Benjamin Walsh
3181df6db4 kernel: add per-thread errno support
Saves an errno per-thread, retrieved via _get_errno(), instead of
changing the value of a global variable during context switches to avoid
a hit to the context switch performance.

Per-arch asm implementations are provided for maximum performance.

Enabled by default, but can be disabled via the CONFIG_ERRNO option.

Change-Id: I81d57a2e318c94c68eee913ae0d4ca3a3609c7a4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:58 -05:00
Anas Nashif
275ca60b08 Fixed file description and applied doxygen style
Removed old style file description and documnetation and apply
doxygen synatx.

Change-Id: I3ac9f06d4f574bf3c79c6f6044cec3a7e2f6e4c8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:58 -05:00
Yonattan Louise
c5d86e90a1 Fix logging of interrupt events.
The system crashed if an interrupt occurs before the
kernel event logger is initialized (Error seen on Galileo).
This patch adds a condition to check if the logger is ready
to operate.

Change-Id: I27d7cc31f386780725b0c47a9c92e9c064fc128a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:58 -05:00
Yonattan Louise
8885d093c4 Add support for profiling sleep events in nanokernel.
This patch remove the dependency of the ADVANCE_POWER_MANAGEMENT
for profiling sleep events that was supported only for microkernel.
Allowing us to also use this feature in nanokernel-only systems.

Change-Id: I1761eb6c4d72f477b419dfca5dc152b0fb69ee27
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:58 -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
Dmitriy Korovkin
57f2741e4f init: Implement fine-grained initialization policy
Put initialization priorities as device driver Kconfig
parameter.

Initialization priority value for each platform is defined
in the platform Kconfig file.

Drivers and platform code use SYS_DEFINE_DEVICE to add
and initialization function.

Change-Id: I2f4f3c7370dac02408a1b50a0a1bade8b427a282
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.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
Peter Mitsis
7afd7035a2 sys_clock: Replace microkernel _k_sys_clock_tick_count
Replaces microkernel global variable _k_sys_clock_tick_count with the
global variable _sys_clock_tick_count.  This allows both the microkernel
and the nanokernel to use the same variable to track system clock ticks
instead of using two different ones.

Change-Id: Ia4eebf022f59d130ad1882e0e550016527543a45
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
43b05eb463 sys_clock: Rename _nano_ticks
Renames nanokernel global variable _nano_ticks to _sys_clock_tick_count.

Change-Id: I857407f1f7e8d9fd2eedc1c1696851173e58d2b4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:53 -05:00
Peter Mitsis
30bf5c05c8 sys_clock: fix _sys_idle_elapsed_ticks type
Fixes the type of global variable _sys_idle_elapsed_ticks such that
both its nanokernel and microkernel definitions are of the same
type--int32_t.

One of the repercussions of this is that code related to the routine
_nano_sys_clock_tick_announce() does not need the application of
typecasting.

Change-Id: I3d7374cd1a32aea7e4651726febde74ebe4ac8ac
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
Benjamin Walsh
5ce563b3f1 kernel: rename _nano_fiber_schedule()
It's not really scheduling a fiber, it's making it ready. So, rename it
to _nano_fiber_ready().

Change-Id: I34bf67a8f0ea641bb2fd1c47fe8d689fef754cb8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:53 -05:00
Benjamin Walsh
fde6458f0b sys_clock: add option for setting timer frequency at runtime
Some timer devices, such as the HPET, read their frequencies at runtime.
All global constant values must be set at runtime in that case.

Change-Id: I408babce6deb857748a87691132d7e27e88f0bb8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:53 -05:00
Benjamin Walsh
cdf8123589 sys_clock: remove global variables duplication
Some global variables were duplicated, being defined in either
k_ticker.o or nano_sys_clock.o depending on the type of kernel.
nano_sys_clock.o is always generated, so move the definitions found in
that file from inside the NANOKERNEL guard and remove them from
k_ticker.c to avoid useless duplication.

Change-Id: Iea67f89cad44b29671df7fa4d573105c0bbe3102
Signed-off-by: Benjamin Walsh <benjamin.walsh@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
e63ceae6b4 nanokernel: Move fiber_sleep() to nano_sleep.c
Change-Id: I5faaa44cf40a3d2d31a37e3b84cbef3c8dacff32
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
829967786c nanokernel: Add generic fifo routine
Adds the following generic fifo routine:
	nano_fifo_get_wait_timeout()

That routine is a convenience wrapper for invoking the task or fiber
specific implementation.

Change-Id: I9bd709ea416db834e2a0c5de81257c363e7db066
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
Anas Nashif
77ba3c3b8b kconfig: define architecture as a kconfig variable
Do not depend on environment variables and use a kconfig variable
for defining the architecture.

In addition, remove the X86_32 variable, it just duplicates X86 for
not good reason, at least until start supporting MCUs with 64bit.

Change-Id: Ia001db81ed007e6a43f34506fed9be1345b88a4b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:52 -05:00
Anas Nashif
401c4da142 kconfig: do not set default for frequency
Force setting the value in the platform kconfig instead of defaulting
to 0.

Change-Id: Iceeb6346afc4217dd09d31c28898e3693b08f781
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:48 -05:00
Benjamin Walsh
15d3ca1de6 events: add __ASSERT()s in APIs to validate event IDs
Event ID are not validated anymore against the maximum event number in
the system, since they are pointers now instead of low integers.
Validation can be useful, but only do it in a debug kernel, with no
penalty to a deployment system.

Change-Id: Ifd8dc8841892f6d19bbcb0c641a655fd0cb6ddb7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:48 -05:00
Allan Stephens
dca7f8ccca doc: Update descriptions for memory map APIs
Standardizes appearance, corrects errors, improves readability,
and fills in gaps. Also streamlines descriptions for internal APIs
that don't require the same level of detail as public APIs.

Change-Id: Ic0f8149d14a8dab5e6df28b594c9b2e17f73e7b6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:48 -05:00
Dmitriy Korovkin
f1420515a7 irq: Add flags to IRQ_CONNECT_STATIC() macro and irq_connect() function
Flags allow passing IRQ triggering option for x86 architecture.
Each platform defines flags for a particular device and then
device driver uses them when registers the interrupt handler.

The change in API means that device drivers and sample
applications need to use the new API.

IRQ triggering configuration is now handled by device drivers
by using flags passed to interrupt registering API:
IRQ_CONNECT_STATIC() or irq_connect()

Change-Id: Ibc4312ea2b4032a2efc5b913c6389f780a2a11d1
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:24:44 -05:00
Yonattan Louise
16ddcfa43d Fix kernel event logger sample for nanokernel-only systems.
This commit fixes the nanokernel sample of the kernel event logger
that shows the event messages for context switch and interrupt events.

Change-Id: I4e972adb06b81f2f548bbabe8cd6577af633001c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:43 -05:00
Peter Mitsis
9fce2a2209 Remove obsolete ctors section
Remove prototype support for C++ constructors, since it is not well
designed. Device drivers (or other application code) that requires an
automatic initialization capability should use the device initialization
macros instead.

Note: Support for C++ constructors may be re-introduced at a later date.
However, a number of issues need to be settled, such as when the
constructors are invoked and what context they run in. (Running them
during nanokernel initialization, as was previously done, is probably
not the right approach.)

Change-Id: If6d27ac16b485cb39d5ec34084e9d0f1991074f4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:43 -05:00
Benjamin Walsh
55afb68e83 x86: remove NANOKERNEL guard around nano_cpu_idle()
It can be used by some subsystems even in a microkernel.

Change-Id: I07241aab94ecf67c94dce2d05f2cd774b2a6b044
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:43 -05:00
Allan Stephens
0c8965fd99 kernel: Specify alignment of microkernel server command stack items
The microkernel server now relies on the fact that the command packets,
events, and semaphores passed to it via its command stack are 32 bit
aligned. This change explicitly ensures this alignment, rather than
leaving it to the compiler's discretion.

Change-Id: Ied7a0a0b4cc504c924520b72ef2b207b49470448
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:42 -05:00
Allan Stephens
7c4b9ce1f7 kernel: Eliminate the need for command packet sets
Revises microkernel semaphore sub-system to allow ISRs and fibers
to give a semaphore without having to define a command packet set.
The microkernel server now supports a 3rd command type on its
command stack, allowing a semaphore to be given in a similar manner
to the one used for the existing "give event" command type.

Change-Id: Ibd7fb1a77949792f72acd20a9ee304d6eabd62f7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:42 -05:00
Anas Nashif
6de1c20809 core: remove NO_ISRS feature
This option is not building and currently not supported, removing
it because there does not seem to be a use case for it.

Change-Id: Idb8ffedf83f43cffc68a01573c6f2d1a90fc40fb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:42 -05:00
Yonattan Louise
e378747706 Rename Profiler to Event Logger.
In order to have a name according to the functionality of the feature.
This commit rename any text, function and variable related with the
Profiler name to Event logger.

Change-Id: I4f612cbc7c37965c35a64f06cc3ce5e3249d90e5
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:41 -05:00
Allan Stephens
16504c27c1 kernel: Revise microkernel server's recognition of command types
Revises microkernel server command stack processing to allow the
server to support more than 2 types of commands. The lowest 2 bits
of the command now indicate the command's type:

0 - process specified command packet
1 - give specified event (from ISR or fiber)
2 - give specified semaphore (from ISR or fiber)
3 - reserved for future use

Note: Support for type 2 will be provided in a future commit.

Change-Id: I9f83f92a301fb5df3dd479b5d43b187371e11ad8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:41 -05:00
Dan Kalowsky
2a57d02400 checkpatch: warning - spacing
Change-Id: Ia63d6c9d8d3c1bd9c540a039263cb8507af82b1e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:35 -05:00
Dan Kalowsky
2a63743192 cleanup: removing NOMANUAL
The \NOMANUAL tag is a remnant from days of yore and is no longer
needed or useful.  Cleaning up the code references to this.

Change-Id: I1b8cc9c9560d1dbb711f05fa63fd23386789875c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:35 -05:00
Dan Kalowsky
72f0a1314e checkpatch: warning - unnecssary_else
Change-Id: I6cc45cfcf09448b8fc988dc56219ea7560636af4
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:35 -05:00
Daniel Leung
851c6f8f60 microkernel: introduce private event objects
This patch enables defining microkernel events within source code.
This is similar to other private kernel object patches.

The test has been modified a little bit due to the fact that
the event ID is now a memory address, instead of numeric ID.

Change-Id: Ie3c8d4f4e459d9c631e50bb242cf7a05ca8ea82c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:35 -05:00
Peter Mitsis
079a0affee Remove kernel configuration option CUSTOM_SECURITY
The Kconfig option CUSTOM_SECURITY is not used anywhere.

Change-Id: Ifac00cd1234ff9498c2f977054a902e0153b6b28
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:34 -05:00
Dan Kalowsky
827f6ba7dc checkpatch: warning - long_line
Change-Id: I7dd5645db1de00ab4bf2ca3c7a8bae906e8d9e54
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
7f9080671b checkpatch: warning - suspect_code_indent
Change-Id: I7e920e6de8f4b7a726c03c05edea3cbac69eb374
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
890cc2f1ef checkpatch: warning - line_spacing
Change-Id: I2276676142deea21cf8079449ce153f2fb887a8e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
e8563c2f97 checkpatch: error - trailing_whitespace
Change-Id: I819d13f0d7a23e3a61dcda6a3ced18810b192158
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
9760129627 checkpatch: error - open_brace
Change-Id: Ie655181d5ed11a71cadfa218f396f0b64992ca34
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
a92e48890c checkpatch: error - global_initialisers
Change-Id: Ib3f69be9f9273e57952a3ebceebc82d84c607c64
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
da67b29569 checkpatch: warning - block_comment_style
Change-Id: I6da43e41f9c6efee577b70513ec368ae3cce0144
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:33 -05:00
Dan Kalowsky
3a109b1f00 Adding in doxygen comment headers
Moving many of the functions from the old format of inline comments to
the newer doxygen format.

Change-Id: Ib0fe0d8627d7cd90219385a3ab627da8f9637d98
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:33 -05:00
Yonattan Louise
86ea4e6827 OS Awareness: Add microkernel object tracing.
Add a list for each kind of microkernel object. Add the register of
the public objects to the tracing lists in the dynamic initialization
function of sysgen.

Change-Id: I8c413812e4db0f443c9dd3a5501e0096270dc70e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Yonattan Louise
abc2c9e59d OS Awareness: Add nanokernel object tracing.
Add a list for each kind of nanokernel object. And link the object
to the list on the initialization function.

Change-Id: I7a51902a8d1b306ec50d9486e55af286127fcb1a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Dan Kalowsky
2e938481ce checkpatch: error - initialised_static
Change-Id: I8f51f861e2250c87c296b697ef5b6610ce644b34
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
0182d863cd checkpatch: error - function_without_args
Change-Id: Id020ac7eafbb20352d839565256f0bf47f7fe301
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
39063598db checkpatch: error - spacing
Change-Id: Ie6e1c43581dd4b0734625b3a4e59a4ca79619e99
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Dan Kalowsky
4518f747af checkpatch: error - trailing_whitespace
Change-Id: I9ccc8aef40de7b66e1899994e3dbc7147df61414
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:31 -05:00
Allan Stephens
83946282a9 init: Optimize device_get_binding()
Improves the efficiency of the search by doing a single pass through
all device objects, rather than searching one level at a time.
Also enhances the comments for this routine.

Change-Id: I6786f24381f03d74d8c559ccbd7aa6a37683a8b7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:30 -05:00
Allan Stephens
a860cb7bff init: Support fine-grained device initialization priorities
Introduces the SYS_DEFINE_DEVICE() macro, which supports 5 distinct
levels of device initialization and 100 priorities within each level.

Note: The existing init macros (e.g. nano_early_init()) have been
adapted to utilize the enhanced initialization model, but will
eventually be retired.

Change-Id: If677029d8b711a3fae9b2f32b5470cd97d19aeda
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:30 -05:00
Allan Stephens
f330d5adfe microkernel: Don't initialize packets in a command packet set
Reworks the internal design of a command packet set so that
the command packet array is split out into a separate variable
lying in uninitialized memory. This shrinks the command packet's
data section footprint to almost nothing.

Note: A side effect of this change is that it is no longer possible
to define a command packet set as a "static" variable since the
CMD_PKT_SET_INSTANCE() macro now generates two variables.

Change-Id: I9c7ebe637edf879758589ff4a26ace1303790bf7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:29 -05:00
Javier B Perez Hernandez
f7fffae8aa Change BSD-3 licenses to Apache 2
Change all the Intel and Wind River code license from BSD-3 to Apache 2.

Change-Id: Id8be2c1c161a06ea8a0b9f38e17660e11dbb384b
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:29 -05:00
Allan Stephens
6ac33f2b9f kernel: Introduce sys_thread_busy_wait() API
Provides a way for a fiber or task to busy wait for a specified
period of time. This is useful in situations where a delay needs
to be performed without switching execution to another context,
such as:

1) It would take longer to switch to another context and then switch
   back again than to simply busy wait.

2) A delay is required by the kernel's main task (i.e. the nanokernel's
   background task or the microkernel's idle task). This task is not
   allowed to voluntarily relinquish the CPU because this would leave
   the kernel with nothing to execute in its place.

Change-Id: Icbe28613014f659e9528893ae58f7b8008c18a61
Original-work-by: Jeff Blais <jeff.blais@windriver.com>
Further-adapted-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:28 -05:00
Anas Nashif
1dc809b23b kconfig: use zephyr as the binary name globally
do not use microkernel or nanokernel as the output binaries,
instead, use zephyr globally.

Also change the documentation to reflect this.

Change-Id: I8405761d1a0392c90cdfeec5c67d72eb4e5a76ff
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:22 -05:00
Allan Stephens
ddaebc15b3 kernel: Eliminate use of main() in microkernel
Revises microkernel initialization code by incorporating the existing
_k_kernel_init() and main() routines into _main(). This optimizes kernel
initialization a bit, and allows application code to use main()
if desired -- for example, as the entry point to an application task.
The change also eliminates the need for sysgen to generate a routine
whose content is always the same.

This change preserves the existing order of operations done during
kernel initialization, and leaves further improvements for later.

Change-Id: Ie03d8a6f38f8a311f398667ed977fd8478719d70
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:21 -05:00
Dirk Brandewie
feee30cc71 kernel: kconfig: remove CUSTOM_SECURTIY meta option
Change-Id: I6671760827aa1f0867be3f20a530ca50168ccc4b
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
f37a4fcd71 kernel: kconfig: remove dependencies on EXPERIMENTAL
Remove the hard dependencies on EXPERIMENTAL symbol. Mark all the
symbols the relied on EXPERIMENTAL as EXPERIMENTAL in their prompt

Change-Id: I2779b0ed0776b3d510a8e2e44b35b83d7ad2377c
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
65c6120902 kernel: remove obsolete config option ENHANCED_SECURITY
This option is no longer used in any configuration

Change-Id: I2f9be9f286cff3f38722ae1fe807661a1f99cdcd
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
05135ef318 kernel: remove Security options dependency on ENHANCED_SECURITY
ENHANCED_SECURITY is being used to enable security options the
projects that require security options explicitly enable these options
the dependency is not required.

Change-Id: Iec96e32bd7a5faa78672d355aad368f48b0ee087
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
b2cd0aae54 x86: change the default for ENHANCED_SECURITY to no
Change the default for ENHANCED_SECURITY to no in preparation for the
option to be removed.

Change-Id: Ic46730b187f361226064a3e205f48433b0bebdd7
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
4db419b6fa init: rename pure_core_init to pre_kernel_core_init
Change-Id: If61a5bdc9831c7375492446b02ecae513f054de4
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
f96f61d2f0 init: rename pure_early_init to pre_kernel_early_init
Change-Id: Id52cd7a5c1a715a5c609f88f940ec2e27341d81e
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
4365f02391 init: rename pure_late_init to pre_kernel_late_init
Change-Id: I9561315a892933370d60fcf36c10d38078d66233
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie
58a534b929 init: add pure_core_init level
There are devices that need are part of the architecture core the need
to be initialized prior to devices that are integrated around a core
to make up a complete SOC. Namely the interrupt controller in the SOC
must be configured in order to allow the integrated IP blocks drivers
to initialize correctly.

Change-Id: I0a91e08f98516a7b7dd402ffc6494a071f1326b2
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Jesus Sanchez-Palencia
bb91977835 Kconfig: Fix EXPERIMENTAL features dependency
Features displayed with "[EXPERIMENTAL]" should depend on
CONFIG_EXPERIMENTAL.

Change-Id: I0a86dff442014caa2fa4629138dbe29e69d5b853
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-02-05 20:24:17 -05:00
Anas Nashif
715946b67c microkernel: do not enable workload monitor by default
Do not enable the feature by default when EXPERIMENTAL features
are enabled.

Change-Id: I0538f9f94bb47a4bc870c8974e80faf273070f91
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:17 -05:00
Anas Nashif
83acfa3efb add kernel default config fragments
The files will have the needed fragments to move a .config
file to either a nano or micro kernel .config. This will let us
get rid of the micro_*_defconfig/nano_*_defconfig in the future
and once the sanitychecks are adapted leaving us with a single
fragment file per platform and thus making it easier to maintain.

Change-Id: If23b32cc259de498816ddc8be15cdd6e0014106a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Daniel Leung
8253b90cfc microkernel: add task pointer list
Due to similar padding issue as pipe, the list of task object
may not be used directly. As mentioned before, some compiler/linker
may pad the large struct. For example, compiling under gcc and
march=i686 pads the struct to 32-byte alignment (march=atom to
64-byte alignment). This causes issue with sizeof() and pointer
arithmetic because they have no idea about the padding.
When the stars align in a certain way, these task structs may be
corrupted. So add a task pointer list and use it for task
manipulation. The task list remains as it is beneficial to group
them together to take advantage of cache locality.

Change-Id: I0e86bfe05742040f4540d7854c1ac14e76162776
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:58 -05:00
Benjamin Walsh
662c3773f8 pipes: remove lingering mentions of 'remote nodes'
Change-Id: I43fe6b0ba77883e2455ecb1ff78bac7d026145c0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:36 -05:00
Benjamin Walsh
25d58d6fdb mutex: fix comments still containing the 'node' concept
Also re-indent badly indented code.

Change-Id: Ic08ce5c3b09bc0df9cc404409f871445bbb399fe
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:36 -05:00
Benjamin Walsh
0f5607a211 microkernel: rename _k_init_node() to _k_init_dynamic()
It was badly named: this routine initializes what cannot be done
statically, i.e. what has to be done dynamically.

We also do not have concepts of "node" anymore since the kernel is
single-node only.

Change-Id: Idde3183ca01ca3f70c5ae0e948734a965582ded8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:36 -05:00
Benjamin Walsh
7bfecd801b fiber: remove fiber from thread list when cancelling delayed start
When THREAD_MONITOR is enabled, not removing the fiber from the thread
list (a) would cause the list to be erroneous, and (b) would cause
corruption of the list if the fiber stack was reused to start a new
fiber (or any other usage really).

Change-Id: I622ffdbd146ec4b0e78b051d1b444fdf35efcd1e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:36 -05:00
Benjamin Walsh
7b21b2648a nano_context: allow _thread_exit() to be called from a task
Update the documentation of _thread_exit() to reflect the fact that a
task can call it if it does so with interrupts locked. A task or another
fiber cannot preempt a fiber, so a fiber can still call _thread_exit()
without locking interrupts. If a task locks interupts first then calls
it, no fiber or other task can preempt it either.

Change-Id: If8624842fc202a0917b0499458e14f95d7f461df
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:36 -05:00
Andrew Boie
7c43992f22 profiler: use new ring buffer data structure
The profiler now uses the generic ring buffer. The dropped event
count is stored in the ring buffer's value field. The data size only
refers to the extra data attached to the message and NOT any internal
representation of metadata inside the ring buffer, the event_logger
APIs now pass this information along in dedicated parameters.

Change-Id: I1f168e6a05e8d937bf86b2a4cccecbb04b0118c6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:34 -05:00
Andrew Boie
f18f102feb nanokernel: add optional ring buffer data type
This patch is based on some code contributed by Dirk Brandewie.

This is a generic data structure for queuing data in a FIFO ring
buffer. Any given data enqueued is annotated with an app-specific
type identifier, and small integral value. Use of a data pointer
is optional if the necessary information can be conveyed in the
annotations. We want all the metadata to fit in a single DWORD.
The ring buffer always contains at least one free dword in the
buffer to correctly distinguish between full and empty queues.

Concurrency control is almost nonexistent; depending on usage,
apps may want to introduce the usage of semaphores and/or mutexes
to preserve the integrity of the ring buffer or provide notifications
when data is available.

Change-Id: I860262d2afc96db4476d4c695a92f7da355ab732
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
952cd52e16 doxygen: nanokernel doxygenation
Doxegenize and cleanup headers for nanokernel
 - fibers
 - context
 - timers
 - stacks

Also minor cleanup of x86/arch.h

Change-Id: Ib65568d4ec034b69e8a6214ba4b52a7f719300bb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
4c66d11d8a doxygen: microkernel irq header doxygenation
Change-Id: Ic5beaec272970aac4fbdb442729dae3c0aed5820
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
9b8c50c9c3 doxygen: microkernel timer header doxygenation
Change-Id: Ic828f1e3a7fa19f5ce209d1f175255f4eb2d8681
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
b787b600bd doxygen: move task public api docs to header
Change-Id: Iebefc4c4fbdfe6110029cd135fcc4b8ea59d0214
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
387ec49c1e doxygen: move command_packet documentation to header
Change-Id: I27631d742127d0ea04a04330c155fd2b1e196556
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
43894ab272 typo: decribed -> described
Change-Id: I66f32a292329ea139b053e0d1f4a1aad954b664d

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
d62d1ac256 doc: document pipe API in header file
Change-Id: Ibac21c7fef5ee3a7313025aa91980cad170e5a0f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -05:00
Anas Nashif
51fe506da4 doc: document memorypool API in header file
Change-Id: I308ae6f3ae5c960b8c572a32fd6bf99573270d90
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:33 -05:00
Yonattan Louise
b34fe53414 Rename microkernel struct field 'MovedReq' to 'moved_req'.
Rename field 'MovedReq' of the struct:
- 'k_args_args' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I3ed7ad0b4fed3791b79ad279ebabf7440b8edf7c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
f1a4d3af8c Rename microkernel struct field 'Extra' to 'extra'.
Rename field 'Extra' of the struct:
- 'moved_req' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I86a0873122576486602bd18967748748f7abce12
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
f8826db0c6 Rename microkernel struct field 'Setup' to 'setup'.
Rename field 'Setup' of the struct:
- 'moved_req' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I2a3013131595b66508c7a6fb6e4b364ceb06a459
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
a743cf6c08 Rename microkernel struct field 'iTotalSize' to 'total_size'.
Rename field 'iTotalSize' of the struct:
- 'moved_req' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I2422d13699443d9744f882d566da1089943cf3db
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
4e7993961b Rename microkernel struct field 'Action' to 'action'.
Rename field 'Action' of the struct:
- 'moved_req' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I3bf9c0c8142bab4f87d0a6e2b6ffe36fa20cb026
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
09d2e31a14 Rename microkernel struct field 'Sema' to 'sema'.
Rename field 'Sema' of the struct:
- 'moved_req_args_setup' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I0cb8cab6f8f4dab2a93c4bcb0bee6c40dbbf72bc
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
0af44eb7c3 Rename microkernel struct field 'ContRcv' to 'continuation_receive'.
Rename field 'ContRcv' of the struct:
- 'moved_req_args_setup' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Ic8984aa2ed7e62c2ed7a25e825e32b2c55bb7e5d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
f6b10449c9 Rename microkernel struct field 'ContSnd' to 'continuation_send'.
Rename field 'ContSnd' of the struct:
- 'moved_req_args_setup' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I2476ad8641819431d13d99f1f55cb80efefa064d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
97eed65926 Rename microkernel struct field 'iSize' to 'size'.
Rename field 'iSize' of the struct:
- '_pipe_xfer_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I8463da22f659df7db1419195224f4fd818af1a03
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
d955d9231e Rename microkernel struct field 'ID' to 'id'.
Rename field 'ID' of the struct:
- '_pipe_xfer_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I090d0954547b80a58307a95433b59a6f5ed9ffe6
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
d2c77a92d4 Rename microkernel struct field 'pReader' to 'reader_ptr'.
Rename field 'pReader' of the struct:
- '_pipe_xfer_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Ic6f6c042bdf392c8ccbd407f57cc520fcf6f5f0e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
ad9fd3419f Rename microkernel struct field 'pWriter' to 'writer_ptr'.
Rename field 'pWriter' of the struct:
- '_pipe_xfer_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Idc2530faa4c288e9679d65f66809ceff7f7d6d59
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
cbaab8a933 Rename microkernel struct field 'XferType' to 'xfer_type'.
Rename field 'XferType' of the struct:
- '_pipe_xfer_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Id7097fa65f54e12840b5dd78eaa8991aea8e225c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
58cee9eab7 Rename microkernel struct field 'pPipe' to 'pipe_ptr'.
Rename field 'pPipe' of the struct:
- '_pipe_xfer_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I78c7343e79f25363ba0678f0d1913e5210ac4c77
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
d0e04a1883 Rename microkernel struct field 'iNbrPendXfers' to 'num_pending_xfers'.
Rename field 'iNbrPendXfers' of the struct:
- '_pipe_xfer_req_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Ie9b4743165ad27ac07e93d7bd8328aba44cf5e89
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
6aa334d333 Rename microkernel struct field 'iSizeXferred' to 'xferred_size'.
Rename field 'iSizeXferred' of the structs:
- '_pipe_xfer_req_arg' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I29ab4b7b277453f757f5964628f331e8e1bbe674
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
9b18643103 Rename microkernel struct field 'Dummy' to 'dummy'.
Rename field 'Dummy' of the structs:
- '_pipe_req_arg' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I79f7ccf1d0f790109b8337478bb203fd75052e5f
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
34ea4e2291 Rename microkernel struct field 'ReqType' to 'req_type'.
Rename field 'ReqType' of the structs:
- '_pipe_req_arg' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I3dbcb122c72509d4024f14d39eac1c28531c2ebb
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
7e671a63ef Rename microkernel struct field 'Async' to 'async'.
Rename field 'Async' of the structs:
- '_pipe_req_arg' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I44d2f72b36809b2acc1225e351bdd16bbd0322bc
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
c13eb5d478 Rename microkernel struct field 'Sync' to 'sync'.
Rename field 'Sync' of the struct:
- '_pipe_req_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Ifbc99dafd21be5f63043191a510e39a02e1b5c32
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:31 -05:00
Yonattan Louise
461ff1ed53 Rename microkernel struct field 'ReqInfo' to 'req_info'.
Rename field 'ReqInfo' of the structs:
- '_pipe_req_arg' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_xfer_req_arg' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_ack_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I48c852656acc8d9306a2a0739f805bbff0d5258c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
3e7afe8154 Rename microkernel struct field 'iSizeTotal' to 'total_size'.
Rename field 'iSizeTotal' of the structs:
- 'sync_req' in the file kernel/microkernel/include/micro_private_types.h
- 'async_req' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Ia1187bb5707a7c858903425d420fcec23380d308
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
e6352f7864 Rename microkernel struct field 'pData' to 'data_ptr'.
Rename field 'pData' of the structs:
- 'sync_req' in the file kernel/microkernel/include/micro_private_types.h
- '_pipe_xfer_req_arg' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I2759569fc716e5fa6adbc60143203e75ab201e03
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
97ea1a3c51 Rename microkernel struct field 'Params' to 'params'.
Rename field 'Params' of the struct:
- 'req_info' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I11c36baa6f0d37f106d5ecdd236ecf216e0ac32e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
c2b3ab57e6 Rename microkernel struct field 'Tail' to 'tail'.
Rename field 'Tail' of the struct:
- 'k_tqhd' in the file kernel/microkernel/include/micro_private_types.h
- 'List' in the file include/misc/lists.h

Change-Id: If857235ab6ec83fb058e0e2857a2828b8bfd308a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
9a8e20c697 Rename microkernel struct field 'Head' to 'head'.
Rename field 'Head' of the struct:
- 'k_tqhd' in the file kernel/microkernel/include/micro_private_types.h
- 'k_args' in the file kernel/microkernel/include/micro_private_types.h
- 'List' in the file include/misc/lists.h

Change-Id: Id7c2bdfc8d928ca835894acd9125c0ec96502ff0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
727e3d98d8 Rename struct field 'taskId' to 'task_id'.
Rename field 'taskId' of the struct:
- 'irq_obj_reg_arg' in the file kernel/microkernel/k_irq.c
- 'task_irq_info' in the file kernel/microkernel/k_irq.c

Change-Id: I9e2d1fb84e4c3a0a5c1b9b8fc1fa9073091faf66
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
995ef816a0 Rename microkernel struct field 'cmdPkt' to 'command_packet'.
Rename field 'cmdPkt' of the struct:
- 'cmd_pkt_set' in the file Include/microkernel/command_packet.h

Change-Id: I60b58f58d44c300387722f0a9f46fc0c83f4cf69
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
1d41758351 Rename microkernel struct field 'nPkts' to 'num_packets'.
Rename field 'nPkts' of the struct:
- 'cmd_pkt_set' in the file Include/microkernel/command_packet.h

Change-Id: I49d61060fc312d32c7840741c9295de5787d8823
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
84b88b9ab5 Rename microkernel struct field 'Free' to 'free'.
Rename field 'Free' of the struct:
- '_k_mem_map_struct' in the file include/microkernel/base_api.h

Change-Id: I80362df263d22c786cb0c6c856069394a391e290
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
6f90cce65e Rename microkernel struct field 'iBufferSize' to 'buffer_size'.
Rename field 'iBufferSize' of the struct:
- '_k_pipe_struct' in the file include/microkernel/base_api.h

Change-Id: I0e0078b2b521cdfb40e42b915a0b79d621edcccc
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
c7574b1a26 Rename microkernel struct field 'ReadMarkers' to 'read_markers'.
Rename field 'ReadMarkers' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I05daa841f6b256079e6102c2da86488c7962a065
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
e3b5e16ba5 Rename microkernel struct field 'WriteMarkers' to 'write_markers'.
Rename field 'WriteMarkers' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I586e3fbb871b254c125908f1f042ca83d7c2a3bf
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
0c96244667 Rename microkernel struct field 'BuffState' to 'buffer_state'.
Rename field 'BuffState' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I8a0c4e6d7ae3a06b7e6b27777fd7e8c4fb1513e0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
cf8471a957 Rename microkernel struct field 'bReadWA' to 'wrap_around_read'.
Rename field 'bReadWA' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I92f3b560c7cc0104afeb44b65f80fcda8d89206d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
ccd7801c5f Rename microkernel struct field 'bWriteWA' to 'wrap_around_write'.
Rename field 'bWriteWA' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I9ae1bbd0561a3cb95251a021b90c7230cfad1fd7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
09d7ce554e Rename microkernel struct field 'iNbrPendingWrites' to 'num_pending_writes'.
Rename field 'iNbrPendingWrites' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: Id2edba8217e652d2ae741819d33ced2986d4d1a8
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
a16f8e3b4b Rename microkernel struct field 'iAvailDataAWA' to 'available_data_post_wrap_around'.
Rename field 'iAvailDataAWA' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I93aff3b834b4959f48eea36ea5e6764e67175400
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
eeace5aa8f Rename microkernel struct field 'iAvailDataCont' to 'available_data_count'.
Rename field 'iAvailDataCont' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: Id2a45f9f838fdc557bfbecbe0a492f95a34517a7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
9c220d0040 Rename microkernel struct field 'iNbrPendingReads' to 'num_pending_reads'.
Rename field 'iNbrPendingReads' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I01b28e1286e7d6cb89efe53826807c6793b3976b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
f16f43a6a6 Rename microkernel struct field 'iFreeSpaceAWA' to 'free_space_post_wrap_around'.
Rename field 'iFreeSpaceAWA' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I8a55d3f0012cbeca4caa4d92024525ede865201f
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
57bc635397 Rename microkernel struct field 'iFreeSpaceCont' to 'free_space_count'.
Rename field 'iFreeSpaceCont' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: Icc9da1162f594349799e3503eafad29d8a2e52a2
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
51ecb6f1a9 Rename microkernel struct field 'pReadGuard' to 'read_guard'.
Rename field 'pReadGuard' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I8b55d53b1ca85e828a4907d15b556f8875aa40bd
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
df2295a557 Rename microkernel struct field 'pWriteGuard' to 'write_guard'.
Rename field 'pWriteGuard' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I71e615342a800a62612f47b365260fe3bc3d27fd
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
315c040044 Rename microkernel struct field 'pRead' to 'read_ptr'.
Rename field 'pRead' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Also rename variable instances related to this struct field.

Change-Id: I3fdc8d0c3774b29227d65e33dbd74aabef8df172
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
a9b08dbf94 Rename microkernel struct field 'pWrite' to 'write_ptr'.
Rename field 'pWrite' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Also rename variable instances related to this struct field.

Change-Id: I6b344f5b58e8ce83505016a240e99142d0720d6e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
8dcda075e6 Rename microkernel struct field 'pEndOrig' to 'original_end_ptr'.
Rename field 'pEndOrig' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I7a05f3e43ae7942455eb05093f7a0a66585163b6
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
7b1ccbd5b8 Rename microkernel struct field 'pEnd' to 'end_ptr'.
Rename field 'pEnd' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I858e22e7ecf77de123b93560e3b9ec99c7bb7365
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
d82ffa5194 Rename microkernel struct field 'pBegin' to 'begin_ptr'.
Rename field 'pBegin' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: I6567e66cc891d052b3c7faa26b23b41dba8430a5
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
a702a41e0c Rename microkernel struct field 'iBuffSize' to 'buffer_size'.
Rename field 'iBuffSize' of the struct:
- '_k_pipe_desc' in the file include/microkernel/base_api.h

Change-Id: Ife173a65051fecaaa652935b888b9b7921bd75f8
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:30 -05:00
Yonattan Louise
2b4857fb70 Rename microkernel struct field 'aMarkers' to 'markers'.
Rename field 'aMarkers' of the struct:
- '_k_pipe_marker_list' in the file include/microkernel/base_api.h

Change-Id: I47477bed8cb417c10e34ea412e3823db461df694
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
1a9f2b2942 Rename microkernel struct field 'iAWAMarker' to 'post_wrap_around_marker'.
Rename field 'iAWAMarker' of the struct:
- '_k_pipe_marker_list' in the file include/microkernel/base_api.h

Change-Id: I90936fb6744812462ddb56959a106bae80285a21
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
5275e011ff Rename microkernel struct field 'iLastMarker' to 'last_marker'.
Rename field 'iLastMarker' of the struct:
- '_k_pipe_marker_list' in the file include/microkernel/base_api.h

Change-Id: Id1db9432b6ddeaa46877f395e46bd81d17c05d19
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
e4daa37572 Rename microkernel struct field 'iFirstMarker' to 'first_marker'.
Rename field 'iFirstMarker' of the struct:
- '_k_pipe_marker_list' in the file include/microkernel/base_api.h

Change-Id: Ia25fcbf11ad4d842c19e495e345daff53f42a7a7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
9f212f8cf4 Rename microkernel struct field 'iNbrMarkers' to 'num_markers'.
Rename field 'iNbrMarkers' of the struct:
- '_k_pipe_marker_list' in the file include/microkernel/base_api.h

Change-Id: I5634e2ac1507974f29183bc00011bc25f8d2ab0c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
3504f49e48 Rename microkernel struct field 'Next' to 'next'.
Rename field 'Next' of the structs:
- '_k_pipe_marker' in the file include/microkernel/base_api.h
- 'Elem' in the file include/misc/lists.h

Change-Id: Id0155d61f1fc607c012d6ddc0d27cfcb6c966c47
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
322f8d12b9 Rename microkernel struct field 'Prev' to 'prev'.
Rename field 'Prev' of the structs:
- '_k_pipe_marker' in the file include/microkernel/base_api.h
- 'Elem' in the file include/misc/lists.h

Change-Id: I64da601298199cf9b1da6ae10d697e5bdfabdc32
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
1e0e132bc0 Rename microkernel struct field 'bXferBusy' to 'buffer_xfer_busy'.
Rename field 'bXferBusy' of the struct:
- '_k_pipe_marker' in the file include/microkernel/base_api.h

Also rename variable instances related to this struct field.

Change-Id: Ib945778ac62094d2d513250e307bf159d640e05c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
28349e6114 Rename microkernel struct field 'Hmark' to 'high_watermark'.
Rename field 'Hmark' of the structs:
- '_k_fifo_struct' in the file include/microkernel/base_api.h
- '_k_mem_map_struct' in the file include/microkernel/base_api.h

Change-Id: I13be24d3c3654afd5fa1723a32024d0e139a1e80
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
32aecd2818 Rename microkernel struct field 'Nused' to 'num_used'.
Rename field 'Nused' of the structs:
- '_k_fifo_struct' in the file include/microkernel/base_api.h
- '_k_mem_map_struct' in the file include/microkernel/base_api.h

Change-Id: I698b64366fcb5ead77edfd067ddb96d16f1f179b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
65045271d8 Rename microkernel struct field 'Deqp' to 'dequeue_point'.
Rename field 'Deqp' of the struct:
- '_k_fifo_struct' in the file include/microkernel/base_api.h

Change-Id: I844b8f3f6d0f1f337856d3e1805f4d6cb1d29042
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
474a6a36af Rename microkernel struct field 'Enqp' to 'enqueue_point'.
Rename field 'Enqp' of the struct:
- '_k_fifo_struct' in the file include/microkernel/base_api.h

Change-Id: I182a8be82088b808f8ccedcf76deec249cd4d2c0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
48b22f169d Rename microkernel struct field 'Endp' to 'end_point'.
Rename field 'Endp' of the struct:
- '_k_fifo_struct' in the file include/microkernel/base_api.h

Change-Id: I83c351cb8a0e33c8a0e49adb63307c2cd71f5395
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
5e9b9214d9 Rename microkernel struct field 'Base' to 'base'.
Rename field 'Base' of the structs:
- '_k_fifo_struct' in the file include/microkernel/base_api.h
- '_k_mem_map_struct' in the file include/microkernel/base_api.h

Change-Id: Id21c01e26c8cad7b6b5ba350b6c9f5d5b78acaae
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
82136f8c0b Rename microkernel struct field 'Esize' to 'element_size'.
Rename field 'Esize' of the structs:
- '_k_fifo_struct' in the file include/microkernel/base_api.h
- '_k_mem_map_struct' in the file include/microkernel/base_api.h

Change-Id: If9a6636cb9dc637e62e8dd5335923ad5067cde5a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
612baae6ed Rename microkernel struct field 'Confl' to 'num_conflicts'.
Rename field 'Confl' of the struct:
- '_k_mbox_struct' in the file include/microkernel/base_api.h

Change-Id: Ibfcfc933492af947950baf2b89ac25ea6671b749
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
8c7a2db328 Rename microkernel struct field 'Count' to 'count'.
Rename field 'Count' of the structs:
- '_k_mbox_struct' in the file include/microkernel/base_api.h
- '_k_mutex_struct' in the file include/microkernel/base_api.h
- '_k_sem_struct' in the file include/microkernel/base_api.h
- '_k_fifo_struct' in the file include/microkernel/base_api.h
- '_k_pipe_struct' in the file include/microkernel/base_api.h
- '_k_mem_map_struct' in the file include/microkernel/base_api.h
- 'pool_block' in the file kernel/microkernel/include/micro_private_types.h
- 'evstr' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I85c0c36f89f8189dedb242189ceb1decd8bffcfb
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
1de74fb559 Rename microkernel struct field 'Waiters' to 'waiters'.
Rename field 'Waiters' of the structs:
- '_k_mutex_struct' in the file include/microkernel/base_api.h
- '_k_sem_struct' in the file include/microkernel/base_api.h
- '_k_fifo_struct' in the file include/microkernel/base_api.h
- '_k_mem_map_struct' in the file include/microkernel/base_api.h

Change-Id: I32db6d6213d8a3677c361f7542fdfd5444030c8a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
375939d1cd Rename microkernel struct field 'Level' to 'level'.
Rename field 'Level' of the struct:
- '_k_mutex_struct' in the file include/microkernel/base_api.h
- '_k_sem_struct' in the file include/microkernel/base_api.h

Change-Id: Iec966b3973db05d37a32b24a2bc546a36bc27b3c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
92de544c28 Rename microkernel struct field 'OwnerOriginalPrio' to 'original_owner_priority'.
Rename field 'OwnerOriginalPrio' of the struct:
- '_k_mutex_struct' in the file include/microkernel/base_api.h

Change-Id: I7c9f8c9626567dba19a7e1ef593744d50c7f62c4
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
f51a979ef4 Rename microkernel struct field 'OwnerCurrentPrio' to 'current_owner_priority'.
Rename field 'OwnerCurrentPrio' of the struct:
- '_k_mutex_struct' in the file include/microkernel/base_api.h

Change-Id: I31066ea24872a0de8ae7a01ed13b0b85c61637ac
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
4484a85683 Rename microkernel struct field 'Owner' to 'owner'.
Rename field 'Owner' of the struct:
- '_k_mutex_struct' in the file include/microkernel/base_api.h

Change-Id: I05ac935b7ee8d87fd6cbbafc2cab2386305b455c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
cd8d5f445e Rename microkernel struct field 'Readers' to 'readers'.
Rename field 'Readers' of the struct:
- '_k_mbox_struct' in the file include/microkernel/base_api.h
- '_k_pipe_struct' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Id8b225d05658127eb4254b47dbf7eb04a9a2e2a2
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
85f442f781 Rename microkernel struct field 'Writers' to 'writers'.
Rename field 'Writers' of the struct:
- '_k_mbox_struct' in the file include/microkernel/base_api.h
- '_k_pipe_struct' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I3921be133d137e53b9473072e585710233c4d828
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
13d583dc06 Rename microkernel struct field 'Args' to 'args'.
Rename field 'Args' of the struct:
- 'k_proc' in the file include/microkernel/base_api.h
- 'k_args' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I5847a2f1e9c7dd34dea37857b4fadeb37ced489b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
3d0f283cb9 Rename microkernel struct field 'fabort' to 'fn_abort'.
Rename field 'fabort' of the struct:
- 'k_proc' in the file include/microkernel/base_api.h

Also rename variable instances related to this struct field.

Change-Id: I9523a567b23c578e73c20810e33a15ba733ba238
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
71da62594c Rename microkernel struct field 'fstart' to 'fn_start'.
Rename field 'fstart' of the struct:
- 'k_proc' in the file include/microkernel/base_api.h

Also rename variable instances related to this struct field.

Change-Id: Ic9750c0bcaefd1dcedfefe94b8cdd31519ab5249
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
36d55187f2 Rename microkernel struct field 'Group' to 'group'.
Rename field 'Group' of the struct:
- 'k_proc' in the file include/microkernel/base_api.h

Change-Id: I0d83ec7e82c67a7c2c37df8bb0a5d83b2109a8ed
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
839c84666f Rename microkernel struct field 'State' to 'state'.
Rename field 'State' of the struct:
- 'k_proc' in the file include/microkernel/base_api.h

Change-Id: I545ad7fa0a9b1f100dfb9a639e6730bee5d30905
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:29 -05:00
Yonattan Louise
617501354c Rename microkernel struct field 'Ident' to 'id'.
Rename field 'Ident' of the struct:
- 'k_proc' in the file include/microkernel/base_api.h

Change-Id: Iec787e0a8aa1791c968b371017cf96211a60cef1
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Yonattan Louise
de4d3b51fc Rename microkernel struct field 'Prio' to 'priority'.
Rename field 'Prio' of the structs:
- 'k_proc' in the file include/microkernel/base_api.h
- 'Elem' in the file include/misc/lists.h b/include/misc/lists.h

Change-Id: I2fd6966af29b998a3849bcabc5cfee110e76202c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Yonattan Louise
09067bbe5b Rename microkernel struct field 'Back' to 'prev'.
Rename field 'Back' of the structs:
- 'k_proc' in the file include/microkernel/base_api.h
- 'k_timer' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I0c7cec34ec64462f85f43f8da4e61d4a651ac14e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Yonattan Louise
a896d2f859 Rename microkernel struct field 'Forw' to 'next'.
Rename field 'Forw' of the structs:
- 'k_proc' in the file include/microkernel/base_api.h
- 'k_timer' in the file kernel/microkernel/include/micro_private_types.h
- 'k_args' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: Ie45a71943dca9cb16b53bbc345d1ea16f8d7c50b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Yonattan Louise
d4a5054a3f Rename microkernel struct field 'poolid' to 'pool_id'.
Rename field 'poolid' of the struct:
- 'kmemory_pool_t' in the file kernel/microkernel/include/micro_private_types.h

Change-Id: I96466891ed2efca8c06bd94b40d15bd478d0de33
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Yonattan Louise
5c6ef8fdb5 Profile low condition events.
Add the sleep events point for x86 and ARM arquitectures that gives
information about when the CPU went to sleep mode, when it woke up
and which interrupt causes the CPU to awake.

Change-Id: Iaa06a678eab661357d084ee1f79c4cfcf19bf85d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Yonattan Louise
d2108bf084 Profile interrupt events.
Add the interrupt profile points for x86 and ARM arquitectures. This
gives information regarding the time when interrupts occur.

Change-Id: Ic876c0e7f9e8819d53e0578416f09146f4456d3d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:28 -05:00
Benjamin Walsh
bb2ba33f10 sys_clock: move [nano|task]_cycle_get_32 to drivers
The drivers provide _sys_clock_cycle_get(): moving the public APIs to
the drivers allow them to be aliases of it.

Change-Id: Ic5975a048f2b51f94510f0c3cd5e6ab3a8907718
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
1611816a7d sys_clock: move header of nano_cycle_get_32 to nanokernel.h
Change-Id: I9c33e46a6142f26633ba4e5812c288ef470cceaa
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
87eeaa3249 sys_clock: rename timer_read to _sys_clock_cycle_get
Follow coding conventions.

Change-Id: I3ca5d1cf4eaacfc09d5e8c44c49be447549537c8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
fe40133cd5 sys_clock: move API headers from k_ticker.c to ticks.h
Change-Id: Ia8d740df08d3bc5ac8857ca87272360375945c7f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
70540142a9 microkernel: re-institute CONFIG_OBJECT/THREAD_MONITOR
These two were dropped during the conversion to Kbuild.

NOTE: THREAD_MONITOR was originally called CONTEXT_MONITOR.

Change-Id: Id17f51ee5848a9c9aea3cd3c5aa963492efdf4a8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
2d12752637 sys_clock: make public some timing utilities
Make these public:

  - SECONDS(x): macro that gives the number of ticks in x seconds
  - MSEC(x): macro that gives the number of ticks in x milliseconds
  - MSEC_PER_SEC: number of milliseconds per second
  - USEC_PER_MSEC: number of microseconds per millisecond

Change-Id: Ic5dbf9349651a477b066edb0c6b6721da2b7e5bb
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
0dcad8331b clarify use of term 'context'
The term 'context' is vague and overloaded. Its usage for 'an execution
context' is now referred as such, in both comments and some APIs' names.
When the execution context can only be a fiber or a task (i.e. not an
ISR), it is referred to as a 'thread', again in comments and everywhere
in the code.

APIs that had their names changed:

  - nano_context_id_t is now nano_thread_id_t
  - context_self_get() is now sys_thread_self_get()
  - context_type_get() is now sys_execution_context_type_get()
  - context_custom_data_set/get() are now
    sys_thread_custom_data_set/get()

The 'context' prefix namespace does not have to be reserved by the
kernel anymore.

The Context Control Structure (CCS) data structure is now the Thread
Control Structure (TCS):

  - struct ccs is now struct tcs
  - tCCS is now tTCS

Change-Id: I7526a76c5b01e7c86333078e2d2e77c9feef5364
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
eca929daee microkernel: rename K_CREF.proc to 'task'
Remove last remaining legacy naming of 'proc' from the kernel's symbols.

Change-Id: Ide4ff3d06a74c5e6178c01e62a719e81709935c2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
8276c32e7c microkernel: rename K_CREF.task to 'task_id'
This will allow renaming K_CREF.proc to 'task'. It also is really
representing a task ID, i.e. the value a user passes to microkernel
APIs.

Change-Id: If2dd3f1ed5ce93178acd4713ad5497e5b3e0401d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Benjamin Walsh
bed144b179 microkernel: rename k_proc to k_task
k_proc was a legacy leftover that does not make any sense, since there
is no concept of a "process" in the system. Rather, that data structure
refers to a 'task control block', i.e. the representation of a task
execution context from the microkernel's point-of-view (not to confuse
with the 'struct ccs', the representation of a thread execution context,
from the nanokernel's point-of-view).

Change-Id: Ic29db565af023be629ce740bbcb652ece7dc359f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Dmitriy Korovkin
1bd6c831ee Fix kernel server argument alignment
The stucture elements neet to me 32-bit aligned for ARM platform.

Change-Id: I269753cbfec5e45880833e1fc036921a0f274d23
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:15:25 -05:00
Benjamin Walsh
1bab46dca1 ffs: rename find_[first|last]_set to find_[lsb|msb]_set
The new names reflect better what the functions do: they find the first
bit set starting from the least or most significant bit, i.e. they find
the least or most significant bit set, in a 32-bit word.

Change-Id: I6f0ee4b543f6f37c2f08f7067e14e039c92a6f6a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:25 -05:00
Benjamin Walsh
c4ad73d3b6 ffs: do not use _inline versions of find_[first|last]_set
Standardize on using the find_[first|last]_set (non-inline) symbols
everywhere.

The non-inline versions provide absolutely no benefits, so they will be
removed in a subsequent commit, and the inline versions will have their
_inline suffix removed.

Change-Id: I5b3dee33ffe3878a05e1bb3c6400a8d8c1640ad4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:25 -05:00
Benjamin Walsh
6469e578cb irq: do not use _inline versions of irq_lock/unlock
Standardize on using the irq_lock/irq_unlock (non-inline) symbols
everywhere.

The non-inline versions provide absolutely no benefits, so they will be
removed in a subsequent commit, and the inline versions will have their
_inline suffix removed.

Change-Id: Ib0b55f450447366468723e065a60adbadf7067a9
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
a73af53186 timers: prevent duration of 0 in timer_start/restart
Basically, this does not work anymore:

  task_timer_start(<timer>, 0, X, <sem>);

since it does not make much sense to have a timer with an expiry of 0
ticks. The code internally was setting the duration to be equal to the
period anyway. So, to achieve the same behaviour, do this:

  task_timer_start(<timer>, X, X, <sem>);

This has the positive side-effect of removing a small block of logic
that was handling the cases where duration was 0.

Change-Id: Ic4af4a17a129f14af4fea445bcaddabe89c27131
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
b8693ad72b timers: consolidate task_timer_start/restart()
They use the same logic and _k_server handler, so only have one
implementation of the user-facing API.

Instead of using ENDLIST, create a new internal _USE_CURRENT_SEM symbol
that reflects what the implementation is doing.

Change-Id: I5c50efd15f4e97b778b4b5efd5ec931384a8631f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
a5a6ba8e4e microkernel: rename _k_server parameters
Reflect the fact that they are not used.

Change-Id: I6ea83cb2c7532e10988cbf4350edccb78f444328
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
aa78793e40 microkernel: rename K_swapper to _k_server
Align with the newer terminology used for microkernel internal symbols.

Change-Id: I623b383f90d9e37a49429a79774c7f7a4953bd5f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
c1f9fd888d irq: make utility functions private
irq_handler_set, irq_priority_set and irq_disconnect have been made
private by prepending an underscore to their names:

	irq_handler_set -> irq_handler_set
	irq_priority_set -> irq_priority_set
	irq_disconnect -> irq_disconnect

The prototypes have been removed from header files when possible, and
extern statements used in C code where they were called.

_irq_priority_set() for ARM is still in the header file because
IRQ_CONFIG() relies on it.

Change-Id: I2ad585f8156ff80250f6d9eeca4a249a4477fd9d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
a34afe9b61 events: remove checks for valid events in service handlers
Doing those checks went against the Zephyr philosophy of no error
checking unless absolutely necessary. Users should ensure themselves the
validity of their inputs to kernel APIs.

Change-Id: I21e5cd07ff9424ad61e81fd9d52ceef0c9584a8c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
751c765079 events: rename task_event_set_handler()
task_event_set_handler -> task_event_handler_set

Align with the "verb at the end" convention.

Change-Id: I8b72d41a20a7fdd4756f90765682e317289a241b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
87564a4602 pipes/mailboxes: rename functions using mem blocks
task_pipe_put_async -> task_pipe_block_put

  task_mbox_put_async -> task_mbox_block_put

  task_mbox_data_get_async_block -> task_mbox_data_block_get
  task_mbox_data_get_async_block_wait -> task_mbox_data_block_get_wait
  task_mbox_data_get_async_block_wait_timeout ->
       task_mbox_data_block_get_wait_timeout

Previous names, focusing on 'async', were misleading, because:

- some of those APIs can be used synchronously as well
- other APIs can also do asynchronous transfer, and don't have 'async'
  in their names
- the key concept of these APIs is that they use memory pool blocks
  rather than raw data buffers.

Change-Id: I0c08a6cf950ab23bb4172ce25eb6f9886b037649
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Yonattan Louise
520542bef2 Add context switch profile point.
Add the context switch profile point for x86 and ARM arquitectures.

Change-Id: Ib7205059104ed47b96ba75b8cfefec3ff35f6813
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Yonattan Louise
efd8e246cc Add profiler method.
Add a standardized mechanism to add profiling points to the Kernel
with a single interface for the user to collect the profiling data.

Change-Id: I4fa34ac1b42f73a73ba1fd805e755ee2fd00dff7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Yonattan Louise
8c85c15a2f Add event logger.
Add a log event tool with a single interface for the user to
add/collect the event log data.

Change-Id: Ia4b78836748c5d7e44ba1bdd50c28434e8a55d65
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Anas Nashif
0a7ff3b461 doxygen: move nanokernel fiber comments to header
Fix documentation to link to autogenerated API entries.

Change-Id: I0355435c189bff17c4468b1f300dcffcce73e51d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
c963861d47 Remove PIC code, but not PIC disabling code
Removes the non-PIC disabling PIC code as the PIC is not a supported interrupt
controller.  The PIC disabling code remains as it is needed to prevent the
generation of spurious interrupts from the PIC (see CONFIG_SHUTOFF_PIC).

Change-Id: Ic59aa17ab96f34685a5d7b5f24cab391de47edca
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Daniel Leung
201aa8c708 microkernel: put memory map pointers into its own binary section
The _k_mem_map_list was a static array generated by sysgen,
where it containing all pre-defined memory maps from MDEF file.
To support private memory map objects (aka, defining them within
source files), the list has to accommodate memory maps that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all memory
map pointers go into this section. By doing this, the list
can still be manipulated as an array.

Change-Id: I1f3414b72f685fef4b99850749178661f14d9345
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
a77808462e Redefine microkernel memory map object identifier type
The opaque memory map object id type is now a pointer to
the associated memory map structure, rather than an index
into the microkernel's array of memory map structures.

This change is a pre-requisite to support for private
memory map objects, which are defined in source code.

Change-Id: I82ecb59eeed00efa54f781f775710c92ff9c9fc9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
815d64522f microkernel: put pipe pointer list into its own binary section
The _k_pipe_list was a static array generated by sysgen,
where it containing all pre-defined pipes from MDEF file.
To support private pipe objects (aka, defining pipes within
source files), the pipe list has to accommodate pipes that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all pipe
pointers go into this section. By doing this, the pipe list
can still be manipulated as an array. The reason behind
putting the pointers to pipe, instead of the pipe objects
themselves, is that some compiler/linker may pad the large pipe
struct. For example, compiling under gcc and march=i686 pads
the struct to 32-byte alignment (march=atom to 64-byte alignment).
This causes issue with sizeof() and pointer arithmetic because
they have no idea about the padding. So use pointers here to
prevent padding.

Change-Id: I6d3b75614c4d8760c037a5c26746410d4e4b17cb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
2285976f03 microkernel: redefine pipe object identifier type
The opaque pipe object id type is now a pointer to
the associated pipe structure, rather than an index
into the microkernel's array of pipe structures.

This change is a pre-requisite to support for private
pipes, which are defined in source code.

This also moves the required struct into more visible
headers such that private pipes can be declared.
Renaming the struct is also being done to conform to
naming convention for private kernel objects.
Since a couple structs have to be moved anyway, so
do the moving and renaming here too (contrary to what
have been done in the past, with separated patches).

Change-Id: Ibb6ec7f62745a81439ae3ea2616688b757439843
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
75e5427e15 microkernel: put _k_task_list into its own binary section
The _k_task_list was a static array generated by sysgen,
where it containing all pre-defined tasks from MDEF file.
To support private task objects (aka, defining tasks within
source files), the task list has to accommodate tasks that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all task
objects go into this section. By doing this, the task list
can still be manipulated as an array, which is required for
task group operation.

Change-Id: I799d6967567079498bc414e0cb809e8af856b53e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
1367a98e9e Redefine microkernel task object identifier type
The opaque task object id type is now a pointer to
the associated task structure, rather than an index
into the microkernel's array of task structures.

This change is a pre-requisite to support for private
task objects, which are defined in source code.

Change-Id: Idb53ea7f8a8a5b7e6477a74273930b08fc77dcfe
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
c290ebaebd Redefine microkernel timer objects identifier type
The opaque timer object id type is now a pointer to
the associated timer structure, rather than an index
into the microkernel's array of timer structures.

This is simply to be consistent with other microkernel
objects, such as semaphore, mutex, and mailbox.

Change-Id: If803e22ae450d4ef28e81e8a5f2451b9c26c6dce
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
105e723faa microkernel: Rename struct mbx_struct to _k_mbox_struct
This is in preparation to enable private mailbox support.
The struct needs to be moved into more visible header
so private mailboxes can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: Ibd75497e726efd447d27f3bfd0b4695ed1695693
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
09387cc9dd Redefine microkernel mailbox object identifier type
The opaque mailbox object id type is now a pointer to
the associated mailbox structure, rather than an index
into the microkernel's array of mailbox structures.

This change is a pre-requisite to support for private
mailboxes, which are defined in source code.

Change-Id: Ide832eee2a0762e601847ad07afba380bd79ed8b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
e27b5c9abf microkernel: Rename struct que_struct to _k_fifo_struct
This is in preparation to enable private FIFO support.
The struct needs to be moved into more visible header
so private FIFOs can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: I9b90ddccbaf01ff8c7e2ef03c926d0328dd7ec39
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
ef242d3291 Redefine microkernel FIFO object identifier type
The opaque FIFO object id type is now a pointer to
the associated FIFO structure, rather than an index
into the microkernel's array of FIFO structures.

This change is a pre-requisite to support for private
FIFOs, which are defined in source code.

Change-Id: Ieb1343d6d5dd1b747063603457d47fab2710f557
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
1036aee613 microkernel: Rename struct sem_struct to _k_sem_struct
This is in preparation to enable private semaphore support.
The struct needs to be moved into more visible header
so private semaphores can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: I84ac7d580404ac5e1753c1bd446d38993fd23310
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
013666c964 Redefine microkernel semaphore object identifier type
The opaque semaphore object id type is now a pointer to
the associated semaphore structure, rather than an index
into the microkernel's array of semaphore structures.

This change is a pre-requisite to support for private
semaphores, which are defined in source code.

Change-Id: I3821360be35237bfe3bf090efce84f99e335d309
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung
43eed86737 microkernel: Rename struct mutex_struct to _k_mutex_struct
This is in preparation to enable private mutex support.
The struct needs to be moved into more visible header
so private mutexes can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: Ifccb60a837b44e443be0b091c2df4f06373718fe
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Allan Stephens
ffd802250e Redefine microkernel mutex object identifier type
The opaque mutex object id type is now a pointer to the associated
mutex structure, rather than an index into the microkernel's
array of mutex structures.

This change is a pre-requisite to support for private mutexes
(i.e. mutexes not defined using a project's MDEF file).

[DL: fix some whitespace issues.]

Change-Id: Ida419f1674df245f51a36d28ca7d4631239f1edd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Daniel Leung
74c8852d05 microkernel: remove kernel service dispatch table
This change removes the internal number-to-function mapping
of microkernel services. Instead, function pointers are used
to specify which service to use.

This is in preparation for private kernel objects. Before this,
only kernel objects that are defined in MDEF files would have
corresponding functions included in the final binary, via sysgen
by populating an array of number-to-function mapping. This
causes an issue when a certain type of objects are all defined
with source code, and never in MDEF file. The corresponding
mapping would be deleted, and the functions are never included
in the binary. For example, if no mutexes are defined in MDEF
file, the _k_mutex_*() functions would not be included.

With this change, any usage of private kernel objects will hint
to the linker that those functions are needed, and should not be
removed from final binary.

Change-Id: If48864abcd6471bcb7964ec00fe668bcabe3239b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Dmitriy Korovkin
28af7ae1d1 Fix microkernel "unaligned write" exception problem on ARM
Fix the structure members alignment to avoid problems
when GCC allocates 1 byte for a member of enum type.

Change-Id: I9f28c72d2e5359216ada921d4d5ce32d55cbdd45
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:42 -05:00
Peter Mitsis
d2857404f5 Kconfig: fix SYS_CLOCK_HW_CYCLES_PER_SEC dependencies
Fixes the SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig option dependencies such that
it can be overridden by a modified platform configuration file.  This is
particularly important for the LOAPIC timer driver as
SYS_CLOCK_HW_CYCLES_PER_SEC is dependent upon the target's CPU/bus frequency.

Change-Id: I0fb49b4c540888cb1988c76e2a711a85e756f82c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:42 -05:00
Juan Manuel Cruz
d51ed25f79 Doxygen: Nanokernel semaphore APIs comments to header files.
This commit moves the comments from the nano_sema.c file to the
nanokernel.h file.

Change-Id: Ia1d517da38807d096b349331da72c9c4a81fb44e
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:42 -05:00
Anas Nashif
abeaeacab0 Kconfig: TICKLESS_IDLE_UNSUPPORTED is not used
Change-Id: Id6767a0d6b04eea6b76065d4792245b57fb0a657
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Rodrigo Caballero
fbf9fb3963 Doxygen: Moves the nanokernel LIFO comments from the .c to the .h file.
Moves the nanokernel LIFO in-code comments to the .h file. The comments
were changed to the Javadoc Doxygen format. A comment per alias was
created based on the original comment.

Change-Id: Iacd6bf1136ceac439d05669ef51cf28b858b306b
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
e6b8bc6477 Remove obsolete kernel references to BSP
BSP terminology is obsolete.

Change-Id: Ic23688fbaaf88e037e184c8bbfc7aaa0ba997b31
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis
e2e68d3b9f Update comments in ctors.c
Updates the comments in ctors.c to more accurately reflect the current
state of constructors.

Change-Id: I8bea13ac9b56b4d7c6ce793f175666506fffa446
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Javier B Perez Hernandez
65c225dae8 Doxygen: microkernel: Move event documentation from c to .h file
Move the comments from k_event.c file to event.h. Only external API information was moved.
Minor changes to adapt comments and parameters.

Change-Id: I05124fc48720105a246826c94f3f21a6e30d6043
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:14:39 -05:00
Juan Manuel Cruz
ba56372083 Doxygen: Microkernel semaphore APIs comments to header files.
This commit moves the comments from the k_semaphore.c file to the
semaphore.h and kernel_main.h files.

Change-Id: Ica86945e738f1f61b8ed216981bce55351029645
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:38 -05:00
Yonattan Louise
2a763a155a doxygen: memory_map: update in-code documentation
Adds documentation to the header files for memory map
adopting javadoc style.

Change-Id: I25ba2b938ea7dc490af97899b4eb10d16351739a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:14:38 -05:00
Rodrigo Caballero
b7def368ba Doxygen: Move the microkernel FIFO APIs comments to the .h file.
Moves the comments from the k_fifo.c to the fifo.h file. Only the
external API information was moved. Minor edits were performed to adapt
the comments to different parameters and aliases.

Change-Id: I69d2d009f7ec6390e0a2fc9d6a346ddc0111f9f1
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:38 -05:00
Rodrigo Caballero
71f8c6578a Doxygen: Move nanokernel FIFO comments from .c to .h file.
Moves the comments of the nanokernel FIFO external APIs from nano_fifo.c
to nanokernel.h.

Change-Id: Ic31e6da8a2f7a4099adc2e847d237b5a73787a23
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis
dfff7463d8 pipe: Fix stray reference to ChBuff
The ChBuff structure no longer exists; it was previously changed to pipe_desc.

Change-Id: Ife72db4a186db1d3af447141fefb47f2136b544f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis
77f1fee705 pipe: Fix stray reference to K_ProcWR()
The routine K_ProcWR() no longer exists; it was previously changed to
pipe_read_write().

Change-Id: If084a45a8593cfe988ee5db0507695ec2191b409
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis
b037c692bb pipe: Rename CHECK_CHBUFF_POINTER() macro
Renames CHECK_CHBUFF_POINTER() macro to CHECK_BUFFER_POINTER() to remove
references to obsolete "channel" terminology.

Change-Id: I3154e7af04cc9afa8b935ddf61555c15c7d2659d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Allan Stephens
cca9dfea44 Remove references to defunct _ContextUsrEntryRtn()
This function no longer exists.

Change-Id: I8e4a41b0556e1178b96c64432147d6e1d1bfdcd0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:37 -05:00
Allan Stephens
80b109ae98 Revise misleading 'channel' references in microkernel server code
There is no need to refer to the server's command stack as a 'channel'.

Change-Id: I5c0fd599ba25478f1c4a9e96c015746b205df469
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:37 -05:00
Allan Stephens
319a648267 Revise 'channel' comments in microkernel's pipe code
These comments now use the newer 'pipe' nomenclature.

Change-Id: Id09b58d7174d7989eaae4dabe0086ab988c7746f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:37 -05:00
Dirk Brandewie
fce979ef3e init: Change _InitHardware() to be called from init system
Change the function signature of _InitHarware() function and rename
the function to a platform specific name now that it will be called
via a function pointer and not by name.

Call the platform *_init() function at PURE_INIT time.

Change-Id: I5168dfea81f406da135d491a2b4a24e8255f418a
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:37 -05:00
Dirk Brandewie
a88cd0fc34 init: Split pure_init into pure_init_{early,late} levels
Split the pure init level into two phases this allows for easier
migration of the nano kernel init process without resorting to naming
or link order to force the ordering of functions at pure init
time. The need for change was discovered while moving the system
timers to be initialized by the init system.  The base timer driver
(eg. HPET) must be initialised prior to the system clock being enabled
both of which need to happen before nano-kernel init.

Change-Id: I7a2994965e48a891a78268080113ac8fccceb261
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
03ab32a66a Microkernel timer uses new driver initialization
Update microkernel systems to use the new driver initialization model on the
timer driver.

Change-Id: Ida9ef2a395d0dddf4104d490d78b13b11ea3c347
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
27e01a060a Nanokernel timer uses new driver initialization
Update nanokernel systems to use the new driver initialization model on the
timer driver.

Change-Id: I22d8619f56052f094482d73ab34c9d610492d8c0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
6e95fe0356 Update _sys_clock_driver_init() interface
Prepares the _sys_clock_driver_init() routine to interface with the new driver
model.  To this end, it must accept a pointer to a device structure and return
an integer.

Change-Id: I3c600ce1efb49c0864aae7b09663ca40d6289372
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Daniel Leung
7f998a101b doxygen: mutex: update in-code documentation
() Adds documentation to the header files for mutex.
() Update whole @file documentation in the mutex source
   code to javadoc style, and adds some missing param fields.

Change-Id: Ic54d830ea3382aac94cf93e58cc9eb66e1a241b7
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:37 -05:00
Anas Nashif
86446dab4e doxygen: move mailbox comments to header file
Move documentation comments to header file and prep
them for doxygen.

Change-Id: I3180cba7c86af97e3b4c0fceb0e1aa523ed4d219
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
e5700b46ab Rename ChRef union and its fields
Eliminates references to obsolete "channel" terminology and aligns
the names to Zephyr OS naming practices.

Change-Id: Ie4205bda5529a6f8aebfa63aa5a87eb6aef85bc9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis
9b8352f7e4 Rename pipe get/set utility parameter names
Eliminates references to obsolete "channel" terminology in parameter
names used by the following pipe get/set utitlities:
    _k_pipe_option_get()        _k_pipe_option_set()
    _k_pipe_request_type_get()  _k_pipe_request_type_set()
    _k_pipe_time_type_get()     _k_pipe_time_type_set()

Change-Id: Id6fb803d77d9d775726e67bd48d35e10e908ff61
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
e2ab3249f6 Standardize on names for PIPE_REQUEST_STATUS objects
Eliminates references to obsolete "channel" terminology and improves
code quality by providing consistent variable names.

Change-Id: I8f1c8afe96913f1f97b3c16fd947cfce20f3d7a2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
22295bc9a4 Standardize on names for _pipe_xfer_req_arg objects
Eliminates references to obsolete "channel" terminology.
    pipe_xfer_req: used with read/write xfer requests
    pipe_read_req: used with read only xfer requests
    pipe_write_req: used with write only xfer requests

Change-Id: Ia09b7d7b82a568e34adceea3683c8ebde07229a1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
e2c0574319 Remove unnecessary _pipe_xfer_req_arg pointer definitions
Simplifies routines _k_pipe_put_request() and _k_pipe_get_request() by
avoiding an unnecessary pointer assignment.

Change-Id: I5677826bbbec70124dbc951f102885e5b32aad65
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
8d37ddef02 Rename k_args_args field ChProc to pipe_xfer_req
Eliminates references to obsolete "channel" terminology and improves
code quality by providing more descriptive names.

Change-Id: Ic5f9f9b482c1769e15563c50241f578bf0d1baa1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a9e4f6520b Standardize on names for _pipe_xfer_ack_arg type objects
Eliminates references to obsolete "channel" terminology and improves
code quality by providing more descriptive names.

Change-Id: I4135dfc98c13899ec4d2b0befb23822712c668ae
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
5f4f274f44 Standardize on names for _pipe_ack_arg type objects
Eliminates references to obsolete "channel" terminology.

Change-Id: Id47826e0c606048b65d42fde284e5ef851c2b147
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
367d9e9e3f Rename k_args_args field ChReq to pipe_req
Eliminates references to obsolete "channel" terminology.

Change-Id: I0456bfd9a43bd94f83c58dd1f47be50bf393d492
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a2b866ea74 Standardize on names for pipe_desc type objects
Eliminates references to obsolete "channel" terminology and improves
code quality by providing more descriptive names.

Change-Id: I4c921db1777975210c1ea3d4ab72107ca6d4f589
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
97580269b3 Rename CHREQ_STATUS to PIPE_REQUEST_STATUS
Eliminates references to obsolete "channel" terminology.

Change-Id: Iff071c619170e118adf83a6b9fa0261e98a2ae01
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
f98898b127 Rename k_chproc structure to _pipe_xfer_req_arg
Eliminates references to obsolete "channel" terminology.

Change-Id: I0bcb7924d4c2f5ce5926baf9c09031c33806c8ac
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
91f693e4e2 Rename k_chmovedack structure to _pipe_xfer_ack_arg
Eliminates references to obsolete "channel" terminology.

Change-Id: I631349d197e618e8bff1657fd22848b70263bf4f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
61f2b49331 Rename k_chack structure to _pipe_ack_arg
Eliminates references to obsolete "channel" terminology.

Change-Id: Id15638160869ad76afb9df352d67ffe6f6a07412
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a303bdb85b Rename k_chreq structure to _pipe_req_arg
Eliminates references to the obsolete "channel" terminology.

Change-Id: Ic5f375b36fbd234f158a11dfbfd010d3a05a844c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
a376f0f70d Rename chbuff structure to pipe_desc
Not only does this rename eliminate references to the obsolete "channels", it
better identifies the purpose of the structure.

Change-Id: Ib9c730b0e57b51b562ca0b5c1f5c9aaa3bdcce70
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
7c3bc47caf Eliminate unnecessary copying of k_args_args field
Simplifies routines _task_pipe_get(), _task_pipe_put() and
_task_pipe_put_async() by avoiding unnecessary copying of
k_args_args field.

Change-Id: Ie8b77502d6e1f0e655950f47e766a5e6378d1812
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Peter Mitsis
467d5f54d0 Cosmetic: Fix whitespace issues
Fixes whitespace issues to comply with checkpatch.

Change-Id: Ic6501158e06a25d616072611e73575a1dc812dab
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:36 -05:00
Anas Nashif
d89bcd300c doxygen: change comment style to match javadoc
Change-Id: I5266caff9ef2ee26c556f6e144eca020ae9169bd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:33 -05:00
Peter Mitsis
1bafa75ef1 Rename timer_driver() to _sys_clock_driver_init()
The revised name conforms to Zephyr OS naming conventions.

Change-Id: I5bcdaf1df7da9d8ce5787a08b29ead91dd8f24ce
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:33 -05:00
Peter Mitsis
136bef3c5d timer_driver() no longer takes a parameter
Removing the parameter to timer_driver() as it is not used.

Change-Id: I09275287eeb541be0dd315056b4f2bc6cbc2573c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:33 -05:00
Anas Nashif
f367f071b6 doxygen: add @brief and capitalize
Remove function name from comment and add @brief instead.
Also capitilize first letter.

Change-Id: Ib708b49bf02e5bc89b0066637a55874e659637e0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:33 -05:00
Anas Nashif
1362e3c162 doxygen: RETURNS: -> @return
Previous comment style used RETRURNS:, use @return to comply
with javadoc style.

Change-Id: Ib1dffd92da1d97d60063ec5309b08049828f6661
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:32 -05:00
Anas Nashif
ea0d0b220c doxygen: change comment style to match javadoc
The change replaces multiple asterisks to ** at
the beginning of comments and adds a space before
the asterisks at the beginning of lines.

Change-Id: I7656bde3bf4d9a31e38941e43b580520432dabc1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
235bc91746 Remove inappropriate language
Change-Id: I286ae085d71d613c724284f84133b0c097a3175a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
baec40d3a5 Rename ChxxxSetTimeType() to _k_pipe_time_type_set()
This private API now follows Zephyr OS naming conventions.

Change-Id: I59e2595764fe06ab32b7c4b9468c0f830ff44e9e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
999e13ca07 Rename ChxxxGetTimeType() to _k_pipe_time_type_get()
This private API now follows Zephyr OS naming conventions.

Change-Id: I3cf5042acff7b299ffee4189dde1a3ef403b0d84
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
65e817b94a Inline expansion of ChReqSizeLeft()
The name of the private internal function ChReqSizeLeft() refers to the
obsolete "channels" name.  Furthermore, given both its infrequent use and
its size, it is simpler to expand it inline and get rid of the function
altogether.

Change-Id: I025d8e48e4a4c26f501ed78d63b5c80f7950fe2b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
6660021c9c Inline expansion of ChReqSizeXferred()
The name of the private internal function ChReqSizeXferred() refers to the
obsolete "channels" name.  Furthermore, as it is merely a wrapper for getting
the value of the iSizeXferred field, it is simpler to just access the field
directly.

Change-Id: I1e56b434cc6445b52ff72b9304fd9da9b91e7050
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
1ae6c82fd6 Inline expansion of ChReqGetStatus()
The name of the private internal function ChReqGetStatus() refers to the
obsolete "channel" name.  Furthermore, as it is merely a wrapper for getting
the value of the Status field, it is simpler to just access the field
directly.

Change-Id: Ia48173606ade7b62e4b53f56d759468ced90494a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
fd36aaf561 Rename ChReqSetStatus() to _k_pipe_request_status_set()
This private API now follows Zephyr OS naming conventions.

Change-Id: Id6fa98bf5c913eebae746e3a63ab5e96fad74e46
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
4fddab9814 Rename ChxxxSetReqType() to _k_pipe_request_type_set()
This private API now follows Zephyr OS naming conventions.

Change-Id: Ice8b3be8fc91c6e467a42fa5da8e19ced5a5e779
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
49055d838f Rename ChxxxGetReqType() to _k_pipe_request_type_get()
This private API now follows Zephyr OS naming conventions.

Change-Id: If1ba71b21971285b7ae2544f63c10f0ba261ced9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
a4bc71bd64 Rename ChxxxSetChOpt() to _k_pipe_option_set()
This private API now follows Zephyr OS naming conventions.

Change-Id: I9797b7eccddc8ce45623a4d0a4ba4cef63bc5e0e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
3b4627d008 Rename ChxxxGetChOpt() to _k_pipe_option_get()
This private API now follows Zephyr OS naming conventions.

Change-Id: I01ee78dcf604be90348384733f67766c11ad234e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
8da6498afc Rename _UpdateChannelXferStatus() to pipe_xfer_status_update()
This private API now follows Zephyr OS naming conventions.

Change-Id: I9991671ee816bc8f5c2f509015e60b554c671489
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
3b9f81aa2a Rename ChannelCheck4Intrusion() to pipe_intrusion_check()
This private API now follows Zephyr OS naming conventions.

Change-Id: Ic92cacbcb1adf82946a5828cf60d4d98a95b9d74
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
be8bc7f959 Apply static keyword to ChannelCheck4Intrusion()
The routine ChannelCheck4Intrusion() is only used in k_pipe_buffer.c.

Change-Id: Ib478b24f2c8995bb0e1c13bf4ace3cb868887762
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
1a12c1a3ab cosmetic: fix whitespace around '*'
Fixes whitespace errors flagged by checkpatch.

Change-Id: I80f6dfeadcf884064b24c46b3649dc46763a976b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:32 -05:00
Peter Mitsis
594722c256 Rename pipe kernel service commands
Renames pipe kernel service commands so they no longer refer to channels.
	CHENQ_REQ    -> PIPE_PUT_REQUEST
	CHENQ_TMO    -> PIPE_PUT_TIMEOUT
	CHENQ_RPL    -> PIPE_PUT_REPLY
	CHENQ_ACK    -> PIPE_PUT_ACK
	CHDEQ_REQ    -> PIPE_GET_REQUEST
	CHDEQ_TMO    -> PIPE_GET_TIMEOUT
	CHDEQ_RPL    -> PIPE_GET_REPLY
	CHDEQ_ACK    -> PIPE_GET_ACK
	CH_MOVED_ACK -> PIPE_MOVEDATA_ACK

Change-Id: I28946a46199d4eaac331c552092060f04525dd3f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
4852f41d9b Rename internal K_ChProcxxx() routines
These private APIs now follow Zephyr OS naming conventions.

Change-Id: I8c8bb9bb6377e7cc2bf08136bd5ef2587c52028d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
8768257789 Rename internal K_ChMovedAck() routine
This private API now follows Zephyr OS naming conventions.

Change-Id: Ic8b1d4673862263d90d240e749a272d01a53679e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
48dd7e2908 Rename internal K_ChSendxxx() routines
These private APIs now follow Zephyr OS naming conventions.

Change-Id: Ia11a082e46456d12a3d6af7dfb2f34c29c137cb2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
6a4c85aff9 Rename internal K_ChRecvxxx() routines
These private APIs now follow Zephyr OS naming conventions.

Change-Id: I63815013be2d3b01463563d17f05aac28b27ce04
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
c2194ebf81 Eliminate duplicate pipe routine declarations
The pipe kernel service routines are now only declared in kernel_main.h.

Change-Id: I20848b0b72af4a2a6fd3f0bb07f0e0ae546087ae
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
110a1a812c Update k_pipe_xfer.c summary line
The summary line no longer mis-identifies the file as K_ChProc.c

Change-Id: I0be0e302cd8d91903c60706175fee955d6993ebc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
b196af97d6 Cosmetic: double space to single space
Fixes two instances where there were two spaces between words instead of one.

Change-Id: I9c50e90868532e820f85888c1b23bd7d44e7e1c1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis
9f084d7d33 Typo: acknowledgement -> acknowledgment
Changing the spelling to comply with the checkpatch tool.

Change-Id: I7f28fd73bfbc89d91e4d7caccffa2c018dcadf6d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Dirk Brandewie
ac3fdf0be1 init: Add init system calls to micro and nano kernel init
Add the call sites for the various init levels defined by the init
system.

These call sites are noops if there is no init proceedure registered
at a given init level.

pre_app_init has been renamed to app_early_init and late_initconfig to
app_late_init to better reflect the ordering and intended use of these
init levels

Change-Id: I71e38d936a97da8fe163f4b7cf0ce6725f1c903e
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:27 -05:00
Allan Stephens
478128cf9e Rename kernel's clock_vars.h to sys_clock.h
The revised name better reflects the fact that the file defines
macros in addition to declaring variables. In addition, most of
these APIs use the "sys_clock_" prefix, which aligns well with
the new file name.

Change-Id: Ib33517d4b19ec2455303b87200c677e87640fcbc
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
22364188a4 Rename nanokernel's offsets/common.h to nano_offsets.h
Eliminates unnecessary "offsets" subdirectory, and aligns file
name with gen_offset.h which resides in the same directory.

Change-Id: I8cea3bc54b5ceae3091d4a5c77c59ab826339f75
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
e8f50f5717 Rename nanokernel's genOffset.h to gen_offset.h
Eliminates use of non-standard camelCase file name.

Change-Id: I809de5f72b40adfd49cbc128992de934e3ec66e3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
c29d41cab7 Rename nanokernel's nanok.h to nano_private.h
The new name better reflects that this file contains all private
nanokernel APIs that are used by various kernel subsystems.

Change-Id: I4c258d582e93753eec9e575fdb5f9f2109417a0f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
96d746d3c1 Rename microkernel's minik.h to micro_private.h
The new name better reflects that this file contains all private
microkernel APIs that are used by various kernel subsystems.

Change-Id: I5e52172a9e33aa130ce55ce59e887bba5c1c175a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
7da1dd860b Rename microkernel's kernel_struct.h to micro_private_types.h
The new name better reflects that this file contains private
microkernel APIs (types, structs, etc.) that are used by various
kernel subsystems.

Change-Id: I7a89be893455b3daaf30baa40a0ec8e0cde7cc36
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
63fae40f7d Eliminate nanokernel's nanometrics.c
File contents moved to the nanokernel initialization file, since
they don't warrant their own distinct source file.

Change-Id: I61329067a077c421e2889c745ea44eef78ce37cb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
b22d902e44 Rename microkernel's global.c to k_init.c
This file contains microkernel initialization code, along with a few
global variables.

Change-Id: Ic4e39c844d39866b38bb6d074e7035d759e073cd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
570eabf9f8 Add k_ prefix to various microkernel source files
Adds the k_ prefix to files that don't have it. This emphasizes the
fact that the microkernel is the *real* Zephyr OS kernel, rather than
the nanokernel. Also, the k_ and _k_ prefixes are used for many private
microkernel APIs contained within these files, so using the k_ prefix
for these file names makes sense.

Change-Id: If3a5e786edc6503fa8a24f5638ece2e1df021547
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
e96164aa30 Rename various microkernel source files
Now spells out the name of the associated microkernel object in full.
Also renames file containing FIFO code to correspond to the associated
public include file (microkernel/fifo.h).

Change-Id: I47f7a2ca01e0feff8f499acda0000fe475e7ee5a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
bba56b1c8a Rename microkernel/cmdPkt.h to command_packet.h
Now spells out the name of the associated microkernel object in full.

Change-Id: I608404a762cf9d1100d58fe80c82c0e40ada2ff1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
f494cc3e9d Rename microkernel/k_types.h to base_api.h
This file defines public microkernel APIs that are utilized
by more than one of the microkernel object types. It contains
both types and symbolic constants.

Change-Id: I2bc39ffe6655e5ddeec1e55c4caee01e02526595
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
660878e4e2 irq_connect for x86 uses static stub array
In order to provide the same irq_connect() on all platforms
on x86, irq_connect() now uses a static array of interrupt
stubs. Device driver does not need to provide interrupt stub
to irq_connect() function.

Add NUM_DYNAMIC_STUBS configuration parameter, the number
of interrupt stubs used for dynamic interrupt registration.

Modify tests for unified interrupt register API

Tests that deal with interrupts are modified to work
with the new interrupt registration API.

Add CONFIG_NUM_DYNAMIC_STUBS option to dynamic interrupt projects

Projects that use dynamic interrupt handler registration on x86
have to include CONFIG_NUM_DYNAMIC_STUBS parameter in the
configuration.

Change-Id: Ic90c726485521a57cf695fd3edc8cac85d0b827d
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
9bf659afa5 Introduce CPU_CORTEX_M3_M4 option
CPU_CORTEX_M3_M4 replaces CPU_CORTEXM3 as the umbrella option for Cortex M3/M4
processors.

NOTE: Selecting CPU_CORTEXM4 still currently forces the selection of
CPU_CORTEXM3.  Breaking that forced select will be done in a later commit.

Change-Id: I0f36b3a2adc5c6c66db4e9b6353b921199544deb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Benjamin Walsh
c6948611cb nanokernel: add CONFIG_NANO_TIMEOUTS
Allow configuring nano timeouts. They are disabled by default.

Change-Id: I9db0b632681ae149295acd3ed81fccdee2c4f91a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
924b6e563d nano timers: allow in microkernel, disabled by default
Change-Id: Id17a733196174a8a1fe3b550d6b4c08efe031948
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
1ae1ca0b39 microkernel: handle nanokernel ticks
The microkernel now announces the nanokernel ticks, and takes them into
account when computing the amount of time to stay in tickless idle.

This allows code linked against a microkernel to use the nanokernel
timers and timeouts.

Change-Id: I9436347e22fe76c2c1a314589ffc041a9a1a99a4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
617f9c5b4c nanokernel: allow nano time tracking to be used in microkernels
The nanokernel time tracking code (ticker) can now exist in microkernel
systems. This allows the ticker that drives nano timers and timeouts to
advance the tick count for these in a microkernel, thus allow their
presence there. Previously, nano timers could not be used in a
microkernel.

Change-Id: I17f2b659691a081b0f9bf3961ed030533aa02a15
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
101fee8dde nanokernel: add interface for obtaining earliest timer deadline
This interface can be called by the microkernel to obtain the earliest
expiring nanokernel between the timers and timeouts, to allow the idle
code to take the correct decision w.r.t. tickless idle.

Change-Id: I9598ec2a0dd013a6a8ccc95d50105bb98ca27f54
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
f5f09608f9 nanokernel: give nano_timer.c ownership of the nano timers list
The system clock code only references it, it should not own it.

Change-Id: I38eb61599eb66458d5a3c3c9713cf11dc14e8a63
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
ab6e153a21 nanokernel: add handling of nano timeouts on tick
Add the necessary call to dequeue the nano timeouts when a tick occurs
in the nanokernel.

Change-Id: I26fdfc4084d7564e232d8240eab8915076deaa31
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
cae5d05342 nano_sys_clock: abstract handling timers expiry
The nanokernel timers and timeouts won't be dependent on each other, so
the expiry handling code needs to be able to only contain the necessary
code depending on what is enabled in the kernel.

Change-Id: Ibb7c31e926a56ebd3e22b8eac6db05faa1c8ddd3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
87179c2e36 nanokernel: add NANO_TIMERS option
The nanokernel timers will be available in the microkernel, but can be
disabled if not needed. A kconfig option is needed for that: the option
is enabled by default, and only available in the nanokernel for now. It
will be made available in the microkernel in the future.

Change-Id: I3910affde7bd2e7b25ab0a3c655255a9be01c9b8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
72a7b520bb nano_lifo add timeouts support
Add the _timeout() variants to the _get_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _get() routines: a valid pointer on success, NULL on failure.

Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to
data arriving on the LIFO.

Change-Id: Iad8fa00b3fa0656fee9a67b2dd8b316e1e8aac74
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
eb2e4aa913 nano_fifo add timeouts support
Add the _timeout() variants to the _get_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _get() routines: a valid pointer on success, NULL on failure.

Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to
data arriving on the FIFO.

Change-Id: I6650d0de8494c15698d670442da1e9c8d8c89910
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
3f671dc68c nano_sema: add timeouts support
Add the _timeout() variants to the _take_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _take() routines: 1 for success, 0 for failure.

Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to a
semaphore state change.

Change-Id: Idef357f99a5ca30e20665a25abc54d253a848a52
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
d131bae676 nano_fiber: add fiber delayed start/cancel and sleep
This new API allows starting a fiber with a delay. It returns a handle
to allow cancelling it before the fiber starts, via the cancel API.

It also adds an API allowing a fiber to sleep for a given amount of
ticks.

NOTE: CONFIG_NANO_TIMEOUTS must be enabled.

Change-Id: I608dc47b5f08321cfd0c1dd9bb18d1d77eab87e3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
2672025969 nanokernel: add and initialize timeout fields in ccs/s_NANO
s_NANO contains the timeout queue, and each ccs needs a struct
_nano_timeout object that gets linked in the nanokernel timeout queue.

Change-Id: Iad027eaaebcffe190e95f0b9d068f047062559c2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
bb660ae965 nanokernel: add timeout queue interface
The timeout queue interface will allow having fiber interacting with the
nanokernel objects wait with a timeout. It can be completely excluded
from the kernel if not needed, via the CONFIG_NANO_TIMEOUTS option.

Most of the timeout queue interface is contained within timeout_q.h.
However, this file should never be included directly: rather, the
wait_q.h file is to be included instead, which itself provides NOOP
abstractions for some timeout functions when timeouts are not enabled in
the kernel.

Change-Id: Ifeb1b934e0c71d00c59ebc88a54ab26e49686807
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
f9d34ff899 nanokernel: rename struct s_CCS to struct ccs
Follow coding conventions.

Change-Id: Ie398d66e6255b76b4546aa9c827997b5dfb0743c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
6b8589612f sys_clock: rename nanokernel's _do_sys_clock_tick_announce
Rename nanokernel's _do_sys_clock_tick_announce() to
_nano_sys_clock_tick_announce() so that it can be called from the
microkernel tick handling code without name ambiguity.

Change-Id: I2ec9dd92ceda51f00be1dd95bc3239d6b2e82943
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:21 -05:00
Allan Stephens
ab80db110f Rename enlist_timeout(), delist_timeout(), and force_timeout() APIs
These private APIs now follow Zephyr OS naming conventions.

Change-Id: If9de2528d740eb4ff16a69649564592a5f047c61
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:20 -05:00
Allan Stephens
d247c26b20 Rename enlist_timer() and delist_timer() private APIs
APIs now follow Zephyr OS naming conventions.

Change-Id: I554e63b989029e08a1d215c9b5a511a32a91e42c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:20 -05:00
Allan Stephens
a7e20d2b0a Rename set_state_bit() and reset_state_bit() private APIs
APIs now follow Zephyr OS naming conventions.

Change-Id: I154536d2c40784ae83a936c55cf748173343c681
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
9e675cf581 Rename private microkernel APIs
The following APIs now use an approved Zephyr OS prefix:

_pipe_init
_mem_map_init
_mem_pools_init (also loses plural aspect)
init_node
init_drivers
kernel_init
kernel_idle

Change-Id: Ic380c56b09cb870d44c51fd12c6c0e0a13e9b4e3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
1860cb636d Rename workload_monitor_calibrate() to _k_workload_monitor_calibrate()
This API now uses an approved Zephyr OS prefix.

Change-Id: I3ec6d3ac3a3b7ae2edd1024a39ce73796f060fba
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
e4bc9ce4ab Rename workload_time_slice_set() to sys_workload_time_slice_set()
This API now uses an approved Zephyr OS prefix.

Change-Id: I79c7e82e73653315ba1a609edbf11336694b9dd4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
6c2da86281 Rename scheduler_time_slice_set() to sys_scheduler_time_slice_set()
This API now uses an approved Zephyr OS prefix.

Change-Id: I1041b982492ea7b76213e3b57cf28a9f17e7fd9d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
fd117970d3 Eliminate duplicate declarations of private microkernel APIs
These declarations do not need to appear in minik.h, since it
already gets them by including kernel_main.h.

Change-Id: I35ff9cc2d371c60a08a7cf8bde289f467a259dea
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
91bb39de6d Remove microkernel task routines from private API
These routines are only referenced in a single file.

Change-Id: I55d2976d1db612bdbb89224b89b84bfcc5b9d707
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
99001f8518 Eliminate duplicate declarations of private microkernel timeout APIs
These 3 declarations no longer appear twice in the same include file.

Change-Id: Ia77b84c29741978bea2d74b44d66e9929d2769c4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
86e4595da5 Cosmetic changes to private microkernel APIs
- Removes unnecessary comment about API being private.
- Removes misleading comment about processor-specific APIs.
- Makes purpose of "service codes" clearer.

Change-Id: I4715609f328b9fa7f334a1b4c3c21441111f228d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
f9b2c757db Rename K_ticker() to _k_ticker()
This API now uses an approved Zephyr OS prefix.

Change-Id: Ia16829d908da9bfaa82f82da47b583a0004cae7d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
a5f2ccf286 Remove microkernel's tick handler from public API
This API is now a private microkernel API.

Change-Id: I5b26aa927d42923f2076d06f9bdfef371572543e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Anas Nashif
54ac4484d7 Rename VXMICRO_ARCH and VXMICRO
Change-Id: I6f3858de98333ec466aa876c5f2887faa8e276e2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif
274622ea69 Rename VXMICRO_ARCH_arm -> CONFIG_ARM
Change-Id: I32b2e39781825504e7936b3df0c864988650c35c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif
191fc279ce Rename VXMICRO_ARCH_x86 -> CONFIG_X86_32
Change-Id: Ie1bcfebce1db838ea994cb3626396ea032225830
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Peter Mitsis
ad71ba6fa1 Ensure k_args fields are properly aligned and packed
The size of the k_args strcture must be equivalent to ...
    CMD_PKT_SIZE_IN_WORDS * sizeof(uint32_t)

This is complicated by the fact that not only do different compilers treat the
size of 'bool' and 'enum' types differently, they may also pad structures
differently.  Both of these differences have direct impacts on the k_args
structure.  To work around this, the k_args fields 'alloc' and 'Comm' are
forcibly aligned to a 4-byte boundary, while the rest of the k_args structure
is packed.

Change-Id: I722f1a585e5e34a7a7218ed0b214b54fac6d39f7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:16 -05:00
Allan Stephens
5189844df5 Eliminate VxMicro branding in kernel code
Eliminates references to the obsolete OS name. In most cases the
name is simply removed, as it isn't necessary.

Change-Id: I32f9e7390e436aec008a9454b72657e129d65152
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
839fb27f41 Cosmetic changes to microkernel task status flags
Revises names and/or descriptions to bring them up to date.

Change-Id: I5c1db102bfa0156526f1524084f5802e6df52a52
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
ef4521396e Don't expose APIs for experimental task monitoring capability
This feature is still under development, so it's APIs shouldn't
be publicly advertised yet. And while they are being relocated,
they are renamed to adhere to kernel coding conventions.

Change-Id: I7a41d98e2fbb3b975fa42814cf64854f8cc0b623
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
662d02cb33 Remove private context structure from public nanokernel API
The tCCS type doesn't need to be publicly exposed; any public APIs
that need to use this kind of type should be using nano_context_id_t.

Change-Id: Ife1e73c4a21326bf54e2d52bfa1f1281245935a1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
f5777f87bc Continue consolidation of arch-independent private nanokernel APIs
Eliminates duplication of these entries by the various architecture-
specific include files for private nanokernel APIs.

Change-Id: I711c3b42fe375d1574ce4a540142c3b507b71557
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
bff7fc17fe Begin consolidation of arch-independent private nanokernel APIs
Introduces nano_internal.h, which will declare all architecture-
independent non-public nanokernel APIs. This file is automatically
incorporated by the various architecture-specific include files
for non-public nanokernel APIs, and will not normally be included
directly by any other files.

Change-Id: I9f3de812a5747cc720fa0ff739007315e8d07dd9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
69555e8efd Cleanup of nanokernel's fiber scheduling routine
1) Renames routine to conform to kernel naming conventions.
2) Relocates routine declaration to include files for
   non-public nanokernel APIs.
3) Relocates routine definition so that it resides with the
   nanokernel's other fiber manipulation routines.
4) Eliminates an unnecessary argument to the routine.

Change-Id: Ia139280dfea36262ca8417708786b4989f3eaee1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
7e7854008f Remove task monitoring symbols from microkernel public API
Since microkernel task monitoring is currently experimental
anything related to it shouldn't appear in a public include file.

Change-Id: Iff0e6137085ed0743fb34e97f5cee1bb98aecaed
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
f547a5b7b8 Eliminate cputype.h and its arch-specific derivatives
Since cputype.h no longer has any meaningful content it can be
eliminated, along with the arch-specific files it incorporated.
(This means that the arch-specific nanokernel public APIs are
now referenced only via cpu.h and its derivatives.)

Change-Id: I7f35b6c3c6c092d61c372ff85d73e49414474938
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
bb9ab0322e Eliminate unnecessary references to cpu.h and cputype.h
Gets rid of places where there is no need to include these files
at all, or places where these files are being indirectly included
due to the inclusion of nanokernel.h.

Change-Id: I7b58148af454b977830c00a6b519a78d0595603b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
d6db256249 Add missing #includes required to reference non-kernel APIs
Several files were not explicitly including APIs that they reference,
which could eventually lead to trouble.

Change-Id: Ib33cadfa658280df3fcb4c670463d41b63097b31
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
a1bd59de35 Eliminate obsolete coding convention comments
Gets rid of single-line comments required by a previous set of
coding conventions. These comments provide no value to readers
and just clutter things up.

Change-Id: I2a08b12cf5026253de56979efdfc510e7e68defe
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
60f6a74efe Eliminate non-standard NULL definitions
Revises kernel so that it uses the standard NULL symbol defined
for C99, rather than having its own custom symbol.

Change-Id: I74342f192e95899a83db879e8b1c8fe89ac8b92d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
5a4be58707 Eliminate non-standard boolean type support
Revises kernel so that it uses the standard boolean type library
defined for C99, rather than having its own custom boolean type.

Also revises sample projects that used the non-standard type.

Change-Id: Ib41b7f836da25352aa5ae9dfbbfdd29739017b6f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Peter Mitsis
220f1a5b86 Statically initialize _k_command_stack
Helps streamline kernel initialization.

Change-Id: If18660eaa548e82f5487cd9fcd4e0cada0426ca0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:14 -05:00
Peter Mitsis
a2314c607b Made _k_server_command_stack_storage static
The global variable _k_server_command_stack_storage is only referenced in
one file.

Change-Id: I62f327c77dfff2d6c553436f5e77a8053aa93031
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:14 -05:00
Peter Mitsis
4fe98a46f5 Initialize stack area in _NewContext()
Instead of initializing the stack (when INIT_STACKS is enabled) in start_task()
and _fiber_start(), do it in _NewContext().  This helps to both reduce code
duplication AND ensure that all contexts get an initialized stack (previously
the background/idle task's was missed).

Change-Id: If2d50309d2be48fac937f5d0ae96b9de185c0fe2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:14 -05:00
Dirk Brandewie
c9ac95a43a device: Add device model infrastructure
Add infrastructure support having multiple instances of a driver
configured into the system each with its own compile time
configuration information.

Change-Id: I1e447af18311139b43f74fe0439483ccd132b63f
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:14 -05:00
Anas Nashif
bbe84f8ae5 Use ccflags-y and asflags-y instead of EXTRA_CFLAGS
According to section 3.7 of Documentation/kbuild/makefiles.txt, using
EXTRA_CFLAGS in Makefiles is "still supported but their usage is
deprecated." However, using make EXTRA_CFLAGS="-DSOMETHING" results in
EXTRA_CFLAGS from Makefiles being overwritten, obviously breaking the
build.  This patch converts to them to the newer ccflags-y which also
fixes the problem.

Change-Id: I6309439599d4c9cc184f9ecd941bde841982ef07
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:14 -05:00
Peter Mitsis
40b5200c73 Optimizations to _NewContext() and _NewContextInternal()
Since the address of the new context is known before _NewContext() is invoked
(due to it being passed a properly aligned stack), there is no longer any
need for _NewContext to return the pointer to the context.

Furthermore, as a direct result of the properly aligned stack, the pointer to
the new context does not need to be passed as a separate parameter since it
will always match the passed stack pointer.

Change-Id: Ie57a9c4ad17f6f13e8b3f659cd701d4f8950ea97
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis
2bf5fc44f1 Initialize idle task's stack related fields in sysgen
Hoists the initialization of the the microkernel's idle task's stack fields
out of the runtime and into sysgen thereby removing microkernel code from
the nanokernel initialization.

Change-Id: I54cbbec9e875a52b5fa52562e1a2770cd3ac1cc3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis
b4e7a4fdbe Apply __stack tag to align kernel defined task/fiber stacks
Updates the kernel defined stacks to ensure that they are properly aligned
by using the __stack tag.

Change-Id: I8514d38ee2e5bb2b2d87b17021db3c7f9c36a772
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis
6996d2cc2c k_timer optimization: INVALID_OBJECT can not be returned
As it is impossible for GETTIMER() to return a NULL pointer, task_timer_alloc()
will never return INVALID_OBJECT.

Change-Id: I270732f31033d9ce55847dc9324f215680865273
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis
f8619b4181 Refactor _Cget() to invoke _NanoFatalErrorHandler()
It is a fatal error if the microkernel is configured with either too few
command packets or too few timer packets.

NOTE: During this refactoring of _Cget(), not only is it renamed to
_nano_fiber_lifo_get_panic(), but it is moved into "nano_lifo.c".

Change-Id: I1d866cda1b444da04877f7eda03762b6e83c9a6f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis
6b12d608d3 _k_timer_alloc() to use GETTIMER() instead of _Cget()
Improves coding consistency by having _k_timer_alloc() use GETTIMER() instead
of _Cget().

Change-Id: I6575307ab6fe769bcf6dbf7e6c845b6cc4e338bd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens
e54a6c4b68 Eliminate separate include files for generating absolute symbols
The toolchain-specific macros used to generate absolute symbols
are now part of the main include file for that toolchain, since
there doesn't seem to be a good reason to have them in a separate
file.

Change-Id: Ic97800485b20d6c5b23d14f69f67ee845cf076f5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens
40a719d584 Add "sys_" prefix to public kernel versioning APIs
Eliminates the need to reserve the "kernel_" prefix in the
kernel namespace. Also, aligns versioning with other APIs
that are neither nanokernel_ or microkernel-specific, such
as the system clock APIs.

Change-Id: I81e43cd03849b45a4b432b0875dc8b1d5862dba9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens
9c5d875ad9 Correct obsolete comment describing format of kernel version
Change-Id: Ife9e6b21ef0c49aa9ce964889813716d238aa55c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens
d216a00adc Clean up private APIs that mark context as (non)essential
1) Renames APIs to align them with conventions used by other
   general-context nanokernel APIs.

2) Relocates implementation of these APIs to the architecture-
   independent portion of the nanokernel.

Change-Id: I1aa60029aaa96697cd8fcb594bbae23ba6656661
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens
140d314336 Eliminate references to k_memset() and k_memcpy()
Since the kernel now provides a minimal string library, there is
no longer any reason not to use the standard memset() and memcpy()
APIs.

Change-Id: Iad587ace6f41fd94c9c961d13d9322495a7da1be
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:12 -05:00
Allan Stephens
cb2d18cc83 Eliminate secure string library routines
These routines are either unused, or are always used in manner
that does not require their added security checking.

Change-Id: I6f484924ebc3d395a20879445a2fcabebf6c5014
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:12 -05:00
Dan Kalowsky
c02dd34277 Renaming include/nanokernel to include/arch
Renaming the directory include/nanokernel to be include/arch, which
better reflects the real nature of the directory and the contents
inside.

Change-Id: I2bc33ebc6715e2f0403227a558279fdf52398ade
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:14:12 -05:00
Dmitriy Korovkin
ec8a461bfb Introduce public APIs for random number generation
Convert the existing non-public random number generation APIs
into public APIs (i.e. sys_rand32_init and sys_rand32_get).

Change-Id: Id93e81e351a66d02c08cf3f5d2dd54a3b4b213c5
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:12 -05:00
Anas Nashif
19e17d47e6 Kconfig: remove extra line from nano kconfig
Change-Id: I9b26d027ed818db5328ff2d8e24dfa8044535a0f

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:11 -05:00
Anas Nashif
d76be85cc9 Kconfig: change kernel names in menu
Change-Id: Ib4409cfb8da273b0fd9a40e089d47a1fb0ffe0bc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:11 -05:00
Anas Nashif
1339edc104 remove defs.objs file
Replaced by kbuild

Change-Id: I61a21ed164b02c7770a181919b35ffafbde4f49e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif
99c8755010 Remove channel/
Change-Id: Ib79780a6e82c3bc3ab930ec71e7deebe85005c04
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz
a558312562 Kbuild: Remove old API ksymbol disclaimer.
This commit removes an old disclaimer used when the API_*
kconfig symbols were introduced.
Now the API_*  symbols are removed, the disclaimer is not needed.

Change-Id: Icf8bc751a19c530c9ba0014ccaaab3eb0f228155
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz
d15251fec5 Kbuild: Kconfig license headers.
This commit add license headers to Kconfig files.

Change-Id: I79e60263b8c7b696463ecc84b8ad411af5415117
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz
757790615b Kbuild: Removing API_* Kconfig symbols.
This commit removes the Kconfig symbols and dependencies,
introduced earlier to handle API's.

Change-Id: Ia8c13db876d1f570b815af1fd25fc0f9a0960f95
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif
97f2fe9c49 Rename TICKLESS_KERNEL -> SYS_CLOCK_EXISTS
Change-Id: I2101cbbbda08099483e4b7002b6072758149203c

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif
0169beb70f Kbuild: rename nanokernel files
Change-Id: I69edff76922c1dd4f48cf34579bb326ff021d115
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif
f55f475def Kbuild: Remove obsolete version fragment files
Change-Id: I2ec2b78d003d59a5bd7dfde6f6046393f38fcfb6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif
4acde800b0 Kbuild: User kernel instead of TiMo
TiMo is very ambigous, be generic and call it kernel.

Change-Id: I66b3e436afbc89e874f31a89b98cc04aa821c787
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:07 -05:00
Anas Nashif
7245689be3 Kbuild: adapt Makefile/Kconfig to microk.c rename
Change-Id: I1a111799b64dfc440d4fc8f1278e99450fec105e

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:07 -05:00
Anas Nashif
bb38b8816d Kbuild: adapt Makefile/Kconfig to microkernel/timer removal
Change-Id: I602015a1065f704907895d83cd0afb52646fdf5d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:07 -05:00
Anas Nashif
52deec0712 Kbuild: adapt Makefile/Kconfig to microkernel/movedata removal
Change-Id: I802a0716b1e7871c70d8c87b3c73d8d23cf114a9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:07 -05:00
Anas Nashif
8140e068f2 Kbuild: adapt Makefile/Kconfig to microkernel/core removal
Change-Id: I816098358cf7c655d32a37c52d08d0b14760a48c

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif
b805752dea Kbuild: power.c was eliminated
Change-Id: Id16ec0dd2f1758f9d5278b8d6a00cd38dec0bc28

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif
fd5090aca4 Kbuild: adapt Makefile/Kconfig to kernel/common/ removal
Change-Id: I6e9c17b51034dbf1ab93af0234334a3626c25166

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif
f749794bce Kbuild: adapt Makefile/Kconfig to task/ removal
Change-Id: I3032909d625c40e6cbbc03e3b4311df9be0c899c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif
88950af663 Kbuild: adapt Makefile/Kconfig to core/ removal
Change-Id: I96f8a1798e8d84a4876bcb59f5b93ec134e9a233
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz
6aac05214a Kbuild: Removes the COMMAND_PACKET ksymbol.
This commit removes the COMMAND PACKET kconfig symbol and
leaves the command packet service permanently in the build
process.

Change-Id: I814bb7f2f1a868490c1d0cc8d5cbea87bb39005c
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz
339efe209c Kbuild: Remove ks_moved file from Makefile.
This commit updates the Kbuild to the last change in the tree.
ks_moved.c file was removed from the system.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ice4f1ec4f3629825640718e760ba025f68ad6355
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz
c818cd288c Kbuild: Additional Kconfig symbols.
This commit adds the following Kconfig symbols:
 - INIT_STACKS
 - UART_INTERRUPT_DRIVEN
 - CONSOLE_HANDLER
 - BUILD_TIMESTAMP
 - TICKLESS_KERNEL
 - CONTEXT_CUSTOM_DATA

Change-Id: Id96a7e759c8beac73f27193df07b5c7562379b2f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz
622e273d08 Kbuild: Sysgen support for NUM_TASK_PRIORITIES
This commit add support to the Kbuild system for the
NUM_TASK_PRIORITIES Kconfig symbol and the corresponding sysgen
parameter.

Change-Id: I6b035437c86d62f72c25d696d18182a7b0448e8f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
2e3e28c3ed Kconfig KERNEL_DIR symbol removal.
This commit removes the Kconfig symbol KERNEL_DIR.
The symbols was no longer needed because sysgen is only
used on microkernel architectures and the value of
KERNEL_DIR is always "ukernel", therefore it is redundant.

Change-Id: I5e38dd431c5b6f7586e8b25aea330632e96f581f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
e55a79d6f9 Creation of Makefiles for kernel and misc directory.
This commit creates the Makefiles that describe the object-bundles for
the kernel directory and every sub-directory below.
It also includes the misc Makefile.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I847e79a40ced0b1d8370b893cd95c15efc7e5147
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
0e301cc07f Kconfig symbols for kernel and misc directory.
This commit adds the Kconfig files that describe the CONFIG
symbols that belongs to the kernel directory and subdirectories.
It includes the misc directory Kconfig as well.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I3e653562ea5c259203a63274197e3a0e1522ecc4
2016-02-05 20:14:04 -05:00
Allan Stephens
5ce539ca21 Relocate misplaced pipe buffer code
Several pipe buffer definitions now reside with the other
pipe buffer code. (One routine is also made non-global,
since it only referenced by the pipe buffer code itself.)

Change-Id: I76785d113edd62c9626a7116c9206472656128ec
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
c41b4d24e2 Cosmetic changes to microkernel pipe buffer code
1) Re-orders routines to eliminate the need for forward referencing.
2) Makes routines non-global if they are only referenced by pipe
   buffer code itself.
3) Optimizes out an unnecessary wrapper routine.

Change-Id: I731db9c9125c58d98c5e350bdd1708456e2cf40c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
11994f52bf Rename and relocate miscellaneous microkernel pipe files
Brings file names into alignment with current naming conventions,
and relocates them to the main microkernel directory.

Note: Since the microkernel/channel directory is now empty, the
build system no longer attempts to build its contents.

Change-Id: I936c7cdf2e08f675dd66a87cacf3b4fa5a7a6441
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
ea39fe6c50 Consolidate microkernel pipe marker routines
Relocates several marker-related routines that didn't reside with
the main set of such routines. This move allows one of them to be
made non-global, and the other two to be optimized out (since they
were now just unnecessary wrapper routines).

Change-Id: I517779be1778b032ee08654d244039ef36d30d1c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
57f462281a Consolidate microkernel pipe buffer routines
Merges buffer-related routines into a single file, which also allows
a number of them to be made non-global (and eliminates the needs for
them to be declared in an include file).

Change-Id: Ib4fcf70afef548fd493540753f996a50c78f7521
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
2cab57c7ab Simplify determination of priority for moving pipe data
Uses a simpler algorithm to choose the lower priority value
(i.e. more urgent value) associated with the sender and receiver.

Change-Id: I4e8d2ff9678dfefdcd9941c96a75105841c73fcd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
f6122e2caf Delete unnecessary microkernel pipe subsystem include file
Relocates non-public symbols to the locations they are really
needed (except for CHAN_DEBUG, which is dropped since it is unused).

Change-Id: I52743959a283fec675aa2b3168ef1a122a27ce55
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
bdd9b51999 Consolidate microkernel pipe data transfer routines
Merges related routines into a single file, which also allows a
number of them to be made non-global.

Change-Id: Ib749d3908b86a93bf97c0859861c6eaffe5f5f0a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
278a5ba641 Consolidate microkernel pipe put and get routines
Merges the routines which process the four command packet types
used to process a pipe "put" operation into a single file, so that
the flow of control can be more easily comprehended. Also merges
the analogous routines which process a pipe "get" operation into
a single file.

Change-Id: I56befa0f9a772b3269fd6ece19f003a5c2578a6f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
e3a7b9d808 Consolidate microkernel pipe public APIs
Merges the four main pipe public APIs into a single file,
similar to what is done for other microkernel object subsystems.

Change-Id: Ib3dab0a9330700d77c9fd6f88500590c0004d7b6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
12c59a1d70 Eliminate unnecessary initialization of pipe structure fields
There is no need to initialize fields to zero that are already
nulled out by the build system.

Change-Id: Ib37e77aaadb1beee800ad74dcfba7caff932015e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
4b3e0c9945 Cosmetic cleanup of pipe-related code
1) Eliminates non-functional (i.e. commented out) code.
2) Improves adherence to coding conventions.

Change-Id: I78ad1dd173a49f36c126e1c9f349bace62200174
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
2412e1e50f Limit exposure of non-public pipe types
These structures are only used by the microkernel itself, so they
now reside with other non-public microkernel structures.

Change-Id: I4bbba22e46c5336b7b3c41dcdc76e0d9de4e7e2b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
b2d95338a8 Limit exposure of non-public pipe constants
There's no need to expose option combinations that are only used
internally by the microkernel itself.

Change-Id: I4e2725b060ce5edefdd1918c00fbd915cd67d8dc
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:01 -05:00
Allan Stephens
267753d967 Streamline public pipe APIs
1) Now invokes pipe routines directly, without the use of function
   pointers.
2) Eliminates unreferenced _DEVICE_CHANNEL symbol.

Change-Id: I6e26476265ed8f33febb5a06c9d03daf7147ee5e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Peter Mitsis
18fa789ca0 Rework constructor macros
Routines are no longer flagged as constructors using the FUNC_CONSTRUCT(level)
macro.  This is because some compilers do not support constructor levels.

To indicate that a routine should be a constructor, the SYS_PREKERNEL_INIT()
macro should be used AFTER the definition of the routine.  For example ...

void my_library_init(void)
{
    ...
}

SYS_PREKERNEL_INIT(my_library_init, 500);

The first parameter to SYS_PREKERNEL_INIT() is the name of the routine.  The
second is the priority level (000...999).  The lower the number, the higher
the priority.  NOTE: It is important that all three digits are specified;
otherwise the linker may put the constructors in an undesired order.

Change-Id: Ic334875c60a453b39c10a2ffdee856b4851cb16c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:00 -05:00
Peter Mitsis
1c313b6f89 Remove references to ICC
Keys off variations of "ICC" to remove references to the Intel C Compiler as
it is not supported.

Change-Id: I09f67880b39839982ed1c450e564c274440628a5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens
a02396098d Eliminate exposure of non-public microkernel structures
Renames the include file defining non-public microkernel structures
from k_struct.h to kernel_structures.h, and relocates it to the
microkernel's non-public include file directory. This means that
applications and drivers including the microkernel's public APIs,
using microkernel.h, can no longer access non-public information.

Note: This change also eliminates some redundant #includes by the
microkernel's own subsystems, since the inclusion of minik.h brings
in the vast majority of public and non-public APIs.

Change-Id: Ic7d9ec1ebb8a124ccd0aaad98b50e16c197ffa00
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens
4a56570f9c Eliminate public use of non-public task structure
Revises several trivial task APIs to avoid exposure of task object
internal fields.

Change-Id: Iefa8028042dff1abd1f447eb1cc1ee49f0c2eda5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens
b9e5ff8f9e Eliminate public use of non-public command packet structure
Hard-codes the size of the command packet structure so that the
public microkernel semaphore API can utilize command packet sets
without utilizing non-public microkernel API information.

Also adds code to generate a build error if the hard-coded size
is too small, just in case the size of the command packet changes.
(Can't check for size equality, since the structure size may vary
from one compiler to the next. If the value is too large any extra
space in the command packet set will simply go unused.)

Change-Id: I69e7c2f08e3fe75d74bd712459d5587e22443c04
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens
cff0fc3209 Eliminate exposure of non-public task IRQ type definition
Removes non-public type definition used to implement the microkernel's
task IRQ support from the public API.

Change-Id: I42c22f0fa323c5b9abbc7d3d29a89a9b2b903a36
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens
ec391c363c Relocate misplaced items in main microkernel API include file
1) Eliminates declaration of variables that are already being
   included by a microkernel subsystem include file.
2) Eliminates duplicate declaration of timer_driver().
3) Moves definition of well-known events to the event-specific
   include file.
4) Moves declaration of a task-related routine to the task-specific
   include file.
5) Moves declarations that are only needed by kernel_main.c
   to kernel_main.h.

Change-Id: I6f387915a5ce208879482522586b977118f657e7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Yonattan Louise
8f08126af8 Change task_irq_object from global to local variable.
The variable task_irq_object is global because the test_task_irq project
needed to access it. That data should only be accessed through the API.
To make the variable local, break that dependency to the test project
and restrict the access to the variable.

Change-Id: I1ccb21625d456714a038e0374d124b42aa72e577
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:14:00 -05:00
Yonattan Louise
5f9042e6c1 Fix whitespace issues
Fixing the folling whitespace issues:

- SPACE_BEFORE_TAB : We should not use white spaces before tabs to alignment.
- TRAILING_WHITESPACE : Lines should not end with a white space.
- QUOTED_WHITESPACE_BEFORE_NEWLINE : Removing unnecessary whitespace before a quoted newline.

Change-Id: I024e8d39164c5e5e9d8370f3499d21b49147feee
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise
63e3a4e772 Fix checkpatch issue - ERROR:ELSE_AFTER_BRACE
The 'else' statement should be in the same line that the
close brace of the 'if' statement. E.g.:

	if (condition) {
		do_this();
		do_that();
	} else {
		otherwise();
	}

This commit fixed this kind of error using the following script:

	#!/bin/bash

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
	do
		if [ ! -h $file ];
		then
			sed -i '/^[ \t]*}$/ {
	:review_next_one_too
	N
	s/^\(.*\)\n[ \t]*else/\1 else/
	/}$/ b review_next_one_too
	}' $file;

		fi;
	done

Change-Id: I7e811a572d735fa08e84850055ebbde29eb10e8d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise
918cf45f33 Fix coding style of control statements
There should be a whitespace between the 'if', 'for' and 'while' statements
and the open brace. this commit fix this kind of error.

Change-Id: I4bae17d98f8ec8b698d40253a9a4c873111a8904
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise
b0b11989df Fix checkpatch issue - WARNING:LONG_LINE
Line's length should be shorten than 100 characters. This commit
fixes these lines separating them into two parts.

Change-Id: Ic68c9086866cd778187aa1465470acc0485e2271
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise
dbada63eee Fix coding style issues.
Some checkpatch issues were solved by scripts leaving other problems
such as alignment and indentation issues.  In order to comply with the
defined coding style the following fixes were made:

- Fixed the function declaration moving the parameters' comments above
  the function in accordance to the doxygen format.
- Fixed functions' opening and closing brackets. These brackets should
  not be indented.
- Fixed the 'if', 'for' and 'while' statements adding the brackets
  around the sentence.
- Fixed comments' alignment.
- Fixed indentation.

The work was done manually and submitted as one commit. I didn't
separate these changes in different commits because they were fixed all
at once. Basically, all errors were fixed in every file at once.

Change-Id: Icc94a10bfd2cff82007ce60df23b2ccd4c30268d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Benjamin Walsh
153503d766 timer: micro/nano abstraction for announcing tick
The gain is two-fold:

- Removes the need of preprocessor conditionals in the timer drivers'
  ISRs.
- Allows removing the duplication of the 'tick announce' code across
  all timer drivers.

Change-Id: I6078a0b00a833c1d1ca76474987c3214a0c05f7b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:59 -05:00
Benjamin Walsh
8678e3a9a8 nanokernel/idle: fix file description
Change-Id: I247c592a528b8c2138576026596c765491a8b90b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
d3fe0374da Eliminate _Cput and _Cpsh APIs
These APIs no longer serve a useful purpose; there removal helps
reduce microkernel-related "pollution" of nanokernel files.

Change-Id: I3fb1df1feb47abf1b3e57656175ba6c80e191932
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
32826127de Rename nanokernel files
Makes various nanokernel file names more accurately reflect their
actual roles, and improves consistency with other naming conventions.

Change-Id: Ibea5a66a8d66c4e41810d6b3d70b4c459a3848a8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
4d30cd8408 Eliminate unnecessary operations during nanokernel initialization
There is no need to have code to set fields of _nanokernel to zero,
since the variable is zeroed out during BSS initialization.

Change-Id: I338369511d8b0bcc2fb2b6104acdd281dac9a926
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
16f935ab1f Cosmetic changes to nanokernel initialization code
1) Revises name of background/idle task stack area to make it
   more meaningful.
2) Converts a routine to be non-global since it isn't used elsewhere,
   and renames it to remove an unneeded leading underscore.
3) Updates and enhances comments to better reflect the current
   operation of nanokernel initialization.

Change-Id: Ibff7703562d1a9585dc2022741a6f0acb90c0a78
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
5d4390f012 Eliminate unneeded arguments during nanokernel initialization
No longer passes arguments to _nano_init() that aren't needed.

Note: Also eliminates duplicate declarations of _nano_init()
that are obsolete.

Change-Id: I36ddfc9ceb18e3e5d6942a23574e38c1dfd3eb65
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
9597404727 Consolidate nanokernel initialization code
Moves all nanokernel initialization code into a single file, since
they are all conceptually related.

Change-Id: Icd4e8572756fdcef7d0b965224ae00824e748a0a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens
ffdbe7d691 Consolidate the nanokernel's context manipulation APIs
Moves all general purpose context manipulation routines into a
single nanokernel file, since they are all conceptually related.
(This also eliminates the anomaly of having APIs that could be
used with a task in a fiber-specific file.)

Change-Id: Idb862175e8795962dd78d31b66151f7b14936df0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:58 -05:00
Allan Stephens
a139256afc Enhance microkernel command stack size bounds checking
Ensures that the microkernel's command stack has at least one element
at project configuration time, rather than at project build time.

Change-Id: I74f10bcb0d0275854801b50d5160fc85fb911250
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:58 -05:00
Allan Stephens
103e84abcb Rename hidden TICKLESS_KERNEL config option to SYS_CLOCK_EXISTS
The revised option name more accurately describes its purpose, and
avoids potential confusion with the microkernel's tickless idle
capability. Also, inverting the "polarity" of the option means that
conditional code that references it does not have to use negative
logic, which make the code easier to comprehend.

Change-Id: I0c6f82f077a87a28544048d214efa7020939e566
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
0507aefbdc Continue limiting exposure of microkernel APIs needed by sysgen
Relocates and renames the include file which declares non-public
APIs needed by sysgen from the directory containing the microkernel's
public API to the directory containing its non-public API.

Note: Need to come up with a more elegant way for generated
kernel_main.c to access kernel_main.h, since the current relative
path approach is kludgy.

Change-Id: I5e4b07038e566f1f161001d676a3b0faa487a480
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
fb64710410 Limit exposure of non-public microkernel APIs needed by sysgen
Hides the existence of these routines from the microkernel's main
public API include file, but allows both sysgen and the microkernel
itself to continue accessing them.

Change-Id: Iaf1beff81d045e9df29eb07517793e4b4410f51e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
f4e72a4175 Limit exposure of non-public microkernel APIs defined by sysgen
Hides the existence of these routines from everyone but the
microkernel's initialization code.

Change-Id: I5dc0a1395c7f01f39d8f283e4f48b0c95578902e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
56f93e3a21 Eliminate unnecessary K_TIMER type
Since the K_TIMER type is a non-public API used within the micro-
kernel itself, it doesn't provide any real type abstraction benefit
that isn't served equally well by the struct k_timer type it is
based on.

Change-Id: I482d7c0459d5734402be541322ff752dd1a3714a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
19ec0685df Limit exposure of non-public microkernel object API
The encoding of the microkernel object identifier fields is
something that only the microkernel needs to know.

Change-Id: I3701760cdce5768e082b6d2432b75382f5a2f557
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
6ecfc66152 Limit exposure of non-public microkernel timer APIs
Hides the existence of these APIs from everyone but the
microkernel's timer subsystem itself.

Change-Id: I49482a6e16fee28f1ed3e2244e47df401854c9fc
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
067a47558f Consolidate (most) microkernel non-public API declarations
Relocates the declarations for most non-public microkernel APIs
into the main include file for such APIs (i.e. minik.h), then
eliminates the per-subsystem include files. (The per-subsystem
files don't serve any significant purpose now that the routines
comprising each microkernel subsystem have been consolidated.
In fact, there wasn't a single file that included one of these
files that didn't already include minik.h!)

Note: The channel APIs have not been consolidated yet, as they
require further cleanup. Also, one mailbox API that is used only
by the mailbox subsystem itself is moved there rather than being
placed in minik.h.

Change-Id: Ic7f1ac8a67bd39b685f70379dffff0d0caf1b290
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
8e71a756c9 Limit exposure of microkernel system clock
Hides the existence of the microkernel's tick count variable
from everyone but the microkernel system clock subsystem itself.

Change-Id: I6bd20c28758a52eeac376617dd8d542c03738c2a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
7890a5960b Limit exposure of microkernel timer lists
Hides the existence of the microkernel timer list variables
from everyone but the microkernel itself.

Change-Id: I81b64040efce849328e860067e37731b755a094d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
4a77f47a9e Limit exposure of microkernel event list
Hides the existence of the microkernel event list variable from
everyone but the microkernel event subsystem itself.

Change-Id: I5a2ac41ebd8131b85897c60eaae24013f10686f0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
fb7f961554 Rename EVENTS to _k_event_list
Brings the name of this non-public microkernel variable into line
with those of analogous variables.

Change-Id: I17dc343faf2dc1ace63b5a3e8164ff08ddd60ebd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens
678aea8e65 Delete unnecessary kmemcpy.h file
File no longer has any content.

Change-Id: Ia13f8ea3fe7762a335d03a829f9525c15b484483
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Yonattan Louise
a8571c4b7f Fix checkpatch issue - WARNING:SPACING
Spaces between the function name and the open parenthesis are not allowed.
This commit fixes the case where only one open parenthesis with leading
whitespaces is present in the line.

	#!/bin/bash

	checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
	do
		# fixing spaces between function name and open parenthesis
		for line in $(eval $checkpatch_script $file | grep "WARNING:SPACING: space prohibited between function name and open parenthesis '('" | cut -d":" -f2)
		do
			echo "$file : $line"
			sed -i ''$line' { /[ \t](.*[ \t](/ b skip_it s/[ \t]*(/(/ ; :skip_it }' $file;
		done;
	done;

Change-Id: I1e026eaee930e297374e5f2f725b78f29824dee3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise
3f1439bf2d Fix checkpatch issue - ERROR:OPEN_BRACE
The open braces of the 'if','for', 'while' and 'do' statements should be at the end on the
same line of the statement to comply with the defined coding style. E.g.:

	if (x is true) {
		we do y
	}

Change accomplished with the following script:

	#!/bin/bash

	checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*" ! -path "*/outdir/*");
	do
		if [ ! -h $file ];
		then
			# obtaining the line's number where the error is reported in a reversed order
			reversed_lines="";
			for line in $(eval $checkpatch_script $file | grep "ERROR:OPEN_BRACE" | cut -d":" -f2)
			do
				reversed_lines="$line $reversed_lines";
			done;

			# fixing the issues in reverse order due to lines can be deleted affecting futher lines
			for line_reported in $(echo $reversed_lines);
			do
				# search for the line where the open brace is
				char_found="";
				let line=$line_reported-1;
				while [ ${#char_found} -eq 0 ]
				do
					let line=$line+1;
					char_found="$(sed -n ''$line' { /{/ p }' $file)";
				done

				let statement_line=$line-1;
				let brace_line=$line;

				# condition to avoid modifying lines that ends with the character "\"
				char_found="$(sed -n ''$statement_line' { /\\$/ p }' $file)";
				if [ ${#char_found} -eq 0 ];
				then
					# fix the issue
					echo "$file : reported on $line_reported (found on $brace_line -> moved to $statement_line)";
					sed -i ''$statement_line' { s/[ \t]*$//; s/\([ \t]*\/\*.*\*\/\)$/ {\1/; /{/ b already_done s/$/ {/; :already_done }; '$brace_line' { s/{[ \t]*//; /^[ \t]*$/ d }; ' $file;
				fi
			done
		fi
	done;

Change-Id: I517c40bb33840ef531f2319354350f578b238abb
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise
2ac4a04b92 Rename __defaultEsf to _default_esf
Updating global variable's name to follow a consistent naming convention.
Explicitly moved from __ to _ by direction of Ben Walsh

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: Idd6f7c3c2fdd818f0a794985f3689705cac3c0a2
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise
0db750f266 Rename cmdpacket to cmd_packet
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: Ie65865c480be5b6a678ef4716dade3ee745bd88f
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:53 -05:00
Yonattan Louise
4d19693b33 Rename _NanoKernel to _nanokernel
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
79a1e38f20 nano_stack: rename 'proc' field to 'fiber'
The 'proc' name was a remnant of legacy naming.

Change-Id: I1ee47e47728e4bd927d7fe2284f72ace6b9aebc6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
2480e773e3 nano objects: standardize on if(ptr), not if(ptr != NULL)
This notation is more concise and carry the same information.

Change-Id: Iba2023d37c2f3168fa44750441a29a6e024c0d7e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
f84697fd17 nano objects: rename fiber/ISR 'give' routines
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
63a85d1eb7 nano objects: clarify 'fibers preempting tasks' comments
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
806fce93b7 nano_fifo: use a _nano_queue for the data queue
Change-Id: I963ab8a30b54a765f23e86158e7c38dd5cfff546
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
a221bfcb63 nano_fifo: abstract data enqueue/dequeue in functions
Removes code duplication.

Change-Id: I7c06f29fca5d81319a2ab945d4e391a3c9a73523
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
b4484a7816 nano_lifo: allow multiple fibers to pend
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
7a7ba579c5 nano_sem: allow multiple fibers to pend
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
194ad8da3b nano_fifo: use struct _nano_queue and _nano_wait_q routines
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
e499df7bb0 nanokernel: add struct _nano_queue and wait_q access routines
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>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
774c982226 nano_stack: rename instances of 'channel' to 'stack'
The 'channel' wording was misleading.

Change-Id: Idbfc2322fd6ba8e26d59255c9b9a6e2274df22a8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
d2e3bc985b nano_sema: rename instances of 'channel' to 'sem'
The 'channel' wording was misleading.

Change-Id: I36ccd0944c057fd9f6356c67c2f5f0dc867920a9
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh
66fd33ee7c nano_fifo: rename instances of 'channel' to 'fifo'
The 'channel' wording was misleading.

Change-Id: Ibcd5dc2fe83cea860475380470647ba23ac88a2a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:52 -05:00
Benjamin Walsh
5f98c3a863 nano_lifo: rename instance of 'channel' to 'lifo'
The 'channel' wording was misleading.

Change-Id: I0f6f620e728d24988159cb80ee98edcaf7c52ec0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:52 -05:00
Benjamin Walsh
a24d2a5a9d nano_stack: clean up code style and comments
Change-Id: If4518b3883eb0950398dd9bcd4b850154d325ac3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:52 -05:00
Benjamin Walsh
6fb9111aef nano_sema: clean up code style and comments
Change-Id: I65a9ee0c2e54d8ae669975773c5fb6044ffb6e48
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:52 -05:00
Benjamin Walsh
e870a5649d nano_fifo: clean up code style and comments
Change-Id: I6bcb9d68d1577666a157a4fce66ca048b0067985
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:52 -05:00
Benjamin Walsh
5dbc32c831 nano_lifo: clean up code style and comments
Change-Id: Iff410707f60a6b43bc1bad067c08f646dda94565
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens
2b39dde39c Relocate definition of microkernel server's stack area
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
ec87ce02a5 Finish consolidating workload monitoring code
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
67730d8da9 Cosmetic changes to workload monitoring logic
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
674b8329dd Increase consolidation of workload monitoring code
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
2a7151ac9f Rename _k_node_workload_get() to _k_workload_get()
Shorten API name by removing extraneous wording.

Change-Id: Iff67c4d7e82b7093e3d4d8a7ce61a3011e0ff517
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens
22dee03628 Consolidate command packet code
Merges content of microkernel's taskcall.c file into cmdPkt.c.

Change-Id: Ifc3642a6f0ff4fb98423a36b1e7d18acfade2991
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens
11e8a2bdd9 Eliminate useless microkernel #ifdefs from nanokernel files
These conditionals are no longer required.

Change-Id: I70db7328cd48db7dceeb4ee982a048c3e07980d1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens
a5928e1bb7 Delete unreferenced task debugging constants and variable declarations
Change-Id: Ia34b8c5dde4b0b100d0173023adf2ff0a6f7b11f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:52 -05:00
Dmitriy Korovkin
3342ddf012 Change _nano_ticks to 64-bit
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>
2016-02-05 20:13:52 -05:00
Dmitriy Korovkin
e82a2a36c7 Compiler specific configuration
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>
2016-02-05 20:13:52 -05:00
Dmitriy Korovkin
58accba801 Make absolute symbol macros headers compiler dependent
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
df5d8b0b16 Rename _HandleExpiredTimers to _k_timer_list_update
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
96b5da8bd4 Cosmetic changes to _LowTimeGet()
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
b33dc88eb5 Relocate misplaced system clock routines
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
05390a986b Cosmetic changes to _LowTimeInc()
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
c747690754 Eliminate kernel/microkernel/ticks.c
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
2f9718338e Relocate arch-independent _TaskAbort()
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
105477a2e0 Cosmetic changes to microkernel server file
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
df368598cb Rename kernel/nanokernel/microk.c to kernel/microkernel/server.c
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
9f15ffb092 Enhance idle task busy waiting logic
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
8c169b915a Cosmetic cleanup of microkernel idling code
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
9c27fbac74 Relocate idle-related microkernel code
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>
2016-02-05 20:13:52 -05:00
Allan Stephens
73f9775c01 Eliminate kernel/common sub-directory
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
2fd8964a71 Eliminate kernel/common/bsp sub-directory
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
2468393fe0 Eliminate microkernel/movedata sub-directory
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
e2e998acf2 Eliminate microkernel/core sub-directory
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
642349287b Eliminate microkernel/timer sub-directory
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
661ba14943 Eliminate nanokernel/core sub-directory
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
3c8fb4ac7a Eliminate nanokernel/task sub-directory
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>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
ceeab10167 Renaming *_node_tick_delta to just *_tick_delta
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>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
c46f1082d8 Renaming *_node_cycle_get_32 to *_cycle_get_32
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>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
6b51cb461c Renaming *_node_tick_get to *_tick_get
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>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
901c4f94d3 Renaming *_node_tick_get_32 to *_tick_get_32
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>
2016-02-05 20:13:51 -05:00
Allan Stephens
c535392d8e Renaming task_node_workload_get to task_workload_get
Eliminates unnecessary "node_" portion, as there is only a single
source for which workload information is collected.

Change-Id: Id7c03e2149d1b7979a6921e99e1db0288da09c0c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:51 -05:00
Allan Stephens
e3d5ec6d7a Removing _k_this_node
Since the microkernel now supports only a single processor, there
is no longer a need for a means to identify it.

Change-Id: If5b2d8e114d8a3bfdd597bc23d70be5e1fa2238c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:51 -05:00
Allan Stephens
8f1e42df2c Delete KS_MemCpy() and KS_MemCpyA() APIs
No longer referenced, and not part of the public API.

Change-Id: I97b7bbfe695fc867f93cb222ad893d112f25f755
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:51 -05:00
Allan Stephens
460dfdf9b3 Eliminate unnecessary utilities directory
There are no longer any utilities left in this directory.

Change-Id: I444851efd034453ca59eb211cac2aa6aa3d8c4fe
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
f600758ba9 Renaming cmdPktGet to _cmd_pkt_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I873804e2f2c0b14ab23f6fc2c40e38948e0543c1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
fe1226713c Renaming InitPipe to _pipe_init
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I4a3755e77038eccbd31f8247cb230052dd3edccf
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
9e8c06563e Renaming GROUP_TASK_ macros to TASK_GROUP_
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.  This specific change maps the macro to the
function naming used by the OS.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: If41030c6b9f0417356807b0cc6f4c287378e0c17
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky
272064cd19 Renaming K_taskcall to _k_task_call
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia28f05f27a2e0748bd0499966653c7cc02e04387
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:50 -05:00
Allan Stephens
8aa14ab4dc Allow microkernel timer code to support tickless kernel
- Needs the same change as for nanokernel timer code to prevent
a divide by zero error.

- Eliminates a prototype version of task_sleep() that attempted
to delay by busy waiting; this won't work because the kernel
won't have any timer support in place at all!

- Removes some unnecessary #ifdefs.

Change-Id: I0debf7aed4e4075f5821a77014c3a1d65fefe923
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
9df8af92d6 Allow nanokernel timer code to support tickless kernel
Only required a minor tweak to avoid a divide by zero error.

Change-Id: Id2cc680ba621f0a3df9660606e9bbfa81c6fbe46
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
f64b8a0784 Allow memory pools to support tickless kernel
Revises microkernel memory pool code so that it properly handles the
case where the kernel does not have timer support.

Change-Id: I38fc3916681bbd3ac678399724ddb679a16f6ead
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
8065d38da7 Allow memory maps to support tickless kernel
Revises microkernel memory map object code so that it properly
handles the case where the kernel does not have timer support.

Change-Id: I2dfb0663c91370ffbaed94d1d6aea909f64398db
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
0fef5cc2ac Allow mailboxes to support tickless kernel
Revises microkernel mailbox code so that it properly handles the
case where the kernel does not have timer support.

Change-Id: Ibd3ff657e0cad1320d037d7c1e3e3c673c56c9e9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
f67864c249 Allow FIFOs to support tickless kernel
Revises microkernel FIFO code so that is properly handles the
case where the kernel does not have timer support.

Change-Id: If069cafbcf695c48c2d788ea2a6b6e04a9f0c878
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
b31f1d2b5e Allow semaphores to support tickless kernel
Revises microkernel semaphore (and semaphore group) code so that
it properly handles the case where the kernel does not have timer
support.

Note: Semaphore code has some commands and routines whose names
imply that they are used only in cases where a timeout occurs,
even though they can be used in non-timeout scenarios too!

Change-Id: I6747032dd215f9b98e9d7d971e4b3ff32fbd7e55
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
e0bf49224c Allow mutexes to support tickless kernel
Revises microkernel mutex code so that it properly handles the
case where the kernel does not have timer support.

Change-Id: I987780521e137b95b9544013793937cdf45abafb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
1965fe0990 Allow task IRQ code to support tickless kernel
Revises microkernel task IRQ code so that it properly handles the
case where the kernel does not have timer support.

Change-Id: Idc9bd120151e5c18798e1ed98af30dabe245fe64
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
c6e467e3dd Allow events to support tickless kernel
Revises microkernel event code so that it properly handles the
case where the kernel does not have timer support.

Change-Id: I72b0cef0e6a8cd19206857ec6c7564edf94edb72
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Dan Kalowsky
270f8d8768 Renaming k_timer.Tr to k_timer.period
Updating the micro kernel structures and variable names to create a
more meaningful context by their name.

Change-Id: Ib3ae2cd9055f0690d454a0f52488721541c0fb62
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:49 -05:00
Dan Kalowsky
cc4180074d Renaming k_timer.Ti to k_timer.duration
Updating the micro kernel structures and variable names to create a
more meaningful context by their name.

Change-Id: Ie7b14787d36d99ed131db6ac3d4fbb652dc39b57
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
f6699ae741 Convert LITE references to TICKLESS_KERNEL references
Converts all remaining references to the obsolete LITE symbol by
changing them to CONFIG_TICKLESS_KERNEL.

Note that the tickless kernel capability remains experimental,
as more work is required to properly support it.

Change-Id: Ie0d2514d00c3fd86297f38499e79f4d9c9edc15c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
3a7c6f32fc Remove most references to LITE symbol
Most kernel code that depends on the state of the LITE symbol
has this dependency removed, since the symbol was used for an
incomplete feature that could not be enabled. This change has
no operational impact, as the LITE symbol was never defined
by the build system.

In a handful of timer-related references to LITE are not removed,
as they will be useful in adding a tickless kernel capability.

Change-Id: I4ae37f484e3ab08093b732d45aca87d2e8678adf
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens
1c32b5d720 Introduce NUM_TASK_PRIORITIES configuration option
Allows the number of task priority levels supported by the micro-
kernel to be configured, rather than fixing this value at 64.
Setting NUM_TASK_PRIORITIES to N provides support for task
priorities 0 (highest priority) through N-1 (lowest priority).
The lowest priority is reserved for the kernel's idle task.

This enhancement allows system designers to significantly reduce
the size of the microkernel's task priority queues by eliminating
unneeded queues. In systems requiring only a few task priorities
over 500 bytes can be saved.

Change-Id: I497aac608a3d548fb1b024068c08a5f494c3d524
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
a6f9d1a7b8 Renaming K_mvdreq to _k_movedata_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I32e0105c90ef1a7f7326dd43c39c0eb85e173ee3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
9cd404161d Renaming K_nop to _k_nop
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iefd087790814dbfa10ee942f4f93d955b25f42f1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
33bb451faf Renaming K_workload to _k_node_workload_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I6b3d61c9ae7b024bb82356678cc2fc1d433dd3bc
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
24ad23d7fb Renaming K_offload to _k_offload_to_fiber
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0e29bab5dcb7e00a394304a23e4b91e3e7b4cf75
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
b0d718d116 Renaming K_dealloc to _k_mem_map_dealloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia233946c1c4cce4a9a1b0c72a5f5025e0456441d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
1836e017ce Renaming K_alloc to _k_mem_map_alloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia99f28bd2fa89c0a1d592276bacdcaa679a624dd
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
87e125fcb4 Renaming K_event_signal to _k_event_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie8fecf7de481a6e11879124100362abe010c63a0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky
b591a3d775 Renaming K_sigevent to _k_do_event_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia89406fe3e605d38d5d8e99a8385f20dc0898fae
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
435dad4381 Renaming K_event_test to _k_event_test
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I725ef09143213ef869064ca3b22bc35e4804089d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
e723e9a943 Renaming K_event_set_handler to _k_event_handler_set
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia74ced653daf4b4ea139f7316d1a9e5a5ea9a925
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
672bda57cd Renaming K_queue to _k_fifo_ioctl
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ibbfef7d1a6a26abca56d49733ce54f56ec5336fc
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
fee5db1259 Renaming K_unlock to _k_mutex_unlock
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iec1871232b52bcc39bfc37d8f02bb4ce74f98ad3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
59e836ba75 Renaming K_monitor_read _k_task_monitor_read
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0ceedf607b91a1ebb25cbf5f46202020c9c65a84
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
b4bf63d1ff Renaming K_monitor_args to _k_task_montior_args
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I369f7dc7d78451d47e2c0788bd7fcd517298dc4a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
a59bf5a126 Renaming K_monitor_task to _k_task_monitor
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I1e3f19336ba5c89aa30d8a0045cb79398da56bb0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
c05d780c96 Renaming _SysPowerSaveIdleExit to _sys_power_save_idle_exit
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ife7e4fcd5a3f550d3da28d0c13f83c4adabe48a9
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
bae67b2b58 Renaming _SysPowerSaveIdle to _sys_power_save_idle
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I2cf754540cdca1b107898241d8016613711f677b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
3550116e82 Renaming K_elapse to _k_time_elapse
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ic8106240bff4fbfb9d1bf446d343b3e8631be45c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
167e977cbf Renaming K_sleep to _k_task_sleep
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I8c99b555275243772e91248659e340b07d41be98
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
b28fb27e1d Renaming K_wakeup to _k_task_wakeup
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: If11051da4478ef34dddd5661202b7d3486a7fba3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
8b4d6a618f Renaming K_stop_timer to _k_timer_stop
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie765eb9f4b075b66d69e0f35f5f0771df9fd2244
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
e0fab87035 Renaming K_start_timer to _k_timer_start
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I2aca9bffe8ce6f61f9c272fc8ba009ffc94ec21b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
f23bb63606 Renaming K_dealloc_timer to _k_timer_dealloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3119cb67a64398426ef783c915b865fe02f7127a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
7a21cc0d2d Renaming K_alloc_timer to _k_timer_alloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iecf0984c786b48aacc23947b2a033995c3996d09
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
fb0cf2ed7d Renaming K_yield to _k_task_yield
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie07e38bca912647e49a2c0914001690b7c545f3b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
3a9ff35beb Renaming K_set_prio to _k_task_priority_set
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I725126b52c68bbcbc1fe832fa892b67b6a60146a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
ff37393a07 Renaming K_groupop to _k_task_group_op
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iff54480375197fc1fad947a8dc98b970e142dcaf
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
cc84ca20d6 Renaming K_taskop to _k_task_op
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Icb28c7393314118d07eeaad2db634f2afe391e02
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
52de992543 Renaming K_inqsema to _k_sem_inquiry
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I5eef6b5686f4f0bea525f8d3fcbee09a264289da
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
46478250f1 Renaming K_resetm to _k_sem_group_reset
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I4b7b8a624b8cdd56f0ed95721b58077c7d412d0b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
d8f5461f2d Renaming K_resets to _k_sem_reset
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0656956bd43a952592ed0a3ebed7e4b9db5cc556
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
2ba9c244a3 Renaming K_signals to _k_sem_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I010e56fc6b17337863efeb23ea4b64bd9d09168a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
43a23786d9 Renaming K_signalm to _k_sem_group_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iebde762379bf36c43c802c6ec2febf8cd867171c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
30ac0b3007 Renaming K_waitsreq to _k_sem_wait_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I9ed961ac9f01ead2ec688febc579874407e3b6db
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
aa0eefb856 Renaming K_waitmany to _k_sem_group_wait_any
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I894597fa00b9364451f6609c1b7c3b550c5c0c32
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
4ad6fe35ca Renaming K_waitmreq to _k_sem_group_wait_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I60d8a5ef34b7a6763f682f517319f81145ba9b1e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
32d45baab0 Renaming K_waitsrpl to _k_sem_wait_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie633b6fb90775e48c59b73da52ba2b1be4ae35d3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
e941440ae6 Renaming K_waitmrdy to _k_sem_group_ready
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I2e7da030c447a41bb427b8599f97d84f1c1c1774
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky
c822a446a7 Renaming K_waitmtmo to _k_sem_group_wait_timeout
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie71e119d39a15d223a1c4f9d94f729f84dae1ed9
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
b330543d90 Renaming K_waitmacc to _k_sem_group_wait_accept
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Idfa1822876c05b4416e7e254bec7c27195ed9737
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
06c2417d4e Renaming K_waitmcan to _k_sem_group_wait_cancel
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ifffa92fb53cafa5c76dd66a5910554226951bffa
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
34b2c67080 Renaming K_waitmend to _k_sem_group_wait_end
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Id1c504bb09875fba3e75c80810eef3e0b037d125
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
979b40f77f Renaming K_deqreq to _k_fifo_deque_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I7bcf9d9df788caec6d4e4dd29d1c0b58efc87af2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
10aaf5aefa Renaming K_deqrpl to _k_fifo_deque_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ic3f0816ebc4e7df7bfdb90005d774abd748d14af
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
ec121586f0 Renaming K_enqreq to _k_fifo_enque_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iba93e81cd3daec24831c45d31dfd905327e7ec18
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
e0d338a7e9 Renaming K_enqrpl to _k_fifo_enque_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3d006b76386a4ac8fc82192bf83c028bc66455ed
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
ec1dd85846 Renaming K_lockreq to _k_mutex_lock_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0113be3f432d96857cea651d22ebf9822117101f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
d3c35c2d40 Renaming K_lockrpl to _k_mutex_lock_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I8aefe976518badd3acbe2b246f695931d94c58ed
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
2a6e4ed661 Renaming K_RelBlock to _k_mem_pool_block_release
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I7fc8d96a722970d6c5333544f047cd1a6d6690b2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
b3b8e72dab Renaming K_GetBlock _k_mem_pool_block_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ibbca87c801157ef48996e86f7b4b3a87eab5628a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
dc703d8f81 Renaming K_gtbltmo to _k_block_get_timeout_handle
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I366189b4cf896020c10dbeed25c7d104a0d106a1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
770c5fc42c Renaming K_GetBlock_Waiters to _k_block_waiters_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I1a4bdbb5d7248896830ea25d2126b1bb9b918878
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
5a8528cf23 Renaming rgetblock to get_block_recursive
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3ed882edff2cae66cb1c22fe40cc32994d01dbb3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
e73b4ba153 Renaming searchblock_onfraglevel to search_block_on_frag_level
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I905f8144411ad3832cf40a76b13f459e488c542c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
fe32b0717b Renaming K_Defrag _k_defrag
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Id6215f2aaab918ce13e99909c21f67647cf7229e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
a536a18693 Renaming InitPools to _mem_pools_init
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I9f3fc202c580d158a18737ff0f16a25952902ae4
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
8f41d89142 Renaming K_alloctmo to _k_mem_map_alloc_timeout
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I5fa261fc3798fc3f2b1c608fcb74744741ec74f6
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
12af4313ea Renaming InitMap _mem_map_init
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0eb8925e53f00b7993374fd8ed3e6ac950dfc1ef
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
629d73d857 Renaming K_senddata to _k_mbox_send_data
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I6e0edb61dcac091f87c9ffc8fd8bf507ba075367
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
7651e26d9d Renaming K_recvdata to _k_mbox_receive_data
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I5f879ff27f8b7d02ab148cb05dd1916a831a51a8
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
8ad329b09e Renaming K_recvreq to _k_mbox_receive_request
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I79b03884f154507aa22c42c3c89136c202c2c9e0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
88343e969c Renaming K_recvrpl to _k_mbox_receive_reply
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: If7f5e78d6dd5492dbbbcc080c2e822f33eb1c967
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
9ac922e096 Renaming K_recvack to _k_mbox_receive_ack
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3de0a16879f142ef20830dfc429c989f10c2cd92
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
5ea892cffc Renaming K_sendreq to _k_mbox_send_request
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I628e057f54eb72901c3753b6b8b4849c4cd046c0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
35d15ec09a Renaming K_sendrlp to _k_mbox_send_reply
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I02122837d74c9d7c5c406e644feda6923b5161f2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
217de05b4b Renaming K_sendack to _k_mbox_send_ack
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iccdd40f652f71273830155349a957839be970bd9
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
842d2c28e2 Renaming copypacket to copy_packet
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie6a828039b10107c24965c4e8a3c7e71c7c10389
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
c6f22be75f Renaming K_taskirqalloc to _k_task_irq_alloc
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I098a03afcef8319c8ce8410a67de250143713498
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky
e91808154e Renaming K_eventtesttmo to _k_event_test_timeout
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3919b2dda4a37c2c81e070179eae251131b14be4
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:45 -05:00
Dan Kalowsky
58d8a4020c Renaming _PowerSave to _power_save
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I71b09ddc214c360c61b4736cef72597334bc47f3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:45 -05:00
Dan Kalowsky
1e511b2066 Renaming _GetNextTimerExpiry to _get_next_timer_expiry
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Id84ccdabfbbe12d3c13d09ad68d97b0a2fcf72e1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:45 -05:00
Dan Kalowsky
43779366ad Rename wlMonitorCalibrate to workload_monitor_calibrate
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ifca97426eeb9347374af392508f3a5526c3410b5
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:45 -05:00
Dan Kalowsky
490c702343 Renaming _WlLoop to _workload_loop
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I26965c7640b6caeb73ac11b4f6d5fa793a0be65b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:45 -05:00
Peter Mitsis
425437037d Remove references to K_DataFree
K_DataFree is only relevant to multi-node systems.

Change-Id: I1892ae94df6d964aca66ba9b06655f7b3e47c812
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:45 -05:00
Peter Mitsis
a7407cbeb6 Remove references to LinkIn and LinkOut
The LinkIn[] and LinkOut[] arrays are not used.

Change-Id: I8c2909a587160f0715aa3a82a41d78b86d4ea56c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens
e4b70a95fb Eliminate GEN_OFFSET_SYM_HOST() macro
Gets rid of code that creates absolute symbols for data structures
that are no longer referenced by external tools, as well as the
macro that was used to generate them.

The code that creates absolute symbols for context monitoring-related
symbols is retained, but is now directly tied to the CONTEXT_MONITORING
configuration option upon which those symbols depend.

Change-Id: I6b2ce46d9ab9592a478f591cb074c4c163e9ba0f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens
b32f81dbe4 Rename "activeLink" field of CCS to "next_context"
Modifies the name of this field to make its purpose clearer,
and to align with coding conventions.

Change-Id: I8de78df1a0459122067d650130e01078afb5af8a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens
c7661eb981 Transform HOST_TOOLS_SUPPORT config option to CONTEXT_MONITOR
Revises this option to make its purpose clearer, and to align it
with other experimantal monitoring-type configuration options.

Change-Id: I593bb7560b5a0544eb05affaa07b59dd78ea907e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens
5765af636f Remove unnecessary conditional comments
Eliminates conditional comments that don't really serve a useful
purpose.

Change-Id: I4f26cae67971d1d80bd06075da89e5573b0780d4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Johan Hedberg
ac63429177 Bluetooth: Add skeleton for HCI core
To introduce the Bluetooth stack to the tree we need some additions to
the configuration options, as well as the very basic header files. The
patch also adds a skeleton for a bt_init() function that applications
will need to call to initialize Bluetooth functionality.

Change-Id: Ideb24dfea584b71f514e05eb47654b659776133e
Co-authored-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
8489e2410d Rename K_DebugLowTime to _k_debug_sys_clock_tick_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Id55e2394076ed44694e3f761f8a0e6e7bf0b59f9
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
a43d34d618 Rename K_wl_scale to _k_workload_scale
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ia4fdc22a19ae6d338b78055c20b6581971a715d0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
79dd1b48bd Rename TaskSwitchCallBack to _k_task_switch_callback
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I18b2fb3250db6a7a6717b8329702e2b76a7492f9
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
eecb9466d5 Rename K_monitor_nrec to k_monitor_nrec
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I5a889519aa0b00436731d4d4eccf91b810b424a3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
ef3a395c49 Rename K_monitor_wptr to k_monitor_wptr
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I3e2dec591ac41a01b61bb1822cc22f17c0cbc1f9
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
0a5d10669d Rename K_monitor_mask to _k_monitor_mask
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I6ac0943b06e645598712c56565904f4943cc12bd
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
b1b4747e8f Rename K_monitor_capacity to k_monitor_capacity
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I44e74e2edd4b76797aa5ac7d4f0f528ce1a3bfae
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
d2d2de9039 Rename K_monitor_buff to k_monitor_buff
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I3597e8ec742b6317cc3f3513a283326a32b789eb
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
e2be61c15e Rename K_StackSize to _k_server_stack_size
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I56ee3d3ab6d1254359adcffa4d86c1bf2e20537a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
ab9c05ac2a Rename _SysIdleElapsedTicks to _sys_idle_elapsed_ticks
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I4e5c9419fe0ccbc4b2990b96fc95c697decc18e0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
14d19a7bc3 Rename SlicePrio to slice_prio
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iefa600d4b2c981a7146fc34c0fb5e491690a694c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
ee96425b55 Rename SliceTime to slice_time
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I5538ce1bb13da14b0d4778264f9d36bf246c497a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
224a6b16ec Rename SliceCount to slice_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I18710011b215ddb5040f8d073d7e4fb13783af94
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
a9c772cbb6 Rename _SysIdleThresholdTicks to _sys_idle_threshold_ticks
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I4b7f7806fcfcbeed1abbc2421c3fc470af87eb7d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
d7af5727e8 Rename _SysPowerSaveFlag to _sys_power_save_flag
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ide44a5957321a1dd2971a341da2d35dfb1e0d0ac
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
25622e5dc4 Rename WldT_end to _k_workload_end_time
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I26bc34923ca3a5f9557138f062e0ed2346737ec2
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
54bd7b59d3 Rename WldT_start to _k_workload_start_time
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I1b470b85c8fca2c8381cb49c29cbd1f0a4708b54
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
76220c1de4 Rename WldTDelta to _k_workload_delta
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ifed3a15c4f79af72355dcc1beba90973f7bc0959
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
f6fe9949a3 Rename Wld_i0 to _k_workload_i0
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I826a0a1ac6ab1db54905d7500ef82202bce6bbde
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
63ffb96a69 Rename Wld_i to _k_workload_i
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I043f24f75c4f9bb6aa6358b1015519260d326d25
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
26874aabd6 Rename WldN1 to _k_workload_n1
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I20dca589df9253fb950aafa060eec1463f696f82
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
b96dd2669d Rename WldN0 to _k_workload_n0
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I99e5b8a15f6bee1cc7efb7a339c2e15076da90d3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
1bd57ea4c6 Rename WldT1 to _k_workload_t1
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I0edd17bc4019ff3924ac4bca00baac4faf4d7d3f
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
d56d0af493 Rename WldT0 to _k_workload_t0
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ic1d437b33789369515aa7f29401be8d365eac279
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
b11fa62c50 Rename WldRefT to _k_workload_ref_time
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I31baa614d4951cfcc6a56661cad6132514fb17a7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
934bd58779 Rename WldTicks to _k_workload_ticks
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I6d54bd5e39c74c7c627c61878239bbe79e08de59
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
4f0d1ed4f4 Rename WldSlice to _k_workload_slice
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I73fea5925bd580fb00d1873240db1591b1e80a8d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise
6120750f19 Rename K_max_eventnr to _k_num_events
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Idcd3b4dfd86b6e835638623fa7b39401cabdee06
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
7ca6ed4a8c Rename K_DebugHalt to _k_debug_halt
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ia591e26dc082302ea4333deeb132d1732700e63e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
91791874e8 Rename K_TimerFree to _k_timer_free
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I0a807704a81b1faf4b79fe3832830c4994795fe3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
ece60ad6f5 Rename K_ArgsFree to _k_server_command_packet_free
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I175a8bcd29e21d64de735fba9a2e2ee2bc57993e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
93a1d7ca89 Rename K_Args to _k_command_stack
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I5e249e34ee9666666e31db6b9f71fe2abcc22400
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
48c73dbe5d Rename K_LowTime to _k_sys_clock_tick_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ie9ee644501bf608c4881969f376b586077f3b7c9
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
b4db2ae7fc Rename K_Ttail to _k_timer_list_tail
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I5e774c9b78ace93049a41824cee0305ceb69228d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
fc6d85e56b Rename K_Thead to _k_timer_list_head
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I8ad0774ad26836e193ed94165491e0bb1e6e9a0c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
07dd3b2188 Rename K_PrioBitMap to _k_task_priority_bitmap
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iff92324e4442883cde8d7e1b6831d091c77584ce
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
9bbb6e1e7b Rename K_Task to _k_current_task
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ic81b4ad7edf476da61ae62df627866e0446714d7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
f282dbcb1f Rename K_PipeCount to _k_pipe_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I10a1bff593c56cf6703920b9feccd10e32cc65ef
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
d109105597 Rename K_PoolCount to _k_mem_pool_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I413e59e0200c2b8eba1bee79e444b3492de8fb7c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
5c3646b5d9 Rename K_MapCount to _k_mem_map_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ifdfb9042ff4e83f6d7a8430d47c573b85eca9048
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
86c128d3ba Rename K_PipeList to _k_pipe_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I77d459388aa26eaa52d0f59234d761f3ca7d1496
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
652796d345 Rename K_PoolList to _k_mem_pool_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: If9b4747ffa6f9dae4cb77717931fed445ae43721
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
e960e23410 Rename K_QueList to _k_fifo_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I8996c427a98f542052b40bcc9f623c05f6d9bb21
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
054d3f0787 Rename K_SemList to _k_sem_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I2045fab9f67fda6f0d26a53d47561a705046d4db
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
69bc5940d2 Rename K_MutexList to _k_mutex_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I719d6f1a89b343d149eded7227534ee30055e030
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
65ffb9e81e Rename K_MbxList to _k_mbox_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ibe83bc837cdae54cf553b80efd989ad321447873
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
59d838355a Rename K_MapList to _k_mem_map_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I12ab3ee4111a32afc674b654bf0a914012ec0318
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
3473bb7609 Rename K_TaskCount to _k_task_count
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iafa862861cc6b56212c036acc0bb182e2c620e7b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
d57685c93e Rename mainStack to _k_init_and_idle_task_stack
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I3d7f9dfe1874d189fa613088efd8c056b974e01b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
c4bd9cc6ab Rename nanoTimerList to _nano_timer_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I2e501394b7fa4264d9854659e2dd008e5c94b540
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
cf0b28d243 Rename nanoTicks to _nano_ticks
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iebefec0e02cbb838564dd71fd4424c1adbff31f5
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
a07990ecea Rename K_ThisNode to _k_this_node
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I1b3cb984fa75cd1a83649c81787a40aee97f8a32
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
bf650d4fe5 Rename K_TaskList to _k_task_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I4c27dd98967dedbb15e28618f5dd8f26b919579d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
964a9c9d77 Rename K_PrioList to _k_task_priority_list
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Idff77a32adb875789a57d2c9131b87769bf6f174
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
3bd9fc04a8 Rename intLockUnlockNest to int_lock_unlock_nest
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ied3e173313f9c3a65ee5559a19bfa047f1d71863
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
e888a4c7b4 Rename intLockingLatencyMin to int_locked_latency_min
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I90299ee1def6e5c1158cb19faec0a711afebbc7d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
b3eb2bd4f8 Rename intLockedTimestamp to int_locked_timestamp
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I926fa5b9246d79478f4ee7e255b36fe2fe44ec93
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise
ad74268b58 Rename intLatencyBenchRdy to int_latency_bench_ready
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I29d8c0a127b252eb3d2ca62f36cd19a09fa1a1d8
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
e7c1f2c20b Rename _InterruptStack to _interrupt_stack
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I36709c9833279f05a186a5c00b996d242c843d4c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
a17eac73c3 Rename _HwIntToCHandlerLatency to _hw_irq_to_c_handler_latency
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ia8a93e07c88bbc559e7bbf0f14815e5e76110fb6
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
da8be3d43e Rename stopDelay to stop_delay
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I92fa9cf5923eec38e4d0437c3cbeeeea4fdca931
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
4bd1bf4df9 Rename nestingDelay to nesting_delay
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: If0b4e6e045e4564bb4e56ba598b77def556f06bb
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
66d3f2be84 Rename intLockingLatencyMax to int_locked_latency_max
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I060310348bffc97b1fef0ed6a8b2d7c975b70f0a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
bfa745b128 Rename initialStartDelay to initial_start_delay
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I95b2198b75ea30e3a6911623b304e4559befab77
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
b07ba0e433 Rename _minik_args to _k_server_command_stack_storage
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I84449466d14457b4d83657280124554bdca63054
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
a12dd63c74 Rename _minik_stack to _k_server_stack
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iad6d39bea0da42633e40e7e7d5b64d2a05efbad0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise
6530f4a26b Rename _minik_func to _k_server_dispatch_table
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" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ifb54b2dbdc726e87b10c33776c0d1815d56776cd
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
079207e5d4 Remove references to obsolete K_PrioCount
The symbol K_PrioCount is not used.

Change-Id: I21e4b929dd0bed097ff4453c4a1a02faab7d0019
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
a53aa6ee7e Remove references to obsolete K_MbxCount
The mailbox count K_MbxCount is not used.

Change-Id: I9f1f7907ca5b966c3ff3bedff7a3318523d3a89f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
83f110e3bd Remove references to obsolete K_NodeCount
The system node count K_NodeCount is both not used and irrelevant to a
single-node system.

Change-Id: If5b2b05d25c0ec2678962ae7ddc2b2dd292ac655
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
95e214c77f Remove references to obsolete K_MutexCount
The mutex count K_MutexCount is not used.

Change-Id: I7a51f2cbff1fc2b2bb628dfce22971d62d8d8821
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
df83113609 Remove references to obsolete K_SemCount
The semaphore count K_SemCount is not used.

Change-Id: Ia23d721d9790c34258c366b8b6ead135cd6eb289
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
f1601bd6f3 Remove references to obsolete K_QueCount
The fifo queue count K_QueCount is not used.

Change-Id: Id7b3cba2d1f58c070e895a1fd5de8e911e15a037
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
d84b4166e2 Remove references to obsolete symbol K_TimerBlockPtr
The symbol K_TimerBlockPtr is not used.

Change-Id: I8421f1a690bf5a05970264696d8e0f8c347867f4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
2e5c205e1a Remove references to obsolete symbol K_ArgsBlockPtr
The symbol K_ArgsBlockPtr is not used.

Change-Id: I0098e5a52324d116f0433b6e1fa6498b2f0520c3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
87d5d009f2 Remove references to obsolete symbol K_DataBlockPtr
The symbol K_DataBlockPtr is not relevant to a single node system.

Change-Id: I3c63b11063b7dcf4d3c7bfa155fdcf0e1ae35fc8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
dc19400f4c Remove references to obsolete symbol K_TimerNall
The symbol K_TimerNall is not used anywhere.

Change-Id: I4289bf16699bcbf8733dec2ca40d9aa7003d1b42
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
6ce6bfc33f Remove references to obsolete symbol K_ArgsNall
The symbol K_ArgsNall is not used anywhere.

Change-Id: I5b5661ab26986960130ef51fd63936fa5c7dfb6c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
dbfc75f74f Remove references to obsolete symbol K_DataNall
The symbol K_DataNall is not relevant to a single node system.

Change-Id: I3203a9c72b6e5bb8f2719c4161fe753a3040c8d3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
558feaffd1 Remove references to obsolete symbol K_DataSize
The symbol K_DataSize is not relevant to a single node system.

Change-Id: Ie57e0610520c5d43d3b8fa90f2a2685fc95ac668
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
6feec0d462 Remove references to host server channels
The host server channels are not used; their function pointers are always NULL.

Change-Id: I7616499f5695b83a015e6ee18c004aba96838d63
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
dcc483f534 Remove references to ENABLE_DEVICE_CHANNEL
The ENABLE_DEVICE_CHANNEL macro is never defined.  Furthermore, there are no
records about what it is supposed to do even if it is defined.

Change-Id: I6b9df005daebcd5af2ca4b3a9f98af8754d41488
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
b699ce5e4e Remove private routine declarations from k_chstr.h
Removes a number of pipe related function declarations out of the publicly
available header file "microkernel/k_chstr.h".  The removed function
declarations were already declared in the private header file "ch_buff.h".

Change-Id: I389b0b898cddfb9320831b94d85054e4cf9458dc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis
dd87d51646 Use <> for include files instead of ""
Using angle brackets <> for include files instead of "" improves coding
consistency.

Change-Id: I5edb71be8f834b5090e71b16c7b542429db89711
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:41 -05:00
Peter Mitsis
bd969c97cc Remove k_boot.h and flashboot.c
The files k_boot.h and flashboot.c are obsolete.

Change-Id: Ieab69e714462079c2a836dacb7c5bab53d2e3b2b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:41 -05:00
Peter Mitsis
c7382898b6 Move TIME_TYPE bits to private header file
The TIME_TYPE bits are only unsed internally.

Change-Id: I5afb64a7492ee6defe79f4a570ab1ea119501b55
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:41 -05:00
Peter Mitsis
f59c0244eb Move REQ_TYPE bits to private header file
The REQ_TYPE bits are only used internally.

Change-Id: I80df7c8a6498ab5624f234df190ffe61267076fd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:41 -05:00
Peter Mitsis
eeeb3215f0 Remove 'DataNode' from k_chproc structure
The 'DataNode' field in the k_chproc structure is not used.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: If87a667953811772c918c12e1c03f8a5c6f7fafd
2016-02-05 20:13:41 -05:00
Peter Mitsis
0d376ab2c8 Remove 'srcnode' from moved_req structure
The 'srcnode' field in the moved_req structure is only relevant to multi-node
systems.  Furthermore, with the absence of the 'srcnode' field, the routine
setup_movedata() requires one less parameter.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I00bbee2d78ef345a00399708215bd9e1ef5298d2
2016-02-05 20:13:41 -05:00
Peter Mitsis
101d486834 Rename k_args 'Srce' field to 'alloc'
Since multi-node systems are not supported, the 'Srce' field now only serves
one purpose--to indicate whether the packet was allocated from the command
packet pool.  As such, a better name (and type) for it is 'alloc' (of type
'bool') since 'Srce' (of type 'knode_t') suggest multi-node support.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I47a935af13fd55dbca23c879841d68caf895eae4
2016-02-05 20:13:41 -05:00
Peter Mitsis
265448a23d Remove 'destnode' from moved_req structure
The 'destnode' field in the moved_req structure is only relevant to multi-
node systems.  Furthermore, with the absence of the 'destnode' field,
the routine setup_movedata() requires one less parameter.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: Ib5deb1369730ccd42ba25d8352d2365d404f9ed3
2016-02-05 20:13:41 -05:00
Peter Mitsis
cfa7411121 Cosmetic: remove cruft from mycopypacket()
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: Ia95366325668476a222c85748f3141d09767c72a
2016-02-05 20:13:41 -05:00
Peter Mitsis
de00c105b9 Remove references to local objects in mailbox code
Concepts such as local objects suggest the existence of remote objects,
which implies a multi-node system.  Multi-node systems are not supported.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I0e6b1c34c35a0f68ad1ccfbf7d9c677ef8b8ae64
2016-02-05 20:13:41 -05:00
Peter Mitsis
fe4c22852a Formatting: adjust indentation in copypacket()
Fixes the level of indentation in the routine copypacket().

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: Id788a3a8ef211c9b75c67bd511fad4e624f58e5a
2016-02-05 20:13:41 -05:00
Peter Mitsis
7e0ee5ab3e Reorder routines in movedata.c
Reorders routines in movedata.c to eliminate the forward declarations.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I74bff9025f221d94688b51cef4cb7499ce61dd39
2016-02-05 20:13:41 -05:00
Peter Mitsis
3b70db2da3 Remove references to multi-node systems in movedata.c
Multi-node systems are not supported.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: If16ffde2bf18d8729bc7d16e558db146b042bb36
2016-02-05 20:13:41 -05:00
Peter Mitsis
6f39a8d627 Remove references to local and remote pools
The concept of 'local' and 'remote' pools only applies to multi-node systems.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I747d28c845174ca36c9788b7412f6fe5cc71f3f7
2016-02-05 20:13:41 -05:00
Peter Mitsis
4d8c717c69 Remove _task_mem_pool_move()
The routine _task_mem_pool_move() is only relevant to a multi-node system.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I191e43f24aa56159a4c4669ff135beceade56284
2016-02-05 20:13:41 -05:00
Peter Mitsis
4b19f3c661 Remove references to SyncLocal
The SyncLocal symbol is not used.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I87c55b8869bbe447436f6e2ccf3d3652b50532ce
2016-02-05 20:13:40 -05:00
Dmitriy Korovkin
f51049b81c Reorganization of time calculating macros
Move time calculation macros from application directory to kernel
directory, since it is used by a kernel component.
In order to follow namespace and naming conventions, convert
macros to SYS_CLOCK_HW_CYCLES_TO_NS* form.

Change-Id: I96e9149c399adc363aed5095ae82a1abc78d2977
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:13:40 -05:00
Johan Hedberg
a789d4e97b nanokernel: Add scheduling context-independent API for starting fibers
When the exact scheduling context is not known it's convenient not to
have to spell out the context in the name of the *_fiber_start()
function. All of the fiber starting APIs map to the same _FiberStart()
implementation, so all we have to do is to declare another alias for
it.

Change-Id: Ic6862383422f89ad7dc4f401e76d610826163bb9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:40 -05:00
Johan Hedberg
9599f21dfb nanokernel: Add scheduling context-independent API for semaphores
When the exact scheduling context is not known it's convenient to have
a wrapper API that uses context_type_get() to call the right function
at runtime.

Change-Id: I02b2ac9039519468f5501571243426a6a57ffc4d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:40 -05:00
Johan Hedberg
68224c1c69 nanokernel: Add scheduling context-independent APIs for nano_fifo
When the exact scheduling context is not known it's convenient to have
a wrapper API that uses context_type_get() to call the right function
at runtime.

Change-Id: Ie72a4b78d53f664575c1d9dfeace52b53d018850
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:40 -05:00
Allan Stephens
2801be129a Eliminate _nano_start()
The helper function _nano_start() is no longer required (due to the
recent relocation of boot banner and kernel build timestamp code),
so the kernel's initialization code calls _nano_fiber_swap() directly.

Change-Id: I06b9f473715afbfbdd4105b0def3445f1b2e3583
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens
5555bcff31 Relocate boot banner and kernel build timestamp handling
Moves boot banner and kernel build timestamp code to the kernel's
main initialization routine, since it doesn't really belong in a
generic fiber-processing file.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis
68637b0fdc Remove K_memcpyrpl()
The K_memcpyrpl() routine is not applicable to a single node system.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: Ia778a6fc43e390a6c0478d641c206d2423a93c27
2016-02-05 20:13:40 -05:00
Peter Mitsis
4a413fc424 Remove K_memcpyreq()
The K_memcpyreq() routine is not applicable to a single node system.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I6cdc056f4575099a8838f0bcf32e87479295452d
2016-02-05 20:13:40 -05:00
Peter Mitsis
26d6f89d3b Remove K_remreply()
The K_remreply() routine is not applicable to a single node system.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I0e99a9db077d5625c981ed219461efa7c955072e
2016-02-05 20:13:40 -05:00
Peter Mitsis
b52882f540 Minimize k_boot.h's header file inclusion
The header file k_boot.h does not need everything that "k_types.h" drags in.
It only needs "stdint.h" for the uint32_t type.  This has an immediate impact
on "flashboot.c" as it was improperly relying upon the extra items that
"k_boot.h" dragged in.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: Ib8bfbec52a1198846295d549091dc30bf041d97a
2016-02-05 20:13:40 -05:00
Peter Mitsis
dac410fea5 Remove file netload.c
The file netload.c is for multi-node systems only.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I612ccb5552d7781f9a06e1b4db3dce97cf99f91a
2016-02-05 20:13:40 -05:00
Peter Mitsis
ee8213a6e0 Remove references to NODEx.c
"NODEx.c" is no longer used.  The correct file is "kernel_main.c".

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I62523b9181a446097ef3bd278553e097183ed307
2016-02-05 20:13:40 -05:00
Sarah Sharp
030d59ce4b Clarify set_state_bit: rename variables, add comments.
Rename local variables to provide more clarity and improve readability:
 - X -> task_ptr
 - f_old -> old_state_bits
 - f_new -> new_state_bits
 - H -> task_queue
 - Y -> cur_task

Add comments to clarify what this function actually does without needing
to open two additional files (include/microkernel/k_struct.h and
kernel/microkernel/core/global.c).

This function is called when a task needs to be marked as not runnable.
A task can be not runnable for a variety of reasons, which are tracked
in a bitmask defined in kernel/microkernel/include/minik.h.

Tasks that are runnable are stored in a global array, K_PrioList, that
contains a list for each task priority level.  Tasks that have
transitioned to not being runnable will be removed from their priority
list by this function.

Change-Id: I07a1180e75e30cdef472c5f77638fc5971ddbaeb
Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis
4c37b6b726 Remove comment referencing NODEx.c
The file NODEx.c is obsolete; it has been replaced with kernel_main.c.
Even if it the comment contents were fixed, it would offer no value.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis
77cff87e42 Remove useless comment
There is no point to having a comment reference the old hard-coded
maximum number of events.  The maximum number of events is by
definition 'K_max_eventnr'.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis
880c109f20 Remove references to deprecated W/WT naming convention
The W/WT naming convention is not used anymore.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis
941cab98b0 Replace use of OFFSET with stddef's offsetof
Instances of the custom OFFSET() macro are replaced with the standard
offsetof() macro from stddef.h to reduce code duplication.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:39 -05:00
Yonattan Louise
5b5f4eb948 Fix checkpatch issue - WARNING:LINE_SPACING
Adding a line after variable declaration in order to comply with
the defined coding style.

Change-Id: Id41af88404bd37227bfd59a2d71ce08d0d6ce005
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:39 -05:00
Yonattan Louise
16a2c5800d Fix function declarations on samples
This commit fixes the coding style of the function declarations and aligning
the open and close brackets and change the style of parameter's documentation.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change-Id: I648d36eb29dafc7fcd87b8db01e682bea993e5d2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:13:11 -05:00
Dan Kalowsky
adf4739424 Replacing _TimerStop with _timer_stop
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
d5e175231d Replacing _TimerStart with _timer_start
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
55af242704 Renaming nanoTimeInit to nano_time_init
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
2d5fa0198f Renaming _StackPop _stack_pop
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
ac412eb456 Renaming _StackPush _stack_push
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
36d2d09a6e Renaming _SemTake to _sem_take
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
48d35b30ab Renaming _SemGive to _sem_give
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
3acec988cb Renaming _FifoGet to _fifo_get
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
11b9184955 Rename _FifoPut to _fifo_put
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
338f3e2244 Renaming _LifoGet to _lifo_get
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
7c558249ae Renaming _LifoPut to _lifo_put
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
31e11d6316 Replacing _NanoInit with _nano_init
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
b4f9a9e04d Renaming _NanoStart to _nano_start
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
18c8d41bcc Rename _NanoFiberSwap to _nano_fiber_swap
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
ff8c2c0487 Rename _FiberStart to _fiber_start
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
bcddb11e8c Rename _InsertCCS to _insert_ccs
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
1cc59ccce9 Renaming _ContextEntryRtn to _context_entry
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
522b9ad432 Renaming _ContextExitRtn to _context_exit
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
ff0641fac6 Renamign intLatencyShow to int_latency_show
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.conf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
ff00dbecce Renaming intLatencyInit with int_latency_init
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
df50981dba Replacing _IntLatencyStop with _int_latency_stop
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
5b09162bb1 Rename _IntLatencyStart to _int_latency_start
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Dan Kalowsky
fe95d5c018 Renaming nanoCpuSetIdle to nano_cpu_set_idle
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Changing with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Inaky Perez-Gonzalez
8ddf82cf70 First commit
Signed-off-by:  <inaky.perez-gonzalez@intel.com>
2015-04-10 16:44:37 -07:00