mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
freertos: Refactor stream buffer spinlock initialization
This commit refactors the way stream buffers initialize their spinlock. - "prvInitialiseNewStreamBuffer()" now initializes the stream buffer fields manually (instead of using memset()) to avoid resetting the spin lock - Stream buffer creation functions now manually initialize the spinlock after the other fields are initialized using "prvInitialiseNewStreamBuffer()" Also added comments to event group spinlock initializtion.
This commit is contained in:
@@ -136,10 +136,10 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
||||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
|
||||
traceEVENT_GROUP_CREATE( pxEventBits );
|
||||
#ifdef ESP_PLATFORM
|
||||
/* Initialize the event group's spinlock. */
|
||||
portMUX_INITIALIZE( &pxEventBits->xEventGroupLock );
|
||||
#endif // ESP_PLATFORM
|
||||
|
||||
traceEVENT_GROUP_CREATE( pxEventBits );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -190,9 +190,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
/* Initialize the event group's spinlock. */
|
||||
portMUX_INITIALIZE( &pxEventBits->xEventGroupLock );
|
||||
#endif // ESP_PLATFORM
|
||||
|
||||
traceEVENT_GROUP_CREATE( pxEventBits );
|
||||
}
|
||||
|
Reference in New Issue
Block a user