Changeset 02733495 in rtems
- Timestamp:
- 11/24/14 14:20:25 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 42fe0d3
- Parents:
- 46689a1e
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/24/14 14:20:25)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (11/25/14 15:08:16)
- Location:
- cpukit/libcsupport/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libcsupport/src/free.c
r46689a1e r02733495 37 37 * Do not attempt to free memory if in a critical section or ISR. 38 38 */ 39 if ( _System_state_Is_up(_System_state_Get()) && 40 !malloc_is_system_state_OK() ) { 39 if ( !malloc_is_system_state_OK() ) { 41 40 malloc_deferred_free(ptr); 42 41 return; -
cpukit/libcsupport/src/malloc.c
r46689a1e r02733495 25 25 #include "malloc_p.h" 26 26 27 #include <rtems/score/sysstate.h>28 29 27 void *malloc( 30 28 size_t size … … 49 47 * Do not attempt to allocate memory if not in correct system state. 50 48 */ 51 if ( _System_state_Is_up(_System_state_Get()) && 52 !malloc_is_system_state_OK() ) 49 if ( !malloc_is_system_state_OK() ) 53 50 return NULL; 54 51 -
cpukit/libcsupport/src/malloc_deferred.c
r46689a1e r02733495 28 28 #include "malloc_p.h" 29 29 30 #include <rtems/score/sysstate.h> 30 31 #include <rtems/score/threaddispatch.h> 31 32 … … 34 35 bool malloc_is_system_state_OK(void) 35 36 { 36 if ( !_Thread_Dispatch_is_enabled() ) 37 return false; 38 39 return true; 37 return !_System_state_Is_up( _System_state_Get() ) 38 || _Thread_Dispatch_is_enabled(); 40 39 } 41 40 -
cpukit/libcsupport/src/rtems_malloc.c
r46689a1e r02733495 27 27 #include "malloc_p.h" 28 28 29 #include <rtems/score/sysstate.h>30 31 29 void *rtems_heap_allocate_aligned_with_boundary( 32 30 size_t size, … … 35 33 ) 36 34 { 37 if ( 38 _System_state_Is_up( _System_state_Get() ) 39 && !malloc_is_system_state_OK() 40 ) { 35 if ( !malloc_is_system_state_OK() ) { 41 36 return NULL; 42 37 } -
cpukit/libcsupport/src/rtems_memalign.c
r46689a1e r02733495 25 25 #include <errno.h> 26 26 27 #include <rtems/score/sysstate.h>28 29 27 int rtems_memalign( 30 28 void **pointer, … … 46 44 * Do not attempt to allocate memory if not in correct system state. 47 45 */ 48 if ( _System_state_Is_up(_System_state_Get()) && 49 !malloc_is_system_state_OK() ) 46 if ( !malloc_is_system_state_OK() ) 50 47 return EINVAL; 51 48
Note: See TracChangeset
for help on using the changeset viewer.