Changeset 614 for trunk/kernel/kern/rpc.c
- Timestamp:
- Jan 15, 2019, 1:59:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.