Lines Matching refs:rpc
1165 struct rpc { struct
1278 struct rpc *rpc, *tmp; in process_rpc_calls() local
1285 list_for_each_entry_safe(rpc, tmp, &calls, list) { in process_rpc_calls()
1286 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg); in process_rpc_calls()
1293 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1294 rpc->result = r; in process_rpc_calls()
1297 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1298 complete(&rpc->complete); in process_rpc_calls()
1331 static int perform_rpc(struct era *era, struct rpc *rpc) in perform_rpc() argument
1333 rpc->result = 0; in perform_rpc()
1334 init_completion(&rpc->complete); in perform_rpc()
1337 list_add(&rpc->list, &era->rpc_calls); in perform_rpc()
1341 wait_for_completion(&rpc->complete); in perform_rpc()
1343 return rpc->result; in perform_rpc()
1348 struct rpc rpc; in in_worker0() local
1349 rpc.fn0 = fn; in in_worker0()
1350 rpc.fn1 = NULL; in in_worker0()
1352 return perform_rpc(era, &rpc); in in_worker0()
1358 struct rpc rpc; in in_worker1() local
1359 rpc.fn0 = NULL; in in_worker1()
1360 rpc.fn1 = fn; in in_worker1()
1361 rpc.arg = arg; in in_worker1()
1363 return perform_rpc(era, &rpc); in in_worker1()