Changeset 614 for trunk/kernel/kern
- Timestamp:
- Jan 15, 2019, 1:59:32 PM (6 years ago)
- Location:
- trunk/kernel/kern
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r612 r614 1113 1113 vfs_root_inode_xp = XPTR_NULL; 1114 1114 1115 // File System must be FATFS in this implementation,1116 // butother File System can be introduced here1115 // Only FATFS is supported yet, 1116 // other File System can be introduced here 1117 1117 if( CONFIG_VFS_ROOT_IS_FATFS ) 1118 1118 { … … 1172 1172 } 1173 1173 1174 // create the <.> and <..> dentries in VFS root directory 1175 // the VFS root parent inode is the VFS root inode itself 1176 vfs_add_special_dentries( vfs_root_inode_xp, 1177 vfs_root_inode_xp ); 1178 1174 1179 // register VFS root inode in process_zero descriptor of cluster 0 1175 1180 process_zero.vfs_root_xp = vfs_root_inode_xp; … … 1255 1260 #if DEBUG_KERNEL_INIT 1256 1261 if( (core_lid == 0) & (local_cxy == 1) ) 1257 printk("\n[%s] : exit barrier 4: VFS root (%x,%x) in cluster 1 / cycle %d\n",1262 printk("\n[%s] : exit barrier 5 : VFS root (%x,%x) in cluster 1 / cycle %d\n", 1258 1263 __FUNCTION__, GET_CXY(process_zero.vfs_root_xp), 1259 1264 GET_PTR(process_zero.vfs_root_xp), (uint32_t)hal_get_cycles() ); -
trunk/kernel/kern/rpc.c
r612 r614 54 54 &rpc_undefined, // 2 unused slot 55 55 &rpc_process_make_fork_server, // 3 56 &rpc_u ndefined, // 4 unused slot57 &rpc_u ndefined, // 5 unused slot56 &rpc_user_dir_create_server, // 4 57 &rpc_user_dir_destroy_server, // 5 58 58 &rpc_thread_user_create_server, // 6 59 59 &rpc_thread_kernel_create_server, // 7 … … 90 90 "undefined", // 2 91 91 "PROCESS_MAKE_FORK", // 3 92 " undefined",// 493 " undefined",// 592 "USER_DIR_CREATE", // 4 93 "USER_DIR_DESTROY", // 5 94 94 "THREAD_USER_CREATE", // 6 95 95 "THREAD_KERNEL_CREATE", // 7 … … 657 657 void rpc_user_dir_create_client( cxy_t cxy, 658 658 vfs_inode_t * inode, 659 xptr_t ref_xp, 659 660 user_dir_t ** dir ) 660 661 { … … 677 678 // set input arguments in RPC descriptor 678 679 rpc.args[0] = (uint64_t)(intptr_t)inode; 680 rpc.args[1] = (uint64_t)ref_xp; 679 681 680 682 // register RPC request in remote RPC fifo … … 682 684 683 685 // get output argument from RPC descriptor 684 *dir = (user_dir_t *)(intptr_t)rpc.args[ 1];686 *dir = (user_dir_t *)(intptr_t)rpc.args[2]; 685 687 686 688 #if DEBUG_RPC_USER_DIR_CREATE … … 704 706 705 707 vfs_inode_t * inode; // pointer on inode in server cluster 708 xptr_t ref_xp; // extended pointer on reference user process 706 709 user_dir_t * dir; // pointer on user_dir structure in server cluster 707 710 … … 711 714 712 715 // get input argument from RPC descriptor 713 inode = (vfs_inode_t *)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0])); 716 inode = (vfs_inode_t *)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0])); 717 ref_xp = (xptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[1])); 714 718 715 719 // call kernel function 716 dir = user_dir_create( inode );720 dir = user_dir_create( inode , ref_xp ); 717 721 718 722 // set output argument into RPC descriptor 719 hal_remote_s64( XPTR( client_cxy , &desc->args[ 1] ) , (intptr_t)dir );723 hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (intptr_t)dir ); 720 724 721 725 #if DEBUG_RPC_USER_DIR_CREATE … … 733 737 //////////////////////////////////////////////////// 734 738 void rpc_user_dir_destroy_client( cxy_t cxy, 735 user_dir_t * dir ) 739 user_dir_t * dir, 740 xptr_t ref_xp ) 736 741 { 737 742 #if DEBUG_RPC_USER_DIR_DESTROY … … 753 758 // set input arguments in RPC descriptor 754 759 rpc.args[0] = (uint64_t)(intptr_t)dir; 760 rpc.args[1] = (uint64_t)ref_xp; 755 761 756 762 // register RPC request in remote RPC fifo … … 777 783 778 784 user_dir_t * dir; // pointer on user_dir structure in server cluster 785 xptr_t ref_xp; // extended pointer on reference process 779 786 780 787 // get client cluster identifier and pointer on RPC descriptor … … 783 790 784 791 // get input argument from RPC descriptor 785 dir = (user_dir_t *)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0])); 792 dir = (user_dir_t *)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0])); 793 ref_xp = (xptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[1])); 786 794 787 795 // call kernel function 788 user_dir_destroy( dir );796 user_dir_destroy( dir , ref_xp ); 789 797 790 798 #if DEBUG_RPC_USER_DIR_DESTROY -
trunk/kernel/kern/rpc.h
r612 r614 229 229 * [4] The RPC_USER_DIR_CREATE allows a client thread to create an user_dir_t 230 230 * structure and the associated array of dirents in a remote cluster containing 231 * the target directory inode. It is called by the sys_opendir() function. 231 * the target directory <inode>. It creates an ANON vseg in the user reference 232 * process VMM identified by the <ref_xp>. This reference cluster cluster can be 233 * different from both the client and server clusters. 234 * It is called by the sys_opendir() function. 232 235 *********************************************************************************** 233 236 * @ cxy : server cluster identifier. 234 237 * @ inode : [in] local pointer on inode in server cluster. 238 * @ ref_xp : [in] extended pointer on user reference process descriptor. 235 239 * @ dir : [out] local pointer on created user_dir structure. 236 240 **********************************************************************************/ 237 241 void rpc_user_dir_create_client( cxy_t cxy, 238 242 struct vfs_inode_s * inode, 243 xptr_t ref_xp, 239 244 struct user_dir_s ** dir ); 240 245 … … 248 253 * @ cxy : server cluster identifier. 249 254 * @ dir : [in] local pointer on created user_dir structure. 255 * @ ref_xp : [in] extended pointer on user reference process descriptor. 250 256 **********************************************************************************/ 251 257 void rpc_user_dir_destroy_client( cxy_t cxy, 252 struct user_dir_s * dir ); 258 struct user_dir_s * dir, 259 xptr_t ref_xp ); 253 260 254 261 void rpc_user_dir_destroy_server( xptr_t xp ); -
trunk/kernel/kern/scheduler.c
r610 r614 487 487 488 488 #if (DEBUG_SCHED_YIELD & 0x1) 489 if( sched->trace ) sched_display( lid ); 489 if( sched->trace ) 490 sched_display( lid ); 490 491 #endif 491 492 492 // This assert should never be false, as this check must be493 // done before by any function that can possibly deschedule...493 // This assert should never be false, as this check has been 494 // done before, by any function that can possibly deschedule... 494 495 assert( (current->busylocks == 0), 495 496 "unexpected descheduling of thread holding %d busylocks = %d\n", current->busylocks );
Note: See TracChangeset
for help on using the changeset viewer.