Changeset 389 for trunk/kernel/kern/rpc.c
- Timestamp:
- Aug 16, 2017, 2:54:04 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/rpc.c
r374 r389 70 70 &rpc_undefined, // 19 71 71 72 &rpc_vmm_get_ ref_vseg_server,// 2072 &rpc_vmm_get_vseg_server, // 20 73 73 &rpc_vmm_get_pte_server, // 21 74 74 &rpc_kcm_alloc_server, // 22 … … 1109 1109 // initialise RPC descriptor header 1110 1110 rpc_desc_t rpc; 1111 rpc.index = RPC_VFS_ INODE_LOAD;1111 rpc.index = RPC_VFS_MAPPER_LOAD_ALL; 1112 1112 rpc.response = 1; 1113 1113 … … 1147 1147 1148 1148 // set output argument 1149 hal_remote_swd( XPTR( client_cxy , &desc->args[ 3] ) , (uint64_t)error );1149 hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error ); 1150 1150 1151 1151 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", … … 1229 1229 1230 1230 ///////////////////////////////////////////////////////////////////////////////////////// 1231 // [20] Marshaling functions attached to RPC_VMM_GET_ REF_VSEG1231 // [20] Marshaling functions attached to RPC_VMM_GET_VSEG 1232 1232 ///////////////////////////////////////////////////////////////////////////////////////// 1233 1233 1234 1234 ////////////////////////////////////////////////// 1235 void rpc_vmm_get_ref_vseg_client( cxy_t cxy, 1236 process_t * process, // in 1237 intptr_t vaddr, // in 1238 xptr_t * vseg_xp ) // out 1239 { 1240 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1241 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1242 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1243 1244 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1245 1246 // initialise RPC descriptor header 1247 rpc_desc_t rpc; 1248 rpc.index = RPC_VMM_GET_REF_VSEG; 1235 void rpc_vmm_get_vseg_client( cxy_t cxy, 1236 process_t * process, // in 1237 intptr_t vaddr, // in 1238 xptr_t * vseg_xp, // out 1239 error_t * error ) // out 1240 { 1241 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1242 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1243 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1244 1245 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1246 1247 // initialise RPC descriptor header 1248 rpc_desc_t rpc; 1249 rpc.index = RPC_VMM_GET_VSEG; 1249 1250 rpc.response = 1; 1250 1251 … … 1258 1259 // get output argument from rpc descriptor 1259 1260 *vseg_xp = rpc.args[2]; 1260 1261 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1262 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1263 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1264 } 1265 1266 ///////////////////////////////////////////// 1267 void rpc_vmm_get_ref_vseg_server( xptr_t xp ) 1261 *error = (error_t)rpc.args[3]; 1262 1263 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1264 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1265 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1266 } 1267 1268 ///////////////////////////////////////// 1269 void rpc_vmm_get_vseg_server( xptr_t xp ) 1268 1270 { 1269 1271 process_t * process; … … 1271 1273 vseg_t * vseg_ptr; 1272 1274 xptr_t vseg_xp; 1275 error_t error; 1273 1276 1274 1277 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", … … 1285 1288 1286 1289 // call local kernel function 1287 vseg_ptr = vmm_get_vseg( process , vaddr ); 1288 1289 // set output argument to client RPC descriptor 1290 if( vseg_ptr == NULL ) vseg_xp = XPTR_NULL; 1291 else vseg_xp = XPTR( local_cxy , vseg_ptr ); 1290 error = vmm_get_vseg( process , vaddr , &vseg_ptr ); 1291 1292 // set output arguments to client RPC descriptor 1293 vseg_xp = XPTR( local_cxy , vseg_ptr ); 1292 1294 hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)vseg_xp ); 1295 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 1293 1296 1294 1297 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
Note: See TracChangeset
for help on using the changeset viewer.