Changeset 19 for trunk/kernel/kern/cluster.h
- Timestamp:
- Jun 3, 2017, 4:46:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/cluster.h
r14 r19 1 1 /* 2 2 * cluster.h - Cluster-Manager definition 3 * 3 * 4 4 * authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 5 * Mohamed Lamine Karaoui (2015) … … 55 55 * This structure defines the process manager, that is part of the cluster manager. 56 56 * For any process P, the process descriptor is replicated in all clusters containing 57 * at least one thread of process P, but only the "reference" cluster descriptor contains 57 * at least one thread of process P, but only the "reference" cluster descriptor contains 58 58 * the reference (complete) structures such as the GPT, the VSL, or the FDT. 59 * The "owner" cluster is in charge to allocate a lpid (local process index), 59 * The "owner" cluster is in charge to allocate a lpid (local process index), 60 60 * for all process owned by a cluster K, and to register the "reference" cluster for 61 * all process owned by K. 62 * 63 * Warning : the "owner" cluster, and the "reference" cluster can be different clusters. 61 * all process owned by K. 62 * 63 * Warning : the "owner" cluster, and the "reference" cluster can be different clusters. 64 64 * 65 65 * The process manager of a cluster K maintains three structures: … … 69 69 * A process descriptor P is present in K, as soon as P has a thread in cluster K. 70 70 * 3) The copies_root[] array is indexed by lpid. Each entry contains the root of 71 * the xlist of copies for a given process owned by cluster K. 71 * the xlist of copies for a given process owned by cluster K. 72 72 ******************************************************************************************/ 73 73 … … 82 82 uint32_t local_nr; /*! number of process in cluster */ 83 83 84 xlist_entry_t copies_root[CONFIG_MAX_PROCESS_PER_CLUSTER]; /*! roots of lists */ 84 xlist_entry_t copies_root[CONFIG_MAX_PROCESS_PER_CLUSTER]; /*! roots of lists */ 85 85 remote_spinlock_t copies_lock[CONFIG_MAX_PROCESS_PER_CLUSTER]; /*! one lock per list */ 86 86 uint32_t copies_nr[CONFIG_MAX_PROCESS_PER_CLUSTER]; /*! number of copies */ … … 90 90 /******************************************************************************************* 91 91 * This structure defines a cluster manager. 92 * It contains both global platform information s, and cluster specific ressources92 * It contains both global platform information, and cluster specific resources 93 93 * managed by the local kernel instance. 94 94 ******************************************************************************************/ … … 135 135 pmgr_t pmgr; /*! embedded process manager */ 136 136 137 char name[CONFIG_SYSFS_NAME_LEN]; 137 char name[CONFIG_SYSFS_NAME_LEN]; 138 138 139 139 // sysfs_entry_t node; 140 } 140 } 141 141 cluster_t; 142 142 143 143 /****************************************************************************************** 144 144 * This global variable is allocated in the kernel_init.c file. 145 * There is one cluster_manager per cluster, with the same local address, 146 * but different content, in all clusters containing a kernel instance. 145 * There is one cluster_manager per cluster, with the same local address, 146 * but different content, in all clusters containing a kernel instance. 147 147 *****************************************************************************************/ 148 148 … … 156 156 157 157 /****************************************************************************************** 158 * This generic function initialises the local cluster manager from information sfound158 * This generic function initialises the local cluster manager from information found 159 159 * in the local boot-info structure. It initializes the following local resources: 160 160 * - the global platform parameters, … … 170 170 * @ info : pointer on the local boot_info_t structure build by the bootloader. 171 171 *****************************************************************************************/ 172 error_t cluster_init( boot_info_t * info ); 173 174 /****************************************************************************************** 175 * This function che ks the validity of a cluster identifier. TODO useful ??? [AG]172 error_t cluster_init( boot_info_t * info ); 173 174 /****************************************************************************************** 175 * This function checks the validity of a cluster identifier. TODO useful ??? [AG] 176 176 ****************************************************************************************** 177 177 * @ cxy : cluster identifier to be checked. … … 200 200 xptr_t cluster_get_reference_process_from_pid( pid_t pid ); 201 201 202 /****************************************************************************************** 202 /****************************************************************************************** 203 203 * This function allocates a new PID in local cluster, that becomes the process owner. 204 * It register the process descriptor extended pointer in the local processs manager204 * It registers the process descriptor extended pointer in the local processs manager 205 205 * pref_tbl[] array. This function is called by the rpc_process_alloc_pid() function for 206 206 * remote registration, or by the process_init_create() function for local registration. … … 208 208 * @ process : [in] extended pointer on the process descriptor. 209 209 * @ pid : [out] allocated PID. 210 * @ return 0 if success / return EAGAIN if no PID slot available 210 * @ return 0 if success / return EAGAIN if no PID slot available 211 211 *****************************************************************************************/ 212 212 error_t cluster_pid_alloc( xptr_t process_xp, 213 213 pid_t * pid ); 214 214 215 /****************************************************************************************** 215 /****************************************************************************************** 216 216 * This function removes a PID from the local process manager pref_tbl[] array. 217 217 * It checks that removed process is owned by the local cluster and the lpid is legal. … … 237 237 * @ process : pointer on local process descriptor. 238 238 *****************************************************************************************/ 239 void cluster_process_local_link( struct process_s * process ); 239 void cluster_process_local_link( struct process_s * process ); 240 240 241 241 /****************************************************************************************** … … 244 244 * @ process : pointer on local process descriptor. 245 245 *****************************************************************************************/ 246 void cluster_process_local_unlink( struct process_s * process ); 246 void cluster_process_local_unlink( struct process_s * process ); 247 247 248 248 /****************************************************************************************** … … 252 252 * @ process : pointer on local process descriptor. 253 253 *****************************************************************************************/ 254 void cluster_process_copies_link( struct process_s * process ); 254 void cluster_process_copies_link( struct process_s * process ); 255 255 256 256 /****************************************************************************************** … … 260 260 * @ process : pointer on local process descriptor. 261 261 *****************************************************************************************/ 262 void cluster_process_copies_unlink( struct process_s * process ); 262 void cluster_process_copies_unlink( struct process_s * process ); 263 263 264 264
Note: See TracChangeset
for help on using the changeset viewer.