We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Page Bookmarked

AR# 22349

7.1i EDK, RTOS - Concurrent use of sprintf, printf, fprintf, and malloc hangs the system


General Description:

I have two threads; both of them use the sprintf( ) function. When I run my system, it hangs. Why is this occurring?


The C library is not thread-safe/re-entrant when used with Xilkernel. A lockup is quite possible and will happen with concurrent usage of sprintf, printf, fprintf, malloc, etc. For this reason, use of these functions must be protected with synchronization primitives.

AR# 22349
Date 04/06/2011
Status Archive
Type General Article