Skip to content

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Mar 26, 2019

Description

Mail and MemoryPool did not permit access to the blocking form of allocation available in CMSIS-RTOS 2 - give them new blocking methods.

Fixes #10216.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[X] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Release Notes

  • Mail and MemoryPool now provide blocking forms of alloc calls that can sleep the thread until a memory block is available.

@kjbracey kjbracey force-pushed the memorypool_blocking_alloc branch 2 times, most recently from 8d4000e to 86e177f Compare March 26, 2019 09:07
@ciarmcom ciarmcom requested review from a team March 26, 2019 10:00
@ciarmcom
Copy link
Member

@kjbracey-arm, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@kjbracey kjbracey force-pushed the memorypool_blocking_alloc branch from 4a6741c to 8f1dcff Compare March 26, 2019 11:05
}

/** Allocate a memory block from a memory pool, optionally blocking, and set memory block to zero.
@return address of the allocated memory block or NULL in case of no memory available.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be good to add the description of millisec parameter here as well
@param millisec timeout value (osWaitForever to wait forever)

Mail and MemoryPool did not permit access to the blocking form of
allocation available in CMSIS-RTOS 2 - give them new blocking methods.
@kjbracey kjbracey force-pushed the memorypool_blocking_alloc branch from 8f1dcff to b8d90fb Compare March 26, 2019 12:13
@cmonr
Copy link
Contributor

cmonr commented Apr 9, 2019

@ARMmbed/mbed-os-core Would anyone fancy a look?

Copy link

@deepikabhavnani deepikabhavnani left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 10, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 10, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr merged commit b1e48db into ARMmbed:master Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support osWaitForever in Mail::alloc() and Mail::calloc()
7 participants