k_poll_signal was being used by both, struct and function. Besides
this being extremely error prone it is also a MISRA-C violation.
Changing the function to contain a verb, since it performs an action
and the struct will be a noun. This pattern must be formalized and
followed and across the project.
MISRA-C rules 5.7 and 5.9
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixed some Kconfig inconsistencies around THREAD_CUSTOM_DATA,
POLL and NUM_PREEMPT_PRIORITIES.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.
The only directory excluded directory was ext/* since it contains
only imported code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Use the asynchronous version of mbox_put instead of the
synchronous one. Also, add an error check in osMailPut.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Add few missing NULL checks to avoid crash. Also, minor
refactor of signal code and disable osFeature_Wait to
signify osWait function not implemented.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
k_msg_get returns only three possible values, and
osErrorValue is not in osMessageGet spec, hence
removing this unhit else case.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
stacksize is an unsigned integer and hence there's no need to
check whether it is >= 0 since it is always true. This fixes
the Github issue #9637.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Replace an else-if case in osSemaphoreWait with
else to account for both EBUSY and EAGAIN return
values from k_sem_take. The return value would be
0 for osSemaphoreWait in both cases.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Add osErrorTimeoutResource as return value when message
cannot be put in queue during waiting period. Also set
message value only when message is received.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Fix the osSignalWait timeout calculation in cases when
waiting on more than one signal event.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
Consistently use
config FOO
bool/int/hex/string "Prompt text"
instead of
config FOO
bool/int/hex/string
prompt "Prompt text"
(...and a bunch of other variations that e.g. swapped the order of the
type and the 'prompt', or put other properties between them).
The shorthand is fully equivalent to using 'prompt'. It saves lines and
avoids tricking people into thinking there is some semantic difference.
Most of the grunt work was done by a modified version of
https://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string/26290#26290, but some
of the rarer variations had to be converted manually.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Signals are used to trigger execution states between threads.
These APIs provide functionalities like signal set, clear and
wait.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
These APIs allow creating, allocating and freeing
of mempools.
Note: "Mempool" in CMSIS actually means memslabs in Zephyr.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
These APIs provide the support of virtual timers. All timers
can be started, restarted, or stopped. Timers can be configured
as one-shot or periodic.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
This API is used to fetch the kernel system timer as 32-bit value.
This is analogous to k_cycle_get_32 in the kernel.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>