Ignore:
Timestamp:
May 9, 2018, 3:13:56 PM (6 years ago)
Author:
alain
Message:

Fix a bug in rpc_vmm_get_pte_client() function (bad RPC index).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_exec.c

    r438 r441  
    150150// Implementation note:
    151151// This function must be called by the main thread (thread 0 in owner cluster).
    152 // IT build an exec_info_t structure containing all informations
     152// It build an exec_info_t structure containing all informations
    153153// required to initialize the new process descriptor and the associated thread.
    154154// It includes the process main() arguments, the environment variables,
     
    208208tm_start = hal_get_cycles();
    209209if( DEBUG_SYS_EXEC < tm_start )
    210 printk("\n[DBG] %s : thread %x enter / process %x / path %s / cycle = %d\n",
     210printk("\n[DBG] %s : thread %x in process %x enter for path <%s> / cycle = %d\n",
    211211__FUNCTION__, this, pid, exec_info.path, (uint32_t)tm_start );
    212212#endif
     
    219219
    220220#if DEBUG_SYSCALLS_ERROR
    221 printk("\n[ERROR] in %s : cannot access args\n", __FUNCTION__ );
     221printk("\n[ERROR] in %s : thread %x in process %x cannot access args\n",
     222__FUNCTION__ , this, pid );
    222223#endif
    223224            this->errno = EINVAL;
     
    233234
    234235#if DEBUG_SYCALLS_ERROR
    235 printk("\n[ERROR] in %s : cannot access envs\n", __FUNCTION__ );
     236printk("\n[ERROR] in %s : thread %x in process %x cannot access envs\n",
     237__FUNCTION__ , this, pid );
    236238#endif
    237239            this->errno = EINVAL;
     
    247249
    248250#if DEBUG_SYSCALLS_ERROR
    249 printk("\n[ERROR] in %s : cannot create process %x in cluster %x\n",
    250 __FUNCTION__, pid, CXY_FROM_PID(pid) );
     251printk("\n[ERROR] in %s : thread %x in process %x cannot create process for <%s>\n",
     252__FUNCTION__, this, pid, exec_info.path );
    251253#endif
    252254        this->errno = error;
     
    257259tm_end = hal_get_cycles();
    258260if( DEBUG_SYS_EXEC < tm_end )
    259 printk("\n[DBG] %s : thread %x exit / process %x / cost = %d / cycle %d\n",
     261printk("\n[DBG] %s : thread %x in process %x exit / cost = %d / cycle %d\n",
    260262__FUNCTION__, this, pid, (uint32_t)(tm_end - tm_start), (uint32_t)tm_end );
    261263#endif
    262264
    263     // deschedule <=> old thread suicide because the BLOCKED_GLOBAL
    264     // and the FLAG_REQ_DELETE have been set by process_make_exec()
     265    // In case of success, this calling thread deschedules, causing suicide,
     266    // because a new process descriptor and its associated main thread
     267    // have been created by the process_make_exec() function, and the
     268    // BLOCKED_GLOBAL & FLAG_REQ_DELETE bits have been set for the calling thread.
    265269    sched_yield( "old process suicide in sys_exec()" );
    266270
    267     assert( false , __FUNCTION__ , "This code should not be executed\n" );
    268 
    269271    return 0; 
    270272
Note: See TracChangeset for help on using the changeset viewer.