Ignore:
Timestamp:
Feb 12, 2019, 1:15:47 PM (5 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/libk/remote_mutex.c

    r611 r619  
    138138thread_t * this = CURRENT_THREAD;
    139139if( (uint32_t)hal_get_cycles() > DEBUG_MUTEX )
    140 printk("\n[DBG] %s : thread %x in %x process / mutex(%x,%x)\n",
    141 __FUNCTION__, this->trdid, this->process->pid, local_cxy, mutex_ptr );
     140printk("\n[%s] : thread[%x,%x] created mutex(%x,%x)\n",
     141__FUNCTION__, this->process->pid, this->trdid, local_cxy, mutex_ptr );
    142142#endif
    143143
     
    173173    remote_queuelock_release( XPTR( ref_cxy , &ref_ptr->sync_lock ) );
    174174
    175     // release memory allocated for mutexaphore descriptor
     175    // release memory allocated for mutex descriptor
    176176    if( mutex_cxy == local_cxy )                            // reference is local
    177177    {
     
    183183    else                                                  // reference is remote
    184184    {
    185         rpc_kcm_free_client( mutex_cxy , mutex_ptr , KMEM_BARRIER );
     185        rpc_kcm_free_client( mutex_cxy , mutex_ptr , KMEM_MUTEX );
    186186    }
    187187
     
    226226thread_t * this = CURRENT_THREAD;
    227227if( (uint32_t)hal_get_cycles() > DEBUG_MUTEX )
    228 printk("\n[DBG] %s : thread %x in process %x SUCCESS on mutex(%x,%x)\n",
    229 __FUNCTION__, this->trdid, this->process->pid, mutex_cxy, mutex_ptr );
     228printk("\n[%s] thread[%x,%x] SUCCESS on mutex(%x,%x)\n",
     229__FUNCTION__, this->process->pid, this->trdid, mutex_cxy, mutex_ptr );
    230230#endif
    231231
     
    247247thread_t * this = CURRENT_THREAD;
    248248if( (uint32_t)hal_get_cycles() > DEBUG_MUTEX )
    249 printk("\n[DBG] %s : thread %x in process %x BLOCKED on mutex(%x,%x)\n",
    250 __FUNCTION__, this->trdid, this->process->pid, mutex_cxy, mutex_ptr );
     249printk("\n[%s] thread[%x,%x] BLOCKED on mutex(%x,%x)\n",
     250__FUNCTION__, this->process->pid, this->trdid, mutex_cxy, mutex_ptr );
    251251#endif
    252252
     
    296296thread_t * this = CURRENT_THREAD;
    297297if( (uint32_t)hal_get_cycles() > DEBUG_MUTEX )
    298 printk("\n[DBG] %s : thread %x in %x process EXIT / mutex(%x,%x)\n",
    299 __FUNCTION__, this->trdid, this->process->pid, mutex_cxy, mutex_ptr );
     298printk("\n[%s] thread[%x,%x] EXIT / mutex(%x,%x)\n",
     299__FUNCTION__, this->process->pid, this->trdid, mutex_cxy, mutex_ptr );
    300300#endif
    301301
     
    320320process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) );
    321321pid_t       pid     = hal_remote_l32( XPTR( thread_cxy , &process->pid ) );
    322 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %d / mutex(%x,%x)\n",
    323 __FUNCTION__, this->trdid, this->process->pid, trdid, pid, mutex_cxy, mutex_ptr );
     322printk("\n[%s] thread[%x,%x] UNBLOCK thread %x in process %d / mutex(%x,%x)\n",
     323__FUNCTION__, this->process->pid, this->trdid, trdid, pid, mutex_cxy, mutex_ptr );
    324324}
    325325#endif
     
    371371thread_t * this = CURRENT_THREAD;
    372372if( (uint32_t)hal_get_cycles() > DEBUG_QUEUELOCK )
    373 printk("\n[DBG] %s : SUCCESS for thread %x in process %x / mutex(%x,%x)\n",
    374 __FUNCTION__, this->trdid, this->process->pid, mutex_cxy, mutex_ptr );
     373printk("\n[%s] SUCCESS for thread[%x,%x] / mutex(%x,%x)\n",
     374__FUNCTION__, this->process->pid, this->trdid, mutex_cxy, mutex_ptr );
    375375#endif
    376376        // release busylock protecting mutex state
     
    385385thread_t * this = CURRENT_THREAD;
    386386if( (uint32_t)hal_get_cycles() > DEBUG_QUEUELOCK )
    387 printk("\n[DBG] %s : FAILURE for thread %x in process %x / mutex(%x,%x)\n",
    388 __FUNCTION__, this->trdid, this->process->pid, mutex_cxy, mutex_ptr );
     387printk("\n[%s] FAILURE for thread[%x,%x] / mutex(%x,%x)\n",
     388__FUNCTION__, this->process->pid, this->trdid, mutex_cxy, mutex_ptr );
    389389#endif
    390390        // release busylock protecting mutex state
Note: See TracChangeset for help on using the changeset viewer.