Skip to content

Commit

Permalink
prov/sockets: Add fi_trywait implementation
Browse files Browse the repository at this point in the history
Re-enable FI_GETWAIT support and add fi_trywait implementation.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
  • Loading branch information
shefty committed Feb 24, 2016
1 parent 35c7e4c commit a619a9f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
3 changes: 0 additions & 3 deletions prov/sockets/src/sock_cntr.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ static int sock_cntr_control(struct fid *fid, int command, void *arg)

switch (command) {
case FI_GETWAIT:
/*
switch (cntr->attr.wait_obj) {
case FI_WAIT_NONE:
case FI_WAIT_UNSPEC:
Expand All @@ -301,8 +300,6 @@ static int sock_cntr_control(struct fid *fid, int command, void *arg)
break;
}
break;
*/
return -FI_ENOSYS;

case FI_GETOPSFLAG:
memcpy(arg, &cntr->attr.flags, sizeof(uint64_t));
Expand Down
3 changes: 0 additions & 3 deletions prov/sockets/src/sock_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ static struct fi_ops_cq sock_cq_ops = {

static int sock_cq_control(struct fid *fid, int command, void *arg)
{
/*
struct sock_cq *cq;
int ret = 0;

Expand Down Expand Up @@ -432,8 +431,6 @@ static int sock_cq_control(struct fid *fid, int command, void *arg)
}

return ret;
*/
return -FI_ENOSYS;
}

static struct fi_ops sock_cq_fi_ops = {
Expand Down
3 changes: 0 additions & 3 deletions prov/sockets/src/sock_eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ static int sock_eq_fi_close(struct fid *fid)

static int sock_eq_control(struct fid *fid, int command, void *arg)
{
/*
int ret = 0;
struct sock_eq *eq;

Expand All @@ -311,8 +310,6 @@ static int sock_eq_control(struct fid *fid, int command, void *arg)
break;
}
return ret;
*/
return -FI_ENOSYS;
}

static struct fi_ops sock_eq_fi_ops = {
Expand Down
8 changes: 7 additions & 1 deletion prov/sockets/src/sock_fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,19 @@ int sock_verify_info(struct fi_info *hints)
return 0;
}

static int sock_trywait(struct fid_fabric *fabric, struct fid **fids, int count)
{
/* we're always ready to wait! */
return 0;
}

static struct fi_ops_fabric sock_fab_ops = {
.size = sizeof(struct fi_ops_fabric),
.domain = sock_domain,
.passive_ep = sock_msg_passive_ep,
.eq_open = sock_eq_open,
.wait_open = sock_wait_open,
.trywait = fi_no_trywait
.trywait = sock_trywait
};

static int sock_fabric_close(fid_t fid)
Expand Down
3 changes: 0 additions & 3 deletions prov/sockets/src/sock_wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ static struct fi_ops_wait sock_wait_ops = {

static int sock_wait_control(struct fid *fid, int command, void *arg)
{
/*
struct sock_wait *wait;
int ret = 0;

Expand All @@ -225,8 +224,6 @@ static int sock_wait_control(struct fid *fid, int command, void *arg)
break;
}
return ret;
*/
return -FI_ENOSYS;
}

int sock_wait_close(fid_t fid)
Expand Down

0 comments on commit a619a9f

Please sign in to comment.