"Getting To Know" (GTK) samples consume high CPU usage.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM000594
已提交
December 14, 2005
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.1
编程语言
C++
修正版本
9.2
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
1. Create a header file named gtk_axctl_zzz.h with the following code: #include <time.h> extern "C" static gboolean gtk_axctl_rest(gpointer data) { static struct timespec ts; ts.tv_sec = 0; ts.tv_nsec = 1000; nanosleep(&ts, NULL); return TRUE; }2. #include gtk_axctl_zzz.h in the source file3. before gtk_main(), put: g_idle_add(gtk_axctl_rest, NULL);User needs to include /usr/lib/librt.so library in the compiling script also.