The new kernel doesn't support the thread abort handler concept,
so only the legacy API for this capability is needed.
Change-Id: Ie809092e73b784504c3d298911d216bed8dd8993
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This simplify buffer handling so that no extra references are needed.
Change-Id: Id99a0a75b39ca8db2216668f76c5a672713075ae
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This refactor is in preparation for making driver API structures
const.
The console driver provides a mechanism to install an input and an
output hook function. These are primarily used by the onboard
gdb-server. The output hook is entirely implemented within the
console driver.
The input hook is partially implemented in the top of the uart driver
and within the console driver. The hook function itself is installed
in the uart API structure, but is invoked only by the console driver.
Installing the hook function directly into the uart API structure
prevents the API structure being const. There are two approaches to
fixing this:
1) Implement setting of the input hook in the same way as
uart_irq_callback_set().
2) Move the input hook entirely to the console driver.
We implement the latter. This approach has two benefits, first it
removes the need for every uart driver to implement the behaviour and
second, the current placement of the callback function in the uart API
seems odd given that the callback is only invoked by the console
driver, never by a uart driver.
Change-Id: I258b312d3055df1c2bdeb896bd4f4f39c40838f7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Fleshes out the prototype heap memory pool support
to make it fully operational. Noteworthy changes are
listed below:
Tweaks arguments to k_malloc() and k_free() to be more like
malloc() and free(). Similarly, modifies k_free() to take
no action when passed a NULL pointer.
Now stores the complete block descriptor at the start
of any block allocated from the heap memory pool. This
increases memory overhead by 4 bytes per block, but
streamlines the allocation and freeing algorithms. It also
ensures that the routines will work if the block descriptor
internals are changed in the future.
Now allows the heap memory pool to be defined using the
HEAP_MEM_POOL_SIZE configuration option. This will be the
official configuration approach in the unified kernel.
Also allows the heap memory pool to be defined using the
(undocumented) HEAP_SIZE entry in the MDEF. This is provided
for legacy reasons only.
Co-locates memory pool initialization code to keep the line
that causes memory pool initialization to be done during booting
right next to the routine that does the initialization.
Change-Id: Ifea9d88142fb434d4bea38bb1fcc4856a3853d8d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Reworks k_work_q_start() so that it accepts its 3 configuration
settings directly, rather than forcing the caller to pass in a
configuration data structure.
Change-Id: Ic0bd1b94f1a1c8e0f8a84b3bd3677d59d0708734
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Aligns the APIs for defining a thread at compile time and for
spawning a thread at run time.
Change-Id: Ic5df450cbe4d0eb562fb4a608f1ac5a8a7cb4b96
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
The "__noinit" was accidentally lost during initial prototyping
of the unified kernel. This just restores it ...
Change-Id: Id13e0e9a323c1bcd49c28a5d8da73943b0177890
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Macros SYS_KERNEL_VER_MAJOR(), SYS_KERNEL_VER_MINOR(),
SYS_KERNEL_VER_PATCHLEVEL() capped their return values to 0-15 range,
even though documentation says "Each of these elements must therefore be
in the range 0 to 255, inclusive". Fix to corresponds to the docs. This
issue especially affected SYS_KERNEL_VER_PATCHLEVEL(), which could be
set to a high value to represent WIP code in-between releases.
Change-Id: I0b72fb68f3f0f8d3d3b321a5ba2c48671879dfbc
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
ARC does not align data structures by 4 bytes by default.
Add necessary linker sections.
Change-Id: I3bf7aa38b9bc8cba56f824469040c027968fa564
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Not disabling SysTick as it is optional by the spec.
SVC not used as there is no priority-based interrupt masking (only
PendSV is used).
Largely based on a previous work done by Euan Mutch <euan@abelon.com>.
Jira: ZEP-783
Change-Id: I38e29bfcf0624c1aea5f9fd7a74230faa1b59e8b
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
PM control function is used only by the PM subsystem. Update
documentations to make it clear and name the relevant structures and
functions with _pm_ in the name.
Jira: ZEP-1044
Change-Id: I29e5b7690db34a228ed30a24a2e912e1360a0090
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
This is used by a test case, and it's better to just put this
here instead of forking the linker scripts.
Change-Id: Ifbb90b73bb26118ae2422cc6feccb3db58a26f2c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This mechanism was intended to reserve space during the first pass for
certain data structures created by gen_idt, but this is unnecessary.
The only memory addresses that must be fixed between the two passes are the
locations of the interrupt stubs, which are in the .text section much
earlier than the generated data structures; they do not shift.
Change-Id: I3aab00e171e6a9ff439a7af8d69769e4c29337a7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Ring buffer section now resides under "other" topic, since the
ring buffer type is a general purpose type (like the singly and
doubly linked list types), rather than a kernel-specific type.
Enhances ring buffer section to improve content and improve
consistency with the form used elsewhere in the Kernel Primer.
Also corrects a minor error in the ring buffer API documentation.
Change-Id: Icaa8661524f80e31f173adee859844cadb38967f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Ensures that all APIs which accept a timeout value wait for at least
the specified amount of time, and do not time out prematurely.
* The kernel now waits for the next system clock tick to occur before
the timeout interval is considered to have started. (That is, the only
way to ensure a delay of N tick intervals is to wait for N+1 ticks
to occur.)
* Gets rid of ticks -> milliseconds -> ticks conversion in task_sleep()
and fiber_sleep() legacy APIs, since this introduces rounding that
-- coupled with the previous change -- can alter the number of ticks
being requested during the sleep operation.
* Corrects work queue API that was incorrectly shown to use a delay
measured in ticks, rather than milliseconds.
Change-Id: I8b04467237b24fb0364c8f344d872457418c18da
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
For XIP images, in order to avoid the situation when
__data_rom_start is 32-bit aligned, but the actual data is placed
after rodata section, which may not end exactly at 32-bit border,
pad rodata section, so __data_rom_start points at data and it is
32-bit aligned.
On non-XIP images this may enlarge image size up to 3 bytes.
This is generally not an issue, since modern ROM and FLASH
memory is usually 4k aligned.
Change-Id: I3d37fccbc610615585d776144ab9e281368258d6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
This adds convenient helper so that users don't need to touch nano_sem
internals. Wrapper for unified kernel is added too.
Change-Id: Ic0af8b1ea302939d5239648327cb3cc125c48148
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This change shortens the Service Class macro name from
BT_SDP_*_SVCLASS_ID to BT_SDP_*_SVCLASS
Change-Id: I1150baae24428c6b76f005d11003291016e0a03e
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
This change adds SPP as a sample SDP service during RFCOMM
server registration. The SPP channel is now used as the
fixed channel for RFCOMM register command.
Change-Id: I3b5ad3995725adca55db1497d4a35099f6311f3b
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
This change adds support for registering new service records.
Change-Id: I0ff2264d08787fe5f8edf6300259961c3ca52fbb
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
Add Bluetooth protocol UUIDs to be used in SDP service records
Change-Id: I184cc114ff3fa172d9caa23d0b243a3191bb9773
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>