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

Fix bugs in exec

File:
1 edited

Legend:

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

    r408 r409  
    4949    struct thread_s * idle;         /*! pointer on idle thread                              */
    5050    struct thread_s * current;      /*! pointer on current running thread                   */
     51    bool_t            sig_pending;  /*! signal_handller must be called when true            */
    5152}
    5253scheduler_t;
     
    6667                            struct thread_s * thread );
    6768
    68 /********************************************************************************************* 
    69  *  This function removes a thread from the set of threads attached to a given core.
     69/*********************************************************************************************
     70 * This function remove a thread from its scheduler.re scheduler.
    7071 *********************************************************************************************
    7172 * @ thread  : local pointer on the thread descriptor.
     
    8788/*********************************************************************************************
    8889 * This function scan all threads attached to a given core scheduler, and executes
    89  * the relevant actions for pending signals, such as the THREAD_SIG_KILL signal.
     90 * the relevant actions for pending KILL or EXIT signals.
     91 * It is called in by the sched_yield() function, with IRQ disabled.
    9092 *********************************************************************************************
    9193 * @ core    : local pointer on the core descriptor.
    9294 ********************************************************************************************/
    9395void sched_handle_signals( struct core_s * core );
    94 
    95 /*********************************************************************************************
    96  * This function is used by the scheduler of a given core to actually kill a thread that has
    97  * the SIG_KILL / SIG_SUICIDE signal set (following a thread_exit() or a thread_kill() event).
    98  * - It checks that the thread has released all locks => panic otherwise...
    99  * - It removes the thread from the scheduler.
    100  * - It reset the SIG_KILL signal to acknoledge the killer.
    101  * - In case of SIG_SUCIDE, it removes the detached thread from its process, and destroys it.
    102  *********************************************************************************************
    103  * @ thread  : local pointer on the thread descriptor.
    104  ********************************************************************************************/
    105 void sched_kill_thread( struct thread_s * thread );
    10696
    10797/*********************************************************************************************
     
    123113
    124114/*********************************************************************************************
     115 * This function unlink a thread identified by the <thread> pointer from its process.
     116 * It is called by the sched_handle_signals() function when one EXIT or KILL signal is set,
     117 * and it implement the first step of a thread destructionebut can also be directly called by a local killer thread signal.
     118 * - It detach the thread from the scheduler.
     119 * - It detach the thread from the process.
     120 * - It detach the thread from the parent thread when the thread is attached.
     121 * - It destroys the thread descriptor.
     122 * - It acknowledge the killer thread if it's a kill signal
     123 *********************************************************************************************
     124 * @ thread   : pointer on thread to be killed.
     125 ********************************************************************************************/
     126void sched_kill_thread( struct thread_s * thread );
     127
     128/*********************************************************************************************
    125129 * This function display the internal state of the local core identified by its <lid>.
    126130 *********************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.