Ignore:
Timestamp:
Feb 12, 2019, 1:15:47 PM (6 years ago)
Author:
alain
Message:

1) Fix a bug in KSH : after the "load" command,

the [ksh] prompt is now printed after completion
of the loaded application.

2) Fix a bug in vmm_handle_cow() : the copy-on-write

use now a hal_remote_memcpy() to replicate the page content.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/thread.c

    r611 r619  
    13781378}  // end thread_assert_can yield()
    13791379
    1380 //////////////////////////////////////////////////
    1381 void thread_display_busylocks( xptr_t  thread_xp )
    1382 {
    1383     // get cluster and local pointer of target thread
     1380//////////////////////////////////////////////////////
     1381void thread_display_busylocks( xptr_t       thread_xp,
     1382                               const char * string )
     1383{
    13841384    cxy_t      thread_cxy = GET_CXY( thread_xp );
    13851385    thread_t * thread_ptr = GET_PTR( thread_xp );
     
    13891389    xptr_t    iter_xp;
    13901390
    1391     // get target thread TRDID and busylocks
    1392     trdid_t  trdid = hal_remote_l32(XPTR( thread_cxy , &thread_ptr->trdid ));
    1393     uint32_t locks = hal_remote_l32(XPTR( thread_cxy , &thread_ptr->busylocks ));
    1394 
    1395     // get target thread process and PID;
    1396     process_t * process = hal_remote_lpt(XPTR( thread_cxy , &thread_ptr->process ));
    1397     pid_t       pid     = hal_remote_l32(XPTR( thread_cxy , &process->pid ));
     1391    // get relevant info from target trhead descriptor
     1392    uint32_t    locks   = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->busylocks ) );
     1393    trdid_t     trdid   = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) );
     1394    process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) );
     1395    pid_t       pid     = hal_remote_l32( XPTR( thread_cxy , &process->pid ) );
    13981396
    13991397    // get extended pointer on root of busylocks
    1400     xptr_t    root_xp = XPTR( thread_cxy , &thread_ptr->busylocks_root );
     1398    xptr_t root_xp = XPTR( thread_cxy , &thread_ptr->busylocks_root );
    14011399
    14021400    // get pointers on TXT0 chdev
     
    14121410
    14131411    // display header
    1414     nolock_printk("\n***** thread %x in process %x : %d busylocks at cycle %d\n",
    1415     trdid, pid, locks, (uint32_t)hal_get_cycles() );
     1412    nolock_printk("\n***** thread[%x,%x] in <%s> : %d busylocks *****\n",
     1413    pid, trdid, string, locks );
    14161414
    14171415    // scan the xlist of busylocks when required
     
    14361434
    14371435    // display a warning
    1438     printk("\n[WARNING] set the DEBUG_BUSYLOCK parmeter in kernel_config.h"
    1439     " to display busylocks for thread %x/%x\n", thread_cxy, thread_ptr );
     1436    printk("\n[WARNING] set the DEBUG_BUSYLOCK parameter in kernel_config.h"
     1437    " to display busylocks for thread(%x,%x)\n", pid, trdid );
    14401438
    14411439}  // end thread_display_busylock()
Note: See TracChangeset for help on using the changeset viewer.