Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 Optimization by adding a pth_sem_dec in EMI layers run metho

open
nobody
None
5
2013-01-02
2013-01-02
Meik Felser
No

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

Discussion

  • Meik Felser
    Meik Felser
    2013-01-02

    patch to decrease the sem before the send operation