Changeset 443 for trunk/kernel/kern/process.h
- Timestamp:
- May 16, 2018, 4:15:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/process.h
r441 r443 90 90 * The process descriptor is replicated in all clusters containing at least one thread 91 91 * of the PID process, with the following rules : 92 * 1) The <pid>, <ppid>, <ref_xp>, < vfs_root_xp>, <vfs_bin_xp> fields are defined93 * in all process descriptor copies.92 * 1) The <pid>, <ppid>, <ref_xp>, <owner_xp>, <vfs_root_xp>, <vfs_bin_xp> fields are 93 * defined in all process descriptor copies. 94 94 * 2) The <vfs_cwd_xp> and associated <cwd_lock>, that can be dynamically modified, 95 95 * are only defined in the reference process descriptor. … … 106 106 * are defined in all process descriptors copies. 107 107 * 7) The termination <flags> and <exit_status> are only defined in the reference cluster. 108 * The term 108 * The term_state format is defined in the shared_syscalls.h file. 109 109 ********************************************************************************************/ 110 110 … … 119 119 pid_t pid; /*! process identifier */ 120 120 xptr_t ref_xp; /*! extended pointer on reference process */ 121 xptr_t owner_xp; /*! extended pointer on owner process */ 121 122 xptr_t parent_xp; /*! extended pointer on parent process */ 122 123 … … 264 265 /********************************************************************************************* 265 266 * This debug function diplays on the kernel terminal TXT0 detailed informations on a 266 * reference processidentified by the <process_xp> argument.267 * process descriptor identified by the <process_xp> argument. 267 268 * It can be called by a thread running in any cluster. 268 ********************************************************************************************* 269 * @ process_xp : extended pointer on reference process. 269 * WARNING: this function uses the nolock_printk() function, and the TXT0 lock MUST be 270 * taken by the caller function. 271 ********************************************************************************************* 272 * @ process_xp : extended pointer on process descriptor. 270 273 ********************************************************************************************/ 271 274 void process_display( xptr_t process_xp ); … … 379 382 380 383 /********************************************************************************************* 381 * This function implements the "fork" system call, and is called by the sys_fork() function .382 * It allocates memory and initializes a new "child" process descriptor, and the383 * associated "child" thread descriptor in the local cluster. This function can involve384 * up to three different clusters :385 * - the child (local) cluster can be any cluster defined by the sys_fork function.384 * This function implements the "fork" system call, and is called by the sys_fork() function, 385 * likely throuch the RPC_PROCESS_MAKE_FORK. 386 * It allocates memory and initializes a new "child" process descriptor, and the associated 387 * "child" thread descriptor in local cluster. It involves up to three different clusters : 388 * - the child (local) cluster can be any cluster selected by the sys_fork function. 386 389 * - the parent cluster must be the reference cluster for the parent process. 387 390 * - the client cluster containing the thread requesting the fork can be any cluster. … … 483 486 * It checks that there is an available slot in the local th_tbl[] array, 484 487 * allocates a new LTID, and registers the new thread in the th_tbl[]. 485 * WARNING : the lock protecting the th_tbl[] must be taken by the caller.488 * It takes the lock protecting exclusive access to the th_tbl[]. 486 489 ********************************************************************************************* 487 490 * @ process : pointer on the local process descriptor. … … 496 499 /********************************************************************************************* 497 500 * This function removes a thread registration from the local process descriptor. 498 * WARNING : the lock protecting the th_tbl[] must be taken by the caller.501 * It takes the lock protecting exclusive access to the th_tbl[]. 499 502 ********************************************************************************************* 500 503 * @ thread : local pointer on thread to be removed. 501 ********************************************************************************************/ 502 void process_remove_thread( struct thread_s * thread ); 504 * @ return true if the removed thread was the last registered thread. 505 ********************************************************************************************/ 506 bool_t process_remove_thread( struct thread_s * thread ); 503 507 504 508 … … 551 555 * When the process dentified by the <owner_xp> argument has the exclusive ownership of 552 556 * the TXT_RX terminal, this function transfer this ownership to another attached process. 553 * The process descriptor must be in the process owner cluster. 554 * This function does nothing if the <pid> process is not the owner. 557 * The process descriptor must be the process owner. 558 * This function does nothing if the process identified by the <process_xp> is not 559 * the TXT owner. 555 560 * - If the current owner is not the KSH process, the new owner is the KSH process. 556 * - If the <pid> process is thethe KSH process, the new owner is another attached process.561 * - If the current owner is the KSH process, the new owner is another attached process. 557 562 * - If there is no other attached process, the TXT has no more defined owner. 558 563 *********************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.