Ignore:
Timestamp:
May 3, 2017, 1:23:24 PM (7 years ago)
Author:
alain
Message:

Bugs fix.

File:
1 edited

Legend:

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

    r5 r14  
    158158        core_t            * core;            /*! pointer to the owner core                */
    159159        process_t         * process;         /*! pointer on local process descriptor      */
    160         page_t            * page;            /*! pointer on page desc. containing thread  */
    161160
    162161        uint32_t            local_locks;         /*! number of local locks owned by thread    */
     
    266265/***************************************************************************************
    267266 * This function allocates memory for a kernel thread descriptor in the local cluster,
    268  * and initialise it from arguments values.
     267 * and initialise it from arguments values, calling the thread_kernel_init() function,
     268 * that also allocates and initializes the CPU context.
    269269 * The THREAD_BLOCKED_GLOBAL bit is set, and the thread must be activated to start.   
    270270 ***************************************************************************************
     
    283283
    284284/***************************************************************************************
     285 * This function initialises an existing kernel thread descriptor from arguments values.
     286 * The THREAD_BLOCKED_GLOBAL bit is set, and the thread must be activated to start.   
     287 ***************************************************************************************
     288 * @ thread   : pointer on existing thread descriptor.
     289 * @ type     : kernel thread type.
     290 * @ func     : pointer on function.
     291 * @ args     : function arguments.
     292 * @ core_lid : local core index.
     293 * @ returns 0 if success / returns EINVAL if error
     294 **************************************************************************************/
     295error_t thread_kernel_init( thread_t      * thread,
     296                            thread_type_t   type,
     297                            void          * func,
     298                            void          * args,
     299                            lid_t           core_lid );
     300
     301/***************************************************************************************
    285302 * This function releases the physical memory allocated for a thread descriptor
    286303 * in the local cluster. It can be used for both an user and a kernel thread.
     
    293310
    294311/***************************************************************************************
    295  * This function defines the code of the thread executed when no other thread is
    296  * runnable for a given core. It try to force the core to the low-power state.
    297  **************************************************************************************/
    298 void * thread_idle_func();
     312 * This function defines the code of the thread executed by all cores after kernel_init,
     313 * or when no other thread is runnable for a given core.
     314 *
     315 * TODO: In the TSAR architecture, it enters an infinite loop, in wich it forces
     316 * the core in sleep (low-power) mode. Any IRQ will force the core to exit this sleep
     317 * mode, but no ISR is executed.
     318 * TODO: We must analyse if we have the same behaviour for I86 architectures...
     319 **************************************************************************************/
     320void thread_idle_func();
    299321
    300322/***************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.