Skip to content

Commit ea8d77e

Browse files
author
yuhaiping
committed
Fix the issue of byte pool alloc fail when compile with -O3 optimization
eclipse-threadx#334
1 parent 07eac30 commit ea8d77e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

common/inc/tx_byte_pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ VOID _tx_byte_pool_initialize(VOID);
101101

102102
/* Define internal byte memory pool management function prototypes. */
103103

104-
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size);
104+
UCHAR *_tx_byte_pool_search(volatile TX_BYTE_POOL *pool_ptr, ULONG memory_size);
105105
VOID _tx_byte_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
106106

107107

common/src/tx_byte_pool_search.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
/* resulting in version 6.1.7 */
8484
/* */
8585
/**************************************************************************/
86-
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size)
86+
UCHAR *_tx_byte_pool_search(volatile TX_BYTE_POOL *pool_ptr, ULONG memory_size)
8787
{
8888

8989
TX_INTERRUPT_SAVE_AREA

common_smp/inc/tx_byte_pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ VOID _tx_byte_pool_initialize(VOID);
101101

102102
/* Define internal byte memory pool management function prototypes. */
103103

104-
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size);
104+
UCHAR *_tx_byte_pool_search(volatile TX_BYTE_POOL *pool_ptr, ULONG memory_size);
105105
VOID _tx_byte_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
106106

107107

common_smp/src/tx_byte_pool_search.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
/* resulting in version 6.3.0 */
8585
/* */
8686
/**************************************************************************/
87-
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size)
87+
UCHAR *_tx_byte_pool_search(volatile TX_BYTE_POOL *pool_ptr, ULONG memory_size)
8888
{
8989

9090
TX_INTERRUPT_SAVE_AREA

0 commit comments

Comments
 (0)