Jump to content

collect trasactions from different threads at any given time


ankitks

Recommended Posts

I have a function (nb_trasport_fw) that is been called few times in same cycle

...nb_transport_fw(...) {

   ...

   queue.push_back(trans);

   e.notify()

}

 

I also have a thread that's waiting on event 'e'. 
 

arbitrate() {

wait(e);

//do I have all the transactions in my queue.

//arbitrate among trasactions in queue.

}

Basically I need a point where I collect all the transactions and arbitrate among them. I can't really look at single transaction and make a decision.  Challenging part is I don't know if function will be called 0,1 or N times.

 

Thanks

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...