mirror of
				https://github.com/FreeRTOS/FreeRTOS-Kernel.git
				synced 2025-11-04 02:59:01 +01:00 
			
		
		
		
	Covert object type check to runtime check (#846)
* Covert object type check to runtime check It was checked using assert earlier. --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
		
							parent
							
								
									a936a1b156
								
							
						
					
					
						commit
						7562ebc6e1
					
				@ -324,9 +324,16 @@
 | 
			
		||||
    static OpaqueObjectHandle_t MPU_GetHandleAtIndex( int32_t lIndex,
 | 
			
		||||
                                                      uint32_t ulKernelObjectType ) /* PRIVILEGED_FUNCTION */
 | 
			
		||||
    {
 | 
			
		||||
        OpaqueObjectHandle_t xObjectHandle = NULL;
 | 
			
		||||
 | 
			
		||||
        configASSERT( IS_INTERNAL_INDEX_VALID( lIndex ) != pdFALSE );
 | 
			
		||||
        configASSERT( xKernelObjectPool[ lIndex ].ulKernelObjectType == ulKernelObjectType );
 | 
			
		||||
        return xKernelObjectPool[ lIndex ].xInternalObjectHandle;
 | 
			
		||||
 | 
			
		||||
        if( xKernelObjectPool[ lIndex ].ulKernelObjectType == ulKernelObjectType )
 | 
			
		||||
        {
 | 
			
		||||
            xObjectHandle = xKernelObjectPool[ lIndex ].xInternalObjectHandle;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return xObjectHandle;
 | 
			
		||||
    }
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user