Lines Matching refs:rpc
1177 struct rpc { struct
1303 struct rpc *rpc, *tmp; in process_rpc_calls() local
1310 list_for_each_entry_safe(rpc, tmp, &calls, list) { in process_rpc_calls()
1311 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg); in process_rpc_calls()
1318 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1319 rpc->result = r; in process_rpc_calls()
1322 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1323 complete(&rpc->complete); in process_rpc_calls()
1356 static int perform_rpc(struct era *era, struct rpc *rpc) in perform_rpc() argument
1358 rpc->result = 0; in perform_rpc()
1359 init_completion(&rpc->complete); in perform_rpc()
1362 list_add(&rpc->list, &era->rpc_calls); in perform_rpc()
1366 wait_for_completion(&rpc->complete); in perform_rpc()
1368 return rpc->result; in perform_rpc()
1373 struct rpc rpc; in in_worker0() local
1374 rpc.fn0 = fn; in in_worker0()
1375 rpc.fn1 = NULL; in in_worker0()
1377 return perform_rpc(era, &rpc); in in_worker0()
1383 struct rpc rpc; in in_worker1() local
1384 rpc.fn0 = NULL; in in_worker1()
1385 rpc.fn1 = fn; in in_worker1()
1386 rpc.arg = arg; in in_worker1()
1388 return perform_rpc(era, &rpc); in in_worker1()