Define a macro which takes as input a requested stack buffer
size, and returns the size of the stack object needed to
contain it.
An optional architecture interface is provided, though many
arches will be fine with the default implementation.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some forthcoming macros will need this. This may now
be individually defined by arch code instead of hanging
off of ARCH_THREAD_STACK_DEFINE.
Some additional details added to the documentation string.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This can be in inline function, which gains us some
type safety.
Temporarily define Z_STACK_PTR_ALIGN() in terms of it,
slated for removal once some other changes land.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A new macro Z_THREAD_STACK_OBJ_ALIGN() defines the alignment
of the lowest memory address of a stack object.
Related is a new arch interface ARCH_THREAD_STACK_OBJ_ALIGN()
which lets arches specifiy this. ARCH_STACK_PTR_ALIGN or a
power-of-two ceiling is used if not defined.
The default stack macros now use this instead of hard-coding
ARCH_STACK_PTR_ALIGN.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
MISRA-C wants the parameter names in a function implementaion
to match the names used by the header prototype.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This interface is documented already in
kernel/include/kernel_arch_interface.h
Other architectural notes were left in place except where
they were incorrect (like the thread struct
being in the low stack addresses)
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
arch_new_thread() passes along the thread priority and option
flags, but these are already initialized in thread->base and
can be accessed there if needed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This board doesn't have any known users and is not really maintained
anymore, so just remove it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
() The thread created to be used for timing measurement does not
need to run, so use K_FOREVER instead of K_MSEC().
() Thread cancel is actually using k_thread_abort() so re-word it
correctly to indicate it is aborting a non-running thread.
() The other k_thread_abort() is used on _current so re-word
the item.
Relates to #25458
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update release notes API change section with information on change to
fs_open parameter list.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add new tests that will utilize open mode flags with the open
function.
A few test functions which assumed O_CREAT behavior are updated
to specify it explicitly.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The fs_open flags has been changed to accept open flags, which requires
changes to open(...) to support the new flags.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit changes signature of open function from:
int open(const char *name, int flags)
to
int open(const char *name, int flags, ...)
Currently existing two argument invocations should not require any
rework.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The addition of support for open flags, within fs_open, requires
addition of new test cases.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The addition of support for open flags, within fs_open, requires
addition of new test cases to FAT FS back-end tests.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Common procedure, to use with fs back-ends, have been added for testing
various fs_open flags combinations.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The fs_open has been extended with support for open flags.
Currently supported flags are:
FS_O_READ -- open for read
FS_O_WRITE -- open for write
FS_O_CREATE -- create file if it does not exist
FS_O_APPEND -- move to the end of file before each write
The FAT FS and LittleFS front-ends within the Zephyr has also been
modified to utilize the flags.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
We have been doing an AND comparison instead of an OR. AND does exclude
way to many testcases where multiple tags are being used.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There are possible buffer overflows when parsing the ip address and
SSID. Ensure that we never overwrite the ip and SSID buffers.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Limit to kernel tests, this should not try and run every sample or test
we have as it only verifies the coverage feature, but not collecting
coverage.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use --integration testing for CI to limit execution and builds on
platforms that actually provide most of the coverage instead of blindly
building/running on all available platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>