This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Stop Link sequence

Guru 20755 points

Hello,

In MCFW user's guide it is said "If the next link is stopped before a previous link is stopped, then the previous could wait for ever on a buffer which never arrives since the next link is no longer active. Hence a previous link MUST be stopped before stopping the next link." I do not understand why there is a problem that the Link could wait for ever, becuase if anyway it is stopped and deleted, then as I understand it does not wait for anything. What is the meaning of this "wait for ever" in the document ?

Thank you,

Ran

  • Hi Ran,

    In case where in stop, start, sequence is used. This problem could be encountered, especially in case of links such as scalar, s/w mosaic, etc...
    1. Each link allocates a set of frame buffers, these buffers are stored in a free pool 
    2. To process an input, a free frame is allocated, that holds processed frame. The processed frame would be given to next link as input frame.
    3. When the next link process the input frame, the input frame is returned back to previous link, which goes into the free pool of previous link.
    In cases where in previous link had given all its output buffers to next link and stop was called, the previous link would not get back the free frames at all. Subsequently when an start is called, it has no output buffers to process the input frames, causing a lockup(infinite wait).

    Thanks,
    Sujith


  • Sujith,  Thank you very much!

    Ran