embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

msleep has no function prototype

Open digitalnumeric opened this issue 1 year ago • 1 comments

msleep() is listed as supported by XilTimer, but its prototype is missing from sleep.h. Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

XilTimer.c has a msleep() function: xiltimer.c on Github void msleep(unsigned long mseconds) { XilTimer_Sleep(mseconds, XTIMER_DELAY_MSEC); }

Prototype missing from XilTimer's sleep.h (as well as other sleep.h files elsewhere): XilTimer's sleep.h on Github

Reference to where this was reported on the forums earlier this year: Vitis Unified msleep() function missing from sleep.h but present in xiltimer.c

digitalnumeric avatar Aug 30 '24 19:08 digitalnumeric

Thanks. We will make the corrections.

anirudha1977 avatar Sep 02 '24 03:09 anirudha1977

I just checked sleep.h in Vitis 2024.2, there is still no prototype for msleep()

digitalnumeric avatar Nov 22 '24 15:11 digitalnumeric

Since this wasn't fixed in Vitis 2024.2, a new issue was added, this time with a patch file, to bring this issue back to the forefront. https://github.com/Xilinx/embeddedsw/issues/324

digitalnumeric avatar Nov 23 '24 14:11 digitalnumeric

Thanks for tracking this. Sorry, we will fix this in the next release.

anirudha1977 avatar Nov 25 '24 03:11 anirudha1977

Thank you.

digitalnumeric avatar Nov 25 '24 13:11 digitalnumeric

I just checked sleep.h in Vitis 2024.2, there is still no prototype for msleep() @digitalnumeric It is there in 2024.2 xiltimer sleep.h at https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2024.2/lib/sw_services/xiltimer/src/sleep.h#L82 Iam not sure on which file you have checked. This prototype isn't needed in common sleep.h as this API is only part of xiltimer and doesn't exist in non xiltimer case.

sivadur avatar Nov 27 '24 09:11 sivadur

My apologies, I see now that you are correct. We were looking at the wrong, sleep.h.

digitalnumeric avatar Nov 27 '24 21:11 digitalnumeric