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.

is this a bug of the following code?(from dsp bios )

 

hi!

i see  the example in <<TMS320C6000 DSP/BIOS Application Programming Interface (API) Reference Guide>>,

-------------------------

that is

QUE_Elem *qelem;.

/* get pointer to first element in the queue */

qelem = QUE_head(queue);

/* scan entire queue for desired element */

while (qelem != queue) {

if(‘ qelem is the elem we’re looking for ‘) {

break;

}

qelem = QUE_next(queue);

}

/* make sure qelem is not the queue itself */

if (qelem != queue) {

QUE_remove(qelem);

}

 

so my question is that (qelem = QUE_next(queue);) right?

or qelem = QUE_next(qelem );

i  think QUE_next() dosen't  change the queue position,

Is that right?

  • Xavier said:

    so my question is that (qelem = QUE_next(queue);) right?

    or qelem = QUE_next(qelem );

    i  think QUE_next() doesn't  change the queue position,

    I believe you meant the last line quoted here to say QUE_next(queue); doesn't change the queue position. Otherwise it is hard to tell which one you meant to be questioning.

    And I also believe you are correct that this is an error in the documentation that should be corrected.

    Have you confirmed that it works correctly with QUE_next(queue) and that it does not work correctly with QUE_next(queue) ?