Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/esp32/freertos: fix semaphore take #11239

Merged

Commits on Mar 27, 2019

  1. tests/freertos: add test for compat layer

    Added test for freertos. Only for BOARD:esp32-wroom-32 at the moment.
    At the moment it only tests xSemaphoreTake(), xSemaphoreTakeRecursive() and the creation of the semaphore.
    It creates the semaphore and calls take for it multiple times and checks whether the return value is correct.
    Take should return (quote freertos documention):
    "pdPASS Returned only if the call to xSemaphoreTakeRecursive() was successful in obtaining the semaphore."
    "pdFAIL Returned if the call to xSemaphoreTakeRecursive() did not successfully obtain the semaphore."
    The same for xSemaphoreTake().
    The future goal for this test is to test the complete freertos compatibility layer
    and to have the test for a general freertos compatibility layer that does not only work for esp32.
    JulianHolzwarth committed Mar 27, 2019
    Copy the full SHA
    0a7a86d View commit details
    Browse the repository at this point in the history
  2. cpu/esp32/freertos/semphr.c::xSemaphoreTake() return value fix

    xSemaphoreTake() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
    and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
    According to freertos documentation:
    "pdPASS Returned only if the call to xSemaphoreTake() was successful in obtaining the semaphore"
    "pdFAIL Returned if the call to xSemaphoreTake() did not successfully obtain the semaphore."
    Fixed it to return the correct value.
    JulianHolzwarth committed Mar 27, 2019
    Copy the full SHA
    1b42d3f View commit details
    Browse the repository at this point in the history
  3. cpu/esp32/freertos/semphr.c::xSemaphoreTakeRecursive() return value fix

    xSemaphoreTakeRecursive() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
    and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
    According to freertos documentation:
    "pdPASS Returned only if the call to xSemaphoreTakeRecursive() was successful in obtaining the semaphore"
    "pdFAIL Returned if the call to xSemaphoreTakeRecursive() did not successfully obtain the semaphore."
    Fixed it to return the correct value.
    JulianHolzwarth committed Mar 27, 2019
    Copy the full SHA
    e1d4551 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2019

  1. Revert "tests/freertos: add test for compat layer"

    This reverts commit 0a7a86d.
    JulianHolzwarth committed Apr 17, 2019
    Copy the full SHA
    be9063c View commit details
    Browse the repository at this point in the history