Changeset 619 for trunk/kernel/devices


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.


Location:
trunk/kernel/devices
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_dma.c

    r565 r619  
    6363    error = thread_kernel_create( &new_thread,
    6464                                  THREAD_DEV,
    65                                   &chdev_sequencial_server,
     65                                  &chdev_server_func,
    6666                                  dma,
    6767                                  cluster_select_local_core() );
  • trunk/kernel/devices/dev_ioc.c

    r614 r619  
    7171    error = thread_kernel_create( &new_thread,
    7272                                  THREAD_DEV,
    73                                   &chdev_sequencial_server,
     73                                  &chdev_server_func,
    7474                                  ioc,
    7575                                  lid );
  • trunk/kernel/devices/dev_nic.c

    r565 r619  
    7070    error = thread_kernel_create( &new_thread,
    7171                                  THREAD_DEV,
    72                                   &chdev_sequencial_server,
     72                                  &chdev_server_func,
    7373                                  nic,
    7474                                  lid );
  • trunk/kernel/devices/dev_txt.c

    r565 r619  
    5353const char * dev_txt_type_str( dev_txt_cmd_t type )
    5454{
    55   switch (type) {
    56     case (TXT_SYNC_WRITE): return "TXT_SYNC_WRITE";
    57     case (TXT_READ):       return "TXT_READ";
    58     case (TXT_WRITE):      return "TXT_WRITE";
    59     default:               return "undefined";
    60   }
     55    switch (type)
     56    {
     57        case (TXT_SYNC_WRITE): return "TXT_SYNC_WRITE";
     58        case (TXT_READ):       return "TXT_READ";
     59        case (TXT_WRITE):      return "TXT_WRITE";
     60        default:               return "undefined";
     61    }
    6162}
    6263
     
    115116        error = thread_kernel_create( &new_thread,
    116117                                      THREAD_DEV,
    117                                       &chdev_sequencial_server,
     118                                      &chdev_server_func,
    118119                                      txt,
    119120                                      lid );
     
    178179
    179180#if DEBUG_DEV_TXT_TX
    180 uint32_t cycle = (uint32_t)hal_get_cycles();
     181thread_t * this  = CURRENT_THREAD;
     182uint32_t   cycle = (uint32_t)hal_get_cycles();
    181183if( DEBUG_DEV_TXT_TX < cycle )
    182 printk("\n[DBG] %s : thread %x enters / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
     184printk("\n[%s] thread[%x,%x] enters / cycle %d\n",
     185__FUNCTION__, this->process->pid, this->trdid, cycle );
    183186#endif
    184187
     
    194197
    195198    // If we use MTTYs (vci_multi_tty), we perform only sync writes
     199    // Otherwise, we use vci_tty_tsar so we can use async writes
     200
    196201    if( dev_ptr->impl == IMPL_TXT_MTY )
    197202    {
     
    212217    }
    213218
    214     // Otherwise, we use vci_tty_tsar so we can use async writes
    215219    else
    216220    {
    217     return dev_txt_access( TXT_WRITE , channel , buffer , count );
     221        return dev_txt_access( TXT_WRITE , channel , buffer , count );
    218222    }
    219223
     
    221225cycle = (uint32_t)hal_get_cycles();
    222226if( DEBUG_DEV_TXT_TX < cycle )
    223 printk("\n[DBG] %s : thread %x exit / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
     227printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     228__FUNCTION__, this->process->pid, this->trdid, cycle );
    224229#endif
    225230
     
    240245
    241246#if DEBUG_DEV_TXT_RX
    242 uint32_t cycle = (uint32_t)hal_get_cycles();
     247thread_t * this  = CURRENT_THREAD;
     248uint32_t   cycle = (uint32_t)hal_get_cycles();
    243249if( DEBUG_DEV_TXT_RX < cycle )
    244 printk("\n[DBG] %s : thread %x enters / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
     250printk("\n[%s] thread[%x,%x] enters / cycle %d\n",
     251__FUNCTION__, this->process->pid, this->trdid, cycle );
    245252#endif
    246253
     
    250257cycle = (uint32_t)hal_get_cycles();
    251258if( DEBUG_DEV_TXT_RX < cycle )
    252 printk("\n[DBG] %s : thread %x exit / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
     259printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
     260__FUNCTION__, this->process->pid, this->trdid, cycle );
    253261#endif
    254262
Note: See TracChangeset for help on using the changeset viewer.