mirror of
https://github.com/espressif/openthread.git
synced 2026-08-21 09:59:52 +00:00
[message] simplify method for allocating new message from pool (#7210)
This commit removes different `MessagePool` methods that can be used to allocate a new message and combines them into one `Allocate()` method which uses `Message::Settings`. The `Message::Settings` is also updated to provide new constructor initializing it with a given message priority only.
This commit is contained in:
@@ -88,8 +88,8 @@ void TestMessageQueue(void)
|
||||
|
||||
for (ot::Message *&msg : messages)
|
||||
{
|
||||
msg = sMessagePool->New(ot::Message::kTypeIp6, 0);
|
||||
VerifyOrQuit(msg != nullptr, "Message::New() failed");
|
||||
msg = sMessagePool->Allocate(ot::Message::kTypeIp6);
|
||||
VerifyOrQuit(msg != nullptr, "Message::Allocate() failed");
|
||||
}
|
||||
|
||||
VerifyMessageQueueContent(messageQueue, 0);
|
||||
|
||||
Reference in New Issue
Block a user