Ignore:
Timestamp:
Dec 20, 2017, 4:51:09 PM (6 years ago)
Author:
alain
Message:

Fix bugs in exec

File:
1 edited

Legend:

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

    r408 r409  
    281281    lpid_t lpid       = LPID_FROM_PID( pid );
    282282
     283    pmgr_t  * pm = &LOCAL_CLUSTER->pmgr;
     284
    283285    // check pid argument
    284     if( (lpid >= CONFIG_MAX_PROCESS_PER_CLUSTER) || (owner_cxy != local_cxy) )
    285     {
    286         panic("illegal PID");
    287     }
    288 
    289     pmgr_t  * pm = &LOCAL_CLUSTER->pmgr;
     286    assert( (lpid < CONFIG_MAX_PROCESS_PER_CLUSTER) && (owner_cxy == local_cxy) ,
     287    __FUNCTION__ , "illegal PID" );
     288
     289    // check number of copies
     290    assert( (pm->copies_nr[lpid] == 0) ,
     291    __FUNCTION__ , "number of copies must be 0" ); 
    290292
    291293    // get the process manager lock
Note: See TracChangeset for help on using the changeset viewer.