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/kern/process.c

    r618 r619  
    528528    process_t        * process_ptr;       // local pointer on process copy
    529529    reg_t              save_sr;           // for critical section
    530     rpc_desc_t         rpc;               // shared RPC descriptor
    531530    thread_t         * client;            // pointer on client thread
    532531    xptr_t             client_xp;         // extended pointer on client thread
    533532    process_t        * local;             // pointer on process copy in local cluster
    534533    uint32_t           remote_nr;         // number of remote process copies
     534    rpc_desc_t         rpc;               // shared RPC descriptor
     535    uint32_t           responses;         // shared RPC responses counter
    535536
    536537    client    = CURRENT_THREAD;
     
    579580    thread_block( client_xp , THREAD_BLOCKED_RPC );
    580581
     582    // initialize RPC responses counter
     583    responses = 0;
     584
    581585    // initialize shared RPC descriptor
    582     rpc.responses = 0;
     586    // can be shared, because no out arguments
     587    rpc.rsp       = &responses;
    583588    rpc.blocking  = false;
    584589    rpc.index     = RPC_PROCESS_SIGACTION;
     
    608613            remote_nr++;
    609614
    610             // atomically increment responses counter
    611             hal_atomic_add( (void *)&rpc.responses , 1 );
     615            // atomically increment RPC responses counter
     616            hal_atomic_add( &responses , 1 );
    612617
    613618#if DEBUG_PROCESS_SIGACTION
     
    617622#endif
    618623            // call RPC in target cluster
    619             rpc_process_sigaction_client( process_cxy , &rpc );
     624            rpc_send( process_cxy , &rpc );
    620625        }
    621626    }  // end list of copies
     
    685690
    686691// check target process is an user process
    687 assert( (LPID_FROM_PID( process->pid ) != 0 ), "target process must be an user process" );
     692assert( (LPID_FROM_PID( process->pid ) != 0 ),
     693"process %x is not an user process\n", process->pid );
    688694
    689695    // get target process owner cluster
     
    773779
    774780// check target process is an user process
    775 assert( (LPID_FROM_PID( process->pid ) != 0), "process %x not an user process", process->pid );
     781assert( (LPID_FROM_PID( process->pid ) != 0),
     782"process %x is not an user process\n", process->pid );
    776783
    777784    // get lock protecting process th_tbl[]
     
    831838
    832839// check target process is an user process
    833 assert( ( process->pid != 0 ),
    834 "target process must be an user process" );
     840assert( ( LPID_FROM_PID( process->pid ) != 0 ),
     841"process %x is not an user process\n", process->pid );
    835842
    836843    // get lock protecting process th_tbl[]
Note: See TracChangeset for help on using the changeset viewer.