Browse Source

Test

etomic
jl777 7 years ago
parent
commit
7d7f489827
  1. 2
      crypto777/nanosrc/protocols/pipeline/xpush.c
  2. 2
      crypto777/nanosrc/protocols/reqrep/xreq.c
  3. 3
      crypto777/nanosrc/protocols/utils/lb.c
  4. 6
      crypto777/nanosrc/protocols/utils/priolist.c
  5. 3
      crypto777/nanosrc/protocols/utils/priolist.h

2
crypto777/nanosrc/protocols/pipeline/xpush.c

@ -115,7 +115,7 @@ static int nn_xpush_add (struct nn_sockbase *self, struct nn_pipe *pipe)
alloc_assert (data);
nn_pipe_setdata (pipe, data);
nn_lb_add (&xpush->lb, &data->lb, pipe, sndprio);
printf("nn_xpush_add\n");
return 0;
}

2
crypto777/nanosrc/protocols/reqrep/xreq.c

@ -101,7 +101,7 @@ int nn_xreq_add(struct nn_sockbase *self, struct nn_pipe *pipe)
nn_pipe_setdata(pipe,data);
nn_lb_add(&xreq->lb,&data->lb,pipe,sndprio);
nn_fq_add(&xreq->fq,&data->fq,pipe,rcvprio);
printf("nn_xreq_add\n");
return 0;
}

3
crypto777/nanosrc/protocols/utils/lb.c

@ -37,8 +37,7 @@ void nn_lb_term (struct nn_lb *self)
nn_priolist_term (&self->priolist);
}
void nn_lb_add (struct nn_lb *self, struct nn_lb_data *data,
struct nn_pipe *pipe, int priority)
void nn_lb_add (struct nn_lb *self, struct nn_lb_data *data,struct nn_pipe *pipe, int priority)
{
nn_priolist_add (&self->priolist, &data->priodata, pipe, priority);
}

6
crypto777/nanosrc/protocols/utils/priolist.c

@ -54,7 +54,7 @@ void nn_priolist_add(struct nn_priolist *self,struct nn_priolist_data *data, str
{
data->pipe = pipe;
data->priority = priority;
//printf("nn_priolist_add.%p data.%p priority.%d\n",self,data,priority);
printf("nn_priolist_add.%p data.%p priority.%d\n",self,data,priority);
nn_list_item_init (&data->item);
}
@ -136,10 +136,10 @@ struct nn_pipe *nn_priolist_getpipe(struct nn_priolist *self)
{
if ( nn_slow(self->current == -1) )
{
//printf("nn_priolist_getpipe.%p -1 current it is\n",self);
printf("nn_priolist_getpipe.%p -1 current it is\n",self);
return NULL;
}
//printf("nn_priolist_getpipe.%p current.%d slot.%p\n",self,self->current,self->slots[self->current - 1].current->pipe);
printf("nn_priolist_getpipe.%p current.%d slot.%p\n",self,self->current,self->slots[self->current - 1].current->pipe);
return self->slots[self->current - 1].current->pipe;
}

3
crypto777/nanosrc/protocols/utils/priolist.h

@ -86,8 +86,7 @@ void nn_priolist_activate (struct nn_priolist *self, struct nn_priolist_data *da
0 otherwise. */
int nn_priolist_is_active (struct nn_priolist *self);
/* Get the pointer to the current pipe. If there's no pipe in the list,
NULL is returned. */
// Get the pointer to the current pipe. If there's no pipe in the list, NULL is returned.
struct nn_pipe *nn_priolist_getpipe (struct nn_priolist *self);
/* Moves to the next pipe in the list. If 'release' is set to 1, the current

Loading…
Cancel
Save