Ignore:
Timestamp:
Apr 10, 2019, 10:09:39 AM (2 years ago)
Author:
alain
Message:

Fix a bug in the vmm_remove_vseg() function: the physical pages
associated to an user DATA vseg were released to the kernel when
the target process descriptor was in the reference cluster.
This physical pages release should be done only when the page
forks counter value is zero.
All other modifications are cosmetic.

File:
1 edited

Legend:

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

    r623 r625  
    253253                break;
    254254            }
    255             case ('b'):             // excactly 2 digits hexadecimal
     255            case ('b'):             /* exactly 2 digits hexadecimal */
    256256            {
    257257                int  val = va_arg( *args, int );
     
    426426
    427427    // print generic infos
    428     nolock_printk("\n[PANIC] in %s: line %d | cycle %d\n"
     428    nolock_printk("\n\n[PANIC] in %s: line %d | cycle %d\n"
    429429                  "core[%x,%d] | thread %x (%x) | process %x (%x)\n",
    430430                  function_name, line, (uint32_t)cycle,
     
    502502    remote_busylock_acquire( lock_xp );
    503503
    504     // display string on TTY0
     504    // display buf on TTY0
    505505    dev_txt_sync_write( buf , 10 );
     506
     507    // release TXT0 lock
     508    remote_busylock_release( lock_xp );
     509}
     510
     511////////////////////////
     512void putd( int32_t val )
     513{
     514    static const char HexaTab[] = "0123456789ABCDEF";
     515
     516    char      buf[10];
     517    uint32_t  i;
     518
     519    // get pointers on TXT0 chdev
     520    xptr_t    txt0_xp  = chdev_dir.txt_tx[0];
     521    cxy_t     txt0_cxy = GET_CXY( txt0_xp );
     522    chdev_t * txt0_ptr = GET_PTR( txt0_xp );
     523
     524    // get extended pointer on remote TXT0 chdev lock
     525    xptr_t  lock_xp = XPTR( txt0_cxy , &txt0_ptr->wait_lock );
     526
     527    // get TXT0 lock
     528    remote_busylock_acquire( lock_xp );
     529
     530    if (val < 0)
     531    {
     532        val = -val;
     533        dev_txt_sync_write( "-" , 1 );
     534    }
     535
     536    for(i = 0; i < 10 ; i++)
     537    {
     538        buf[9 - i] = HexaTab[val % 10];
     539        if (!(val /= 10)) break;
     540    }
     541
     542    // display buf on TTY0
     543    dev_txt_sync_write( &buf[9-i] , i+1 );
    506544
    507545    // release TXT0 lock
Note: See TracChangeset for help on using the changeset viewer.