-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
pure virtual method called
error when running CI tests (#1930)
* Fix `pure virtual method called` error when running CI tests Unsafe to call methods from virtual CThread destructor. Add `terminate()` method to all derived classes and call explicitly _before_ destroying the object. * Added debug statements to confirm thread sequencing correct. * Fix keyboard thread race condition. Small test applications can execute and finish before the keyboard thread has started running. Adding a small delay and an additional check handles this situation and avoids calling the keyb_XX functions. This doesn't guarantee that `keyb_raw()` isn't called during cleanup as the race condition still exists. This isn't a problem in itself, except for the call to `atexit()` which results in undefined behaviour and in practice, a deadlock. It's not required as the keyboard thread calls `keyb_restore()` when it's done.
- Loading branch information
Showing
8 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,8 @@ inline void hw_timer_init(void) | |
{ | ||
} | ||
|
||
void hw_timer_cleanup(); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters