int MPI_Ssend_init(MPE_CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) { int returnVal; request_list *newrq; int typesize3; /* fprintf( stderr, "MPI_Ssend_init call on %d\n", procid_1 ); */ returnVal = PMPI_Ssend_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { rq_alloc( requests_avail_1, newrq ); if (newrq) { PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; newrq->otherParty = dest; newrq->next = 0; rq_add( requests_head_1, requests_tail_1, newrq ); } } return returnVal; }
static void rq_step(grpc_exec_ctx *exec_ctx, void *rq, grpc_error *error) { grpc_resource_quota *resource_quota = rq; resource_quota->step_scheduled = false; do { if (rq_alloc(exec_ctx, resource_quota)) goto done; } while (rq_reclaim_from_per_user_free_pool(exec_ctx, resource_quota)); if (!rq_reclaim(exec_ctx, resource_quota, false)) { rq_reclaim(exec_ctx, resource_quota, true); } done: grpc_resource_quota_internal_unref(exec_ctx, resource_quota); }
int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) { int returnVal; request_list *newrq1; returnVal = PMPI_Irecv( buf, count, datatype, source, tag, comm, request ); if (source != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { rq_alloc( requests_avail_1, newrq1 ); if (newrq1) { newrq1->request = *request; newrq1->status = RQ_RECV; newrq1->next = 0; rq_add( requests_head_1, requests_tail_1, newrq1 ); } } return returnVal; }