Skip to content

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Jul 28, 2016

Remove the critical section in mbed_rtc_time.c and instead use a
mutex to protect this. This function does not need to be interrupt
safe, just thread safe.

This fixes crashes on the GCC_ARM toolchain on the RTC test due to
trying to lock the GCC environment mutex while in a critical section.
Prior to this patch, this failure was likely to occur on STM and LPC
processor families.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Jul 28, 2016

CC: @sg-, @geky, @0xc0170

#include "cmsis.h"
#include "CallChain.h"
#include "PlatformMutex.h"
#include "PlatformMutex.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

Move the PlatformMutex class into a dedicated file to reduce the
number of unnecessary includes.
@sg-
Copy link
Contributor

sg- commented Jul 28, 2016

LGTM 👍 Lets run some tests!

@c1728p9
Copy link
Contributor Author

c1728p9 commented Jul 28, 2016

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Jul 28, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=GCC_ARM,ARM,IAR
TARGETS=K64F,NRF51_DK,NUCLEO_F411RE,K22F

@mbed-bot
Copy link

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 553

Build failed!

Remove the critical section in mbed_rtc_time.c and instead use a
mutex to protect this. This function does not need to be interrupt
safe, just thread safe.

This fixes crashes on the GCC_ARM toolchain on the RTC test due to
trying to lock the GCC environment mutex while in a critical section.
Prior to this patch, this failure was likely to occur on STM and LPC
processor families.
@mbed-bot
Copy link

[Build 734]
FAILURE: Something went wrong when building and testing.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Jul 28, 2016

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Jul 28, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=GCC_ARM,ARM,IAR
TARGETS=K64F,NRF51_DK,NUCLEO_F411RE,K22F

@bridadan
Copy link
Contributor

@c1728p9 Any chance you could throw a quick blurb in this PR's description so other people will know about these changes? Probably just copying your commit messages into it would be perfect. Thanks!

@c1728p9
Copy link
Contributor Author

c1728p9 commented Jul 28, 2016

Added a blurb

@mbed-bot
Copy link

[Build 735]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 554

Test failed!

@sg- sg- merged commit 6973ee6 into ARMmbed:master Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants