Lines Matching refs:rpc
1164 struct rpc { struct
1277 struct rpc *rpc, *tmp; in process_rpc_calls() local
1284 list_for_each_entry_safe(rpc, tmp, &calls, list) { in process_rpc_calls()
1285 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg); in process_rpc_calls()
1292 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1293 rpc->result = r; in process_rpc_calls()
1296 list_for_each_entry_safe(rpc, tmp, &calls, list) in process_rpc_calls()
1297 complete(&rpc->complete); in process_rpc_calls()
1330 static int perform_rpc(struct era *era, struct rpc *rpc) in perform_rpc() argument
1332 rpc->result = 0; in perform_rpc()
1333 init_completion(&rpc->complete); in perform_rpc()
1336 list_add(&rpc->list, &era->rpc_calls); in perform_rpc()
1340 wait_for_completion(&rpc->complete); in perform_rpc()
1342 return rpc->result; in perform_rpc()
1347 struct rpc rpc; in in_worker0() local
1348 rpc.fn0 = fn; in in_worker0()
1349 rpc.fn1 = NULL; in in_worker0()
1351 return perform_rpc(era, &rpc); in in_worker0()
1357 struct rpc rpc; in in_worker1() local
1358 rpc.fn0 = NULL; in in_worker1()
1359 rpc.fn1 = fn; in in_worker1()
1360 rpc.arg = arg; in in_worker1()
1362 return perform_rpc(era, &rpc); in in_worker1()