Lines Matching refs:rpc
1181 struct rpc { struct
1307 struct rpc *rpc, *tmp; in process_rpc_calls() local
1314 list_for_each_entry_safe(rpc, tmp, &calls, list) { in process_rpc_calls()
1315 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg); in process_rpc_calls()
1322 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1323 rpc->result = r; in process_rpc_calls()
1326 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1327 complete(&rpc->complete); in process_rpc_calls()
1360 static int perform_rpc(struct era *era, struct rpc *rpc) in perform_rpc() argument
1362 rpc->result = 0; in perform_rpc()
1363 init_completion(&rpc->complete); in perform_rpc()
1366 list_add(&rpc->list, &era->rpc_calls); in perform_rpc()
1370 wait_for_completion(&rpc->complete); in perform_rpc()
1372 return rpc->result; in perform_rpc()
1377 struct rpc rpc; in in_worker0() local
1378 rpc.fn0 = fn; in in_worker0()
1379 rpc.fn1 = NULL; in in_worker0()
1381 return perform_rpc(era, &rpc); in in_worker0()
1387 struct rpc rpc; in in_worker1() local
1388 rpc.fn0 = NULL; in in_worker1()
1389 rpc.fn1 = fn; in in_worker1()
1390 rpc.arg = arg; in in_worker1()
1392 return perform_rpc(era, &rpc); in in_worker1()