Changeset 407 for trunk/kernel/kern/process.h
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/process.h
r204 r407 143 143 { 144 144 xptr_t parent_xp; /*! extended pointer on parent process descriptor */ 145 bool_t keep_pid; /*! keep parent PID if true / new PID if false */ 145 146 146 147 char path[CONFIG_VFS_MAX_PATH_LENGTH]; /*! .elf file path */ … … 175 176 /********************************************************************************************* 176 177 * This function allocates memory and initializes the "process_init" descriptor and the 177 * associated "thread_init" descriptor . It should be called once at the end of the kernel178 * initialisation procedure, by the kernel "process_zero".178 * associated "thread_init" descriptor in the local cluster. It is called once at the end 179 * of the kernel initialisation procedure, by the local kernel process. 179 180 * The "process_init" is the first user process, and all other user processes will be forked 180 181 * from this process. The code executed by "process_init" is stored in a .elf file, whose 181 * pathname is defined by the CONFIG_PROCESS_INIT_PATH argument. It uses fork/exec syscalls 182 * to create the "shell" user process, and various other user daemon processes. 183 * Practically, it builds the exec_info structure, registers the stdin / stdout / stderr 184 * pseudo-file descriptors and the vfs_root and vfs_cwd in parent process_zero, and calls 185 * the generic process_make_exec() function, that makes the real job. 182 * pathname is defined by the CONFIG_PROCESS_INIT_PATH argument. 183 * Practically, it builds the exec_info structure, and calls the process_make_exec() 184 * function, that make the real job. 186 185 ********************************************************************************************/ 187 186 void process_init_create(); … … 253 252 * and the associated main thread, from information found in the <exec_info> structure 254 253 * (defined in the process.h file), that must be built by the caller. 254 * - If the <keep_pid> field is true, the new process inherits its PID from the parent PID. 255 * - If the <keep_pid> field is false, a new PID is allocated from the local cluster manager. 255 256 * The new process inherits from the parent process (i) the open file descriptors, (ii) the 256 257 * vfs_root and the vfs_cwd inodes. … … 268 269 269 270 270 /******************** Signal Management Operations **************************************/271 272 /*********************************************************************************************273 * This function TODO [AG]274 ********************************************************************************************/275 void process_signal_handler( process_t * process );276 277 278 271 /******************** File Management Operations ****************************************/ 279 272 … … 287 280 /********************************************************************************************* 288 281 * This function uses as many remote accesses as required, to reset an entry in fd_array[], 289 * in all clusters containing a copy. The entry is identified by the <f ile_id> argument.282 * in all clusters containing a copy. The entry is identified by the <fdid> argument. 290 283 * This function must be executed by a thread running reference cluster, that contains 291 284 * the complete list of process descriptors copies. 292 285 ********************************************************************************************* 293 286 * @ process : pointer on the local process descriptor. 294 * @ f ile_id: file descriptor index in the fd_array.287 * @ fdid : file descriptor index in the fd_array. 295 288 ********************************************************************************************/ 296 289 void process_fd_remove( process_t * process, 297 uint32_t f ile_id );290 uint32_t fdid ); 298 291 299 292 /********************************************************************************************* … … 306 299 ********************************************************************************************* 307 300 * @ process : pointer on the local process descriptor. 308 * @ f ile_id: file descriptor index in the fd_array.301 * @ fdid : file descriptor index in the fd_array. 309 302 * @ return extended pointer on file descriptor if success / return XPTR_NULL if not found. 310 303 ********************************************************************************************/ 311 304 xptr_t process_fd_get_xptr( process_t * process, 312 uint32_t f ile_id );305 uint32_t fdid ); 313 306 314 307 /********************************************************************************************* … … 328 321 ********************************************************************************************* 329 322 * @ file_xp : extended pointer on the file descriptor to be registered. 330 * @ f ile_id: [out] buffer for fd_array slot index.323 * @ fdid : [out] buffer for fd_array slot index. 331 324 * @ return 0 if success / return EMFILE if array full. 332 325 ********************************************************************************************/ 333 error_t process_fd_register( xptr_t file_xp, 334 uint32_t * file_id ); 326 error_t process_fd_register( process_t * process, 327 xptr_t file_xp, 328 uint32_t * fdid ); 335 329 336 330 /*********************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.