- Timestamp:
- Jan 17, 2019, 5:59:51 PM (6 years ago)
- Location:
- trunk/kernel/kern
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/process.c
r611 r618 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016,2017,2018 )6 * Alain Greiner (2016,2017,2018,2019) 7 7 * 8 8 * Copyright (c) UPMC Sorbonne Universites … … 412 412 413 413 // check no more threads 414 assert( (process->th_nr == 0) , "process %x in cluster %x contains threads", pid , local_cxy ); 414 assert( (process->th_nr == 0), 415 "process %x in cluster %x contains threads", pid , local_cxy ); 415 416 416 417 #if DEBUG_PROCESS_DESTROY … … 422 423 #endif 423 424 425 // Destroy VMM 426 vmm_destroy( process ); 427 428 #if (DEBUG_PROCESS_DESTROY & 1) 429 if( DEBUG_PROCESS_DESTROY < cycle ) 430 printk("\n[%s] thread[%x,%x] destroyed VMM for process %x in cluster %x\n", 431 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy ); 432 #endif 433 424 434 // remove process from local_list in local cluster manager 425 435 cluster_process_local_unlink( process ); 426 436 437 #if (DEBUG_PROCESS_DESTROY & 1) 438 if( DEBUG_PROCESS_DESTROY < cycle ) 439 printk("\n[%s] thread[%x,%x] removed process %x in cluster %x from local list\n", 440 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy ); 441 #endif 442 427 443 // remove process from copies_list in owner cluster manager 428 444 cluster_process_copies_unlink( process ); 445 446 #if (DEBUG_PROCESS_DESTROY & 1) 447 if( DEBUG_PROCESS_DESTROY < cycle ) 448 printk("\n[%s] thread[%x,%x] removed process %x in cluster %x from copies list\n", 449 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy ); 450 #endif 429 451 430 452 // remove process from children_list … … 447 469 remote_queuelock_release( children_lock_xp ); 448 470 471 #if (DEBUG_PROCESS_DESTROY & 1) 472 if( DEBUG_PROCESS_DESTROY < cycle ) 473 printk("\n[%s] thread[%x,%x] removed process %x in cluster %x from children list\n", 474 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy ); 475 #endif 476 449 477 // release the process PID to cluster manager 450 478 cluster_pid_release( pid ); 451 } 452 453 // FIXME close all open files and synchronize dirty [AG] 454 455 // decrease refcount for bin file, root file and cwd file 456 if( process->vfs_bin_xp != XPTR_NULL ) vfs_file_count_down( process->vfs_bin_xp ); 457 if( process->vfs_root_xp != XPTR_NULL ) vfs_file_count_down( process->vfs_root_xp ); 458 if( process->cwd_xp != XPTR_NULL ) vfs_file_count_down( process->cwd_xp ); 459 460 // Destroy VMM 461 vmm_destroy( process ); 479 480 #if (DEBUG_PROCESS_DESTROY & 1) 481 if( DEBUG_PROCESS_DESTROY < cycle ) 482 printk("\n[%s] thread[%x,%x] released process PID %x to pmgr in cluster %x\n", 483 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy ); 484 #endif 485 486 } 487 488 // FIXME decrement the refcount on file pointer by vfs_bin_xp [AG] 489 // FIXME close all open files [AG] 490 // FIXME synchronize dirty files [AG] 462 491 463 492 // release memory allocated to process descriptor -
trunk/kernel/kern/process.h
r612 r618 115 115 * defined in the reference cluster, and are undefined in other clusters. 116 116 * 6) The <local_list>, <copies_list>, <th_tbl>, <th_nr>, <u_th_lock> or <k_th_lock> fields 117 * are specific n each cluster, and are defined in all process descriptors copies.117 * are specific in each cluster, and are defined in all process descriptors copies. 118 118 * 7) The termination <flags> and <exit_status> are only defined in the reference cluster. 119 119 * (The term_state format is defined in the shared_syscalls.h file ).
Note: See TracChangeset
for help on using the changeset viewer.