portable-lib icon indicating copy to clipboard operation
portable-lib copied to clipboard

t_ringbuf.c: Suspicious useless variable j in upause() function

Open liuqun opened this issue 6 years ago • 0 comments

https://github.com/opencoff/portable-lib/blob/9b479750f6fb4f4265782370e238e4443cf22c93/test/t_ringbuf.c#L188-L199

Maybe simply asm("nop") is better:

     for (i = 0; i < n; ++i) { 
         asm("nop");
         rte_pause(); 
     } 

liuqun avatar Aug 15 '19 10:08 liuqun