Optimization by adding a pth_sem_dec in EMI layers run metho
Brought to you by:
e9925248
Hi,
I am looking at the EMI layers and I came across the following optimization/bugfix:
e.g. look at in EMI2Layer2Interface::Run
If a packet is send ( Send(inqueue.get()); ) , the semaphore indicating available packets (in_signal) is not reduced.
(This leads to an unnecessary cycling in the run method because iface->Get_Packet does not block anymore.)
I suggest to add
pth_sem_dec (&in_signal);
before the Send operation
(see attached patch)
Best,
Meik
patch to decrease the sem before the send operation