Ignore:
Timestamp:
Nov 14, 2019, 4:03:25 PM (4 years ago)
Author:
alain
Message:

euh...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_context.c

    r647 r654  
    176176        context->c2_mode = 0x3;
    177177    }
     178
     179#if DEBUG_HAL_CONTEXT_INIT
     180hal_cpu_context_display( XPTR( local_cxy , thread ) );
     181#endif
     182
    178183}  // end hal_cpu_context_init()
    179184
     
    235240    hal_remote_spt( XPTR( child_cxy , &child_ptr->uzone_current ) , child_uzone );
    236241
    237 #if DEBUG_HAL_CONTEXT
     242#if DEBUG_HAL_CONTEXT_FORK
    238243uint32_t cycle = (uint32_t)hal_get_cycles();
    239 if( DEBUG_HAL_CONTEXT < cycle )
     244if( DEBUG_HAL_CONTEXT_FORK < cycle )
    240245printk("\n[%s] thread[%x,%x] parent_uzone %x / child_uzone %x / cycle %d\n",
    241246__FUNCTION__, parent_ptr->process->pid, parent_ptr->trdid, parent_uzone, child_uzone, cycle );
     
    249254    child_us_base  = hal_remote_l32( XPTR( child_cxy , &child_us_vseg->min ) );
    250255
    251 #if DEBUG_HAL_CONTEXT
    252 if( DEBUG_HAL_CONTEXT < cycle )
     256#if DEBUG_HAL_CONTEXT_FORK
     257if( DEBUG_HAL_CONTEXT_FORK < cycle )
    253258printk("\n[%s] thread[%x,%x] parent_ustack_base %x / child_ustack_base %x\n",
    254259__FUNCTION__, parent_ptr->process->pid, parent_ptr->trdid, parent_us_base, child_us_base );
     
    263268                          (intptr_t)parent_ptr );
    264269
    265 #if DEBUG_HAL_CONTEXT
    266 if( DEBUG_HAL_CONTEXT < cycle )
     270#if DEBUG_HAL_CONTEXT_FORK
     271if( DEBUG_HAL_CONTEXT_FORK < cycle )
    267272printk("\n[%s] thread[%x,%x] parent_ksp %x / child_ksp %x\n",
    268273__FUNCTION__, parent_ptr->process->pid, parent_ptr->trdid, parent_ksp, child_ksp );
     
    278283                       size );
    279284
    280 #if DEBUG_HAL_CONTEXT
    281 if( DEBUG_HAL_CONTEXT < cycle )
     285#if DEBUG_HAL_CONTEXT_FORK
     286if( DEBUG_HAL_CONTEXT_FORK < cycle )
    282287printk("\n[%s] thread[%x,%x] copied kstack from parent (%x) to child (%x)\n",
    283288__FUNCTION__, parent_ptr->process->pid, parent_ptr->trdid, parent_ptr, child_ptr );
     
    311316        uint32_t child_ptpr  = (uint32_t)child_gpt_ppn >> 1;
    312317
    313 #if DEBUG_HAL_CONTEXT
    314 if( DEBUG_HAL_CONTEXT < cycle )
     318#if DEBUG_HAL_CONTEXT_FORK
     319if( DEBUG_HAL_CONTEXT_FORK < cycle )
    315320printk("\n[%s] thread[%x,%x] : parent_uz_sp %x / child_uz_sp %x\n",
    316321__FUNCTION__, parent_ptr->process->pid, parent_ptr->trdid,
     
    327332                           XPTR( local_cxy  , &context ) ,
    328333                           sizeof( hal_cpu_context_t ) );
    329 #if DEBUG_HAL_CONTEXT
    330 if( DEBUG_HAL_CONTEXT < cycle )
     334#if DEBUG_HAL_CONTEXT_FORK
     335if( DEBUG_HAL_CONTEXT_FORK < cycle )
    331336printk("\n[%s] thread[%x,%x] copied parent CPU context to child CPU context\n",
    332337__FUNCTION__, parent_ptr->process->pid, parent_ptr->trdid );
     
    336341        thread_unblock( XPTR( child_cxy , child_ptr ) , THREAD_BLOCKED_GLOBAL );
    337342
    338 #if DEBUG_HAL_CONTEXT
     343#if DEBUG_HAL_CONTEXT_FORK
    339344cycle = (uint32_t)hal_get_cycles();
    340345trdid_t child_trdid = hal_remote_l32( XPTR( child_cxy , &child_ptr->trdid ) );
Note: See TracChangeset for help on using the changeset viewer.