diff options
| author | Frédéric Desbiens <[email protected]> | 2026-02-23 17:37:35 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-23 17:37:35 -0500 |
| commit | 69c64cc9f3426a26a8e69b6cfe4e7cc1ebf2c2c0 (patch) | |
| tree | 7ffa8147e24427c7aa7d174956783105f6ccca79 | |
| parent | efd3de1523645c910612adc89a8e2e3d9bc964c8 (diff) | |
| parent | 596f94be06dc5bc1df4d7685be231a947e4665d9 (diff) | |
Merge pull request #252 from BerninaInternationalAG/create_mutex_before_memory_allocation
Modified logic to create mutex before calling _ux_utility_memory_allocate
| -rw-r--r-- | common/core/src/ux_system_initialize.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/core/src/ux_system_initialize.c b/common/core/src/ux_system_initialize.c index a3e27c4..443ee9a 100644 --- a/common/core/src/ux_system_initialize.c +++ b/common/core/src/ux_system_initialize.c @@ -261,6 +261,14 @@ ULONG pool_size; /* Other fields are kept zero. */ #endif +#if !defined(UX_STANDALONE) + + /* Create the Mutex object used by USBX to control critical sections. */ + status = _ux_system_mutex_create(&_ux_system -> ux_system_mutex, "ux_system_mutex"); + if(status != UX_SUCCESS) + return(UX_MUTEX_ERROR); +#endif + #ifdef UX_ENABLE_DEBUG_LOG /* Obtain memory for storing the debug log. */ @@ -277,14 +285,6 @@ ULONG pool_size; #endif -#if !defined(UX_STANDALONE) - - /* Create the Mutex object used by USBX to control critical sections. */ - status = _ux_system_mutex_create(&_ux_system -> ux_system_mutex, "ux_system_mutex"); - if(status != UX_SUCCESS) - return(UX_MUTEX_ERROR); -#endif - return(UX_SUCCESS); } |
