Changeset 581 for trunk/kernel/kern/process.c
- Timestamp:
- Oct 10, 2018, 3:11:53 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/process.c
r580 r581 112 112 cxy_t chdev_cxy; 113 113 pid_t parent_pid; 114 lpid_t process_lpid;115 lpid_t parent_lpid;116 114 117 115 // get parent process cluster and local pointer … … 121 119 // get parent_pid 122 120 parent_pid = hal_remote_l32( XPTR( parent_cxy , &parent_ptr->pid ) ); 123 124 // get process and parent lpid125 process_lpid = LPID_FROM_PID( pid );126 parent_lpid = LPID_FROM_PID( parent_pid );127 121 128 122 #if DEBUG_PROCESS_REFERENCE_INIT … … 156 150 157 151 // define the stdin/stdout/stderr pseudo files <=> select a TXT terminal. 158 if( (process_lpid == 1) || // INIT process 159 (parent_lpid == 1) ) // KSH process 160 { 161 // allocate a TXT channel 162 if( process_lpid == 1 ) txt_id = 0; // INIT 163 else txt_id = process_txt_alloc(); // KSH 152 if( (pid == 1) || (parent_pid == 1) ) // INIT or KSH process 153 { 154 // select a TXT channel 155 if( pid == 1 ) txt_id = 0; // INIT 156 else txt_id = process_txt_alloc(); // KSH 164 157 165 158 // attach process to TXT … … 1791 1784 if( txt_owner_xp == process_xp ) 1792 1785 { 1793 nolock_printk("PID %X | PPID %X | TS %X | %s (FG) |%X | %d | %s\n",1794 pid, ppid, state, txt_name, process_ptr, th_nr, elf_name );1786 nolock_printk("PID %X | %s (FG) | %X | PPID %X | TS %X | %d | %s\n", 1787 pid, txt_name, process_ptr, ppid, state, th_nr, elf_name ); 1795 1788 } 1796 1789 else 1797 1790 { 1798 nolock_printk("PID %X | PPID %X | TS %X | %s (BG) |%X | %d | %s\n",1799 pid, ppid, state, txt_name, process_ptr, th_nr, elf_name );1791 nolock_printk("PID %X | %s (BG) | %X | PPID %X | TS %X | %d | %s\n", 1792 pid, txt_name, process_ptr, ppid, state, th_nr, elf_name ); 1800 1793 } 1801 1794 } // end process_display() … … 1806 1799 //////////////////////////////////////////////////////////////////////////////////////// 1807 1800 1808 //////////////////////////// 1801 ////////////////////////////////// 1809 1802 uint32_t process_txt_alloc( void ) 1810 1803 {
Note: See TracChangeset
for help on using the changeset viewer.