Commit Graph

153 Commits (dc6e9db0674e34c476acc4a0c5d61f7c6181ac99)

Author SHA1 Message Date
Paul Szczepanek 86f8b0b818 extend the event generation int 2021-03-10 18:21:07 +00:00
Paul Szczepanek 3f9c734e1a bigger equeue generation size and only increment when needed
to mitigate against generation clash
2021-03-09 22:08:43 +00:00
Martin Kojtal 9607ceaebf
Merge pull request #13975 from adbridge/eventq
Update EventQueue API to use chrono times
2021-02-08 12:44:39 +00:00
adbridge c7c30fe9f7 Remove trailing space 2021-02-04 14:25:29 +00:00
adbridge d1b768ad9a Tweak events API update and update Greentea tests accordingly 2021-02-04 12:48:41 +00:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Martin Kojtal 97c7c91655
Merge pull request #14087 from adbridge/events
Update events period method to check for invalid values
2021-01-18 16:29:30 +00:00
adbridge 81d7ac683b Minor formatting tweak to fix file permissions 2021-01-18 14:59:30 +00:00
adbridge 4f558743e1 Revert "one final whitespace change!"
This reverts commit c9a3375042.
2021-01-18 14:42:02 +00:00
adbridge c9a3375042 one final whitespace change! 2021-01-12 14:38:37 +00:00
adbridge 27689ef2b3 Further whitespace fixes 2021-01-12 13:29:26 +00:00
adbridge 1746ed0bc0 Fix whitespace to stop astyle complaining 2021-01-12 12:54:56 +00:00
adbridge 9e7c82ceed Fix astyle issues 2021-01-08 17:33:51 +00:00
adbridge 37f13bdeb2 Remove unecessary namespace qualified
(Also minor whitespace correction)
2021-01-08 17:15:13 +00:00
Rajkumar Kanagaraj bc4b3f5846
Apply suggestions from code review
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
2021-01-08 03:20:15 -08:00
adbridge f2b86864d5 Fix some whitespace issues 2021-01-06 16:07:04 +00:00
adbridge c0a57ba3b9 Updated event period handling and greentea test
non_periodic constant has been moved out of the Event class and
made static within the events namespace so that it is available
both internally within the class and externally.

The MBED_ASSERT has been changed to MBED_WARNING.

The greentea test has been updated:
1) timings reduced to make the test cases run faster
2) The call handler simplified
2021-01-06 16:07:04 +00:00
adbridge 6b2a0fe1d4 Update events period method to check for invalid values
The period method currently allows any ms value positive, negative
and zero. A negative value means dispatch a non periodic event
ie just once. 0 is unspecified behaviour. This commit forces the
user to use either positive periods or a new constant non_periodic
and should any other value be provided will default to
non_periodic.

A Greentea test case is also provided to check this works as
expected.
2021-01-06 16:07:04 +00:00
Rajkumar Kanagaraj accf24aeaf CMake: Add CMake support for events greentea test 2021-01-05 09:11:06 -08:00
adbridge 8ab6290f23 Review feedback - capitilise argument descriptions 2020-12-09 16:03:23 +00:00
adbridge 8a5671b1f5 Update Event period and delay parameter comments 2020-11-26 16:04:11 +00:00
adbridge 95f40aa8ff Fix the time units stated in the delay and period functon headers
delay() and period() still stated that the units were milliseconds
whereas in fact they are now a Chrono duration.
2020-11-25 17:34:25 +00:00
Martin Kojtal 57bbb4739b
Merge pull request #13085 from pea-pod/remove-deprecated-mbed-assert
Change MBED_STATIC_ASSERTs version for built-in
2020-11-24 13:38:07 +00:00
Hugues Kamba 794e32df74 CMake: Use relative paths to list source files and directories
The absolute path is still required for listing linker
files as they are referenced from a function in the top
level CMake input source file.
2020-11-09 12:32:30 +00:00
Hugues Kamba bf84a5b329 CMake: Rename CMake targets
* mbed-os renamed mbed-core
* mbed-os-<COMPONENT> renamed mbed-<COMPONENT>
2020-11-06 17:25:22 +00:00
Martin Kojtal 8529e88e61 cmake: fix present inclusion
We use only _PRESENT macros for components if they are enabled. Use the same in
the mbed.h file or anywhere else.
2020-11-06 17:25:21 +00:00
Hugues Kamba fa98689639 CMake: Componentize Mbed OS into multiple CMake targets (#13732)
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`.

Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
2020-11-06 17:25:21 +00:00
Hugues Kamba 8b21238e08 CMake: Fix failure due to events and netsocket dirs changes 2020-11-06 17:25:17 +00:00
Hugues Kamba a63fa605e4 CMake: Add support for events dir 2020-11-06 17:25:15 +00:00
pea-pod 507181d262 Change MBED_STATIC_ASSERTs version for built-in 2020-10-27 08:30:40 -05:00
Harrison Mutai 4fad1112e5 Add SPDX license identifier to Arm files
Add license identifier to files which Arm owns the copyright to,
and contain either BSD-3 or Apache-2.0 licenses. This is to address
license errors raised by scancode analysis.
2020-10-15 10:47:27 +01:00
Martin Kojtal a6ce2c53a0 platform: move internal headers to internal/
They belong to internal folder to follow our guideline, not in source as they were.
2020-08-20 08:58:00 +01:00
George Psimenos fe7ae8a50f Remove deprecated local unit tests 2020-07-28 09:17:19 +01:00
George Psimenos d480fab08b CI & local unit test fixes 2020-07-28 09:17:19 +01:00
George Psimenos 76f37fb2bc Restructure events directory & move tests 2020-07-28 09:17:19 +01:00
Kevin Bracey 0eff3340d2 Add Chrono support to Event/EventQueue 2020-04-27 10:19:08 +03:00
Maciej Bocianski bc89974462 UserAllocatedEvent: set delay/period at event posting
Event delay/period can be modified by equeue so it has to be reset at every post.
2020-02-12 10:20:28 +01:00
Maciej Bocianski b4fac71325 user allocated events: fix event cancelling
for user allocated events use id for event state tracking
skip event canceling when already canceled or dispatched
2020-02-12 10:20:27 +01:00
Maciej Bocianski acfdc588af equeue: skip equeue_incid call for user allocated events while dispatching
User allocaded events doesn't utilize id field in a way that normal
event does, so we shouldn't call equeue_incid on it
2020-02-12 10:20:26 +01:00
Maciej Bocianski a2e5a34df6 unittests: fix windows build
- set equeue platform to posix for MINGW
 - enable PRIx formatting globally
 - remove redundant Semaphore implementation
2020-02-05 14:20:06 +01:00
Ladislas de Toldi 1507b1c3e1
Add check for __APPLE__ & __MACH__ to fix unit tests on macOS 2020-01-27 16:09:54 +01:00
Kevin Bracey 3d7bff6cdb Test event IDs going negative 2019-10-31 13:36:01 +02:00
Kevin Bracey 8f67043445 Test equeue_cancel returns 2019-10-31 13:35:11 +02:00
Kevin Bracey aad7d9183b equeue: avoid non-standard bit shifts
Shifting negative numbers right is implementation-defined, and shifting
positive signed numbers left and exceeding positive range is undefined.

Take care to make sure we always shift unsigned values.
2019-10-31 13:02:15 +02:00
int_szyk 53be630637 Expand documentation of equeue 2019-09-16 15:11:49 +02:00
int_szyk dc5b9fba09 Tweak equeue chain tests
Changed the order of destroying queues because it is needed to destroy
queues in specified order when they are chained.
2019-09-16 13:35:28 +02:00
Martin Kojtal 5e693778f4
Merge pull request #11441 from gpsimenos/gp-move-source-files
Organize source files and add Doxygen labels
2019-09-11 08:00:03 +02:00
Martin Kojtal 9f35e71ca5
Merge pull request #11446 from maciejbocianski/UserAllocatedEvent_update
add missing asserts to UserAllocatedEvent class
2019-09-10 19:22:34 +02:00
George Psimenos bd95c53a4c Move source files and add Doxygen labels 2019-09-10 14:31:24 +01:00
Maciej Bocianski f5f174474b add missing asserts to UserAllocatedEvent class
Improves code quality by adding MBED_ASSERT to UserAllocatedEvent::delay
and UserAllocatedEvent::period function. This prevent changing already posted event.
2019-09-10 09:50:24 +02:00