Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (6 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/scheduler.h

    r296 r407  
    7474
    7575/*********************************************************************************************
    76  * This function handles pending signals for all registered threads, and tries to make
    77  * a context switch for the core running the calling thread.
    78  * - If the <next> argument is not NULL, this next thread starts execution.
    79  * - If <next> is NULL, it calls the sched_select() function. If there is a runable thread
    80  *   (other than current thread or idle thread), this selected thread starts execution.
    81  * - If there is no other runable thread, the calling thread continues execution.
    82  * - If there is no runable thread, the idle thread is executed.
    83  *********************************************************************************************
    84  * @ next  : local pointer on next thread to run / call sched_select() if NULL.
     76 * This function handles pending signals for all registered threads, and calls the
     77 * sched_select() function to make a context switch for the core running the calling thread.
    8578 ********************************************************************************************/
    86 void sched_yield( struct thread_s * next );
     79void sched_yield();
    8780
    8881/*********************************************************************************************
     
    9689/*********************************************************************************************
    9790 * This function is used by the scheduler of a given core to actually kill a thread that has
    98  * the SIG_KILL signal set (following a thread_exit() or a thread_kill() event).
     91 * the SIG_KILL / SIG_SUICIDE signal set (following a thread_exit() or a thread_kill() event).
    9992 * - It checks that the thread has released all locks => panic otherwise...
    100  * - It detach the thread from the local process descriptor.
    10193 * - It removes the thread from the scheduler.
    102  * - It release physical memory allocated for thread descriptor.
     94 * - It reset the SIG_KILL signal to acknoledge the killer.
     95 * - In case of SIG_SUCIDE, it removes the detached thread from its process, and destroys it.
    10396 *********************************************************************************************
    10497 * @ thread  : local pointer on the thread descriptor.
     
    121114
    122115/*********************************************************************************************
    123  * This function display the internal state of the calling core scheduler.
     116 * This function display the internal state of the local core identified by its <lid>.
     117 *********************************************************************************************
     118 * @ lid      : local index of target core.
    124119 ********************************************************************************************/
    125 void sched_display();
     120void sched_display( lid_t lid );
    126121
    127122
Note: See TracChangeset for help on using the changeset viewer.