Changeset 188 for trunk/kernel/kern/core.h
- Timestamp:
- Jul 12, 2017, 8:12:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/core.h
r101 r188 36 36 struct thread_s; 37 37 struct chdev_s; 38 38 enum pic_impl_e; 39 39 40 40 /**************************************************************************************** 41 41 * This structure defines the core descriptor. 42 * - It contains an embedded private scheduler. 43 * - It contains the three interrupt vectors, implemented as three arrays of pointers 44 * on the source channel devices, for all IRQs allocated to the core. 42 * Besides the core identifiers (gid,lid), it contains an embedded private scheduler. 43 * It contains an architecture specific extension to store the interrupt vector(s). 44 * The core_init()function must allocate memory for this extension, depending on the 45 * PIC device implementation type. 45 46 ***************************************************************************************/ 46 47 … … 55 56 uint32_t usage; /*! cumulated busy_percent (idle / total) */ 56 57 uint32_t spurious_irqs; /*! for instrumentation... */ 58 uint32_t rpc_threads; /*! current RPC threads number for this core */ 57 59 struct thread_s * thread_rpc; /*! pointer on current RPC thread descriptor */ 58 60 struct thread_s * thread_idle; /*! pointer on idle thread descriptor */ 59 61 struct thread_s * fpu_owner; /*! pointer on current FPU owner thread */ 60 62 uint32_t rand_last; /*! last computed random value */ 61 uint32_t rpc_threads; /*! total number of RPC threads for this core */62 list_entry_t rpc_free_list; /*! root of the list of free RPC threads */63 64 63 scheduler_t scheduler; /*! embedded private scheduler */ 65 64 66 struct chdev_s * hwi_vector[CONFIG_MAX_HWIS_PER_ICU]; /*! on source device */ 67 struct chdev_s * pti_vector[CONFIG_MAX_PTIS_PER_ICU]; /*! on source device */ 68 struct chdev_s * wti_vector[CONFIG_MAX_WTIS_PER_ICU]; /*! on source device */ 65 void * pic_extend; /*! PIC implementation specific extension */ 69 66 } 70 67 core_t; 71 68 72 /*************************************************************************************** 69 /**************************************************************************************** 73 70 * This macro returns a pointer on the calling core descriptor. 74 ************************************************************************************** /71 ***************************************************************************************/ 75 72 76 73 #define CURRENT_CORE (CURRENT_THREAD->core) 77 74 78 75 /*************************************************************************************** 79 * TODO this initialisation must be completed for the thread_idle field... [AG] 80 * This function initializes a core descriptor from information found in arch_info. 76 * This function initializes a core descriptor. 81 77 * It makes the association [gid] <=> [lid], as defined in arch_info, via the 82 78 * boot_info_t structure build by the bootloader in each cluster. 79 * It allocates memory for the PIC infrastructure specific core extension. 80 * It does NOT initialize the <thread_idle> and the <pic_extend> fields, 81 * that must be completed later. 83 82 *************************************************************************************** 84 83 * @ core : pointer on core descriptor to initialise. 85 * @ lid : local core index 86 * @ gid : global core identifier (hardware index) 84 * @ lid : local core index in cluster. 85 * @ gid : global core identifier (hardware index). 87 86 **************************************************************************************/ 88 void core_init( core_t * core,89 lid_t lid,90 gid_t gid );87 void core_init( core_t * core, 88 lid_t lid, 89 gid_t gid ); 91 90 92 91 /***************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.