Something wrong with curs_threads(3X) ?
Hi, In curs_threads(3X), at the beginning of the manual: typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); int set_escdelay(int size); int set_tabsize(int size); int use_screen(SCREEN *scr, NCURSES_WINDOW_CB func, void *data); int use_window(WINDOW *win, NCURSES_SCREEN_CB func, void *data); use_screen = NCURSES_WINDOW_CB use_window = NCURSES_SCREEN_CB Target is not matched, I'm really confused. So I open /usr/include/curses.h, and find these: extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *); extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *); Seems much proper. So is this a bug? -- Best regards, Yanhui Shen ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
CPU usage so high, fread() on the FILE wrapped by libfetch's fetchXGetURL()
Hi, I found the CPU usage is pretty high while running 'pkg update', 'pkg install [fooapp]'. Seems it was caused by fread() on the FILE wrapped by libfetch's fetchXGetURL() , maybe fetch_read() in common.c. Here is a simple test code: http://pastebin.com/2sP1f4Wv I want to know whether it is a bug, or misuse of libfetch API, or any other matter? Run and look about its CPU usage (HTTP url has this issue, FTP url has not): % ./a.out http://mirrors.163.com/FreeBSD/ISO-IMAGES-amd64/8.3/FreeBSD-8.3-RELEASE-amd64-bootonly.iso Env: % uname -a FreeBSD ThinkPad 9.0-STABLE FreeBSD 9.0-STABLE #1: Tue Apr 10 12:46:50 CST 2012 shen@ThinkPad:/usr/obj/usr/src/sys/ThinkPad amd64 -- Best regards, Yanhui Shen ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org