Changeset 438 for trunk/kernel/mm/kmem.c


Ignore:
Timestamp:
Apr 4, 2018, 2:49:02 PM (7 years ago)
Author:
alain
Message:

Fix a bug in scheduler related to RPC blocking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/kmem.c

    r435 r438  
    145145        assert( ((type > 1) && (type < KMEM_TYPES_NR) ) , __FUNCTION__ , "illegal KCM type" );
    146146
    147 #if CONFIG_DEBUG_KMEM
     147#if DEBUG_KMEM
    148148uint32_t cycle = (uint32_t)hal_get_cycles();
    149 if( CONFIG_DEBUG_KMEM < cycle )
     149if( DEBUG_KMEM < cycle )
    150150printk("\n[DBG] %s : thread %x enter / KCM type %s missing in cluster %x / cycle %d\n",
    151151__FUNCTION__, CURRENT_THREAD, kmem_type_str( type ), local_cxy, cycle );
     
    173173        hal_fence();
    174174
    175 #if CONFIG_DEBUG_KMEM
     175#if DEBUG_KMEM
    176176cycle = (uint32_t)hal_get_cycles();
    177 if( CONFIG_DEBUG_KMEM < cycle )
     177if( DEBUG_KMEM < cycle )
    178178printk("\n[DBG] %s : thread %x exit / cycle %d\n",
    179179__FUNCTION__, CURRENT_THREAD, cycle );
     
    200200        assert( (type < KMEM_TYPES_NR) , __FUNCTION__ , "illegal KMEM request type" );
    201201
    202 #if CONFIG_DEBUG_KMEM
     202#if DEBUG_KMEM
    203203uint32_t cycle = (uint32_t)hal_get_cycles();
    204 if( CONFIG_DEBUG_KMEM < cycle )
     204if( DEBUG_KMEM < cycle )
    205205printk("\n[DBG] %s : thread %x enter / type %s / cluster %x / cycle %d\n",
    206206__FUNCTION__, CURRENT_THREAD, kmem_type_str( type ), local_cxy, cycle );
     
    222222                if( flags & AF_ZERO ) page_zero( (page_t *)ptr );
    223223
    224 #if CONFIG_DEBUG_KMEM
     224#if DEBUG_KMEM
    225225cycle = (uint32_t)hal_get_cycles();
    226 if( CONFIG_DEBUG_KMEM < cycle )
     226if( DEBUG_KMEM < cycle )
    227227printk("\n[DBG] %s : thread %x exit / %d page(s) allocated / ppn %x / cycle %d\n",
    228228__FUNCTION__, CURRENT_THREAD, 1<<size, ppm_page2ppn(XPTR(local_cxy,ptr)), cycle );
     
    244244                if( flags & AF_ZERO ) memset( ptr , 0 , size );
    245245
    246 #if CONFIG_DEBUG_KMEM
     246#if DEBUG_KMEM
    247247cycle = (uint32_t)hal_get_cycles();
    248 if( CONFIG_DEBUG_KMEM < cycle )
     248if( DEBUG_KMEM < cycle )
    249249printk("\n[DBG] %s : thread %x exit / type %s allocated / base %x / size %d / cycle %d\n",
    250250__FUNCTION__, CURRENT_THREAD, kmem_type_str( type ), (intptr_t)ptr, size, cycle );
     
    275275                if( flags & AF_ZERO ) memset( ptr , 0 , kmem_type_size( type ) );
    276276
    277 #if CONFIG_DEBUG_KMEM
     277#if DEBUG_KMEM
    278278cycle = (uint32_t)hal_get_cycles();
    279 if( CONFIG_DEBUG_KMEM < cycle )
     279if( DEBUG_KMEM < cycle )
    280280printk("\n[DBG] %s : thread %x exit / type %s allocated / base %x / size %d / cycle %d\n",
    281281__FUNCTION__, CURRENT_THREAD, kmem_type_str(type), (intptr_t)ptr,
Note: See TracChangeset for help on using the changeset viewer.