Ignore:
Timestamp:
Aug 20, 2018, 1:04:16 PM (6 years ago)
Author:
alain
Message:

1) Introduce the libsemaphore library.
2) Introduce a small libmath library, required by the "fft" application..
3) Introduce the multithreaded "fft" application.
4) Fix a bad synchronisation bug in the Copy-On-Write mechanism.

File:
1 edited

Legend:

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

    r459 r469  
    11631163    }
    11641164
    1165 #if DEBUG_PROCESS_MAKE_FORK
     1165#if( DEBUG_PROCESS_MAKE_FORK & 1 )
    11661166cycle = (uint32_t)hal_get_cycles();
    11671167if( DEBUG_PROCESS_MAKE_FORK < cycle )
     
    12401240    "main thread must have LTID == 0\n" );
    12411241
    1242 #if( DEBUG_PROCESS_MAKE_FORK & 1 )
     1242//#if( DEBUG_PROCESS_MAKE_FORK & 1 )
     1243#if DEBUG_PROCESS_MAKE_FORK
    12431244cycle = (uint32_t)hal_get_cycles();
    12441245if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1245 printk("\n[DBG] %s : thread %x in process %x created main thread %x on core[%x,%d] / cycle %d\n",
    1246 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
    1247 thread, local_cxy, thread->core->lid, cycle );
     1246printk("\n[DBG] %s : thread %x in process %x created main thread %x / cycle %d\n",
     1247__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, thread, cycle );
    12481248#endif
    12491249
     
    13421342
    13431343#if (DEBUG_PROCESS_MAKE_EXEC & 1)
     1344cycle = (uint32_t)hal_get_cycles();
    13441345if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1345 printk("\n[DBG] %s : open file <%s>\n", __FUNCTION__, path );
     1346printk("\n[DBG] %s : thread %x in process %x opened file <%s> / cycle %d\n",
     1347__FUNCTION__, thread->trdid, pid, path, cycle );
    13461348#endif
    13471349
     
    13491351    process_sigaction( pid , DELETE_ALL_THREADS );
    13501352
     1353#if (DEBUG_PROCESS_MAKE_EXEC & 1)
     1354cycle = (uint32_t)hal_get_cycles();
     1355if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1356printk("\n[DBG] %s : thread %x in process %x deleted all threads / cycle %d\n",
     1357__FUNCTION__, thread->trdid, pid, cycle );
     1358#endif
     1359
    13511360    // reset local process VMM
    13521361    vmm_destroy( process );
     
    13551364cycle = (uint32_t)hal_get_cycles();
    13561365if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1357 printk("\n[DBG] %s : thread %x in process %x / reset VMM / cycle %d\n",
     1366printk("\n[DBG] %s : thread %x in process %x reset VMM / cycle %d\n",
    13581367__FUNCTION__, thread->trdid, pid, cycle );
    13591368#endif
     
    14001409    if( error )
    14011410    {
    1402         printk("\n[ERROR] in %s : cannot reset main thread for %s\n", __FUNCTION__ , path );
     1411        printk("\n[ERROR] in %s : cannot update main thread for %s\n", __FUNCTION__ , path );
    14031412        vfs_close( file_xp , file_id );
    14041413        // FIXME restore old process VMM
Note: See TracChangeset for help on using the changeset viewer.