ToDo:
http://shinh.skr.jp/m/?date=20090617#p01
¤Î³¤¤À¤±¤É¡¢ Solaris ¤Î printf ¤¬ async signal safe ¤À¤ÈÃÎ¤Ã¤Æ ¤¹¤´¤¤¤Ê¡¼¤È»×¤Ã¤¿¤³¤È¤¬¤¢¤ë¤Î¤À¤±¤É¡¢
http://www.hi-matic.org/diary/index.cgi?20081224#24-1
¤Þ¤¡ printf ¤ß¤¿¤¤¤Ë¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ÎÃæ¤Ç ¤È¤Æ¤â»È¤¤¤¿¤¯¤Ê¤ë¤è¤¦¤ÊʪÂΤ¬ async signal safe ¤Ê¤Î¤Ï ¤«¤Ê¤ê¤¤¤¤¤³¤È¤Ê¤ó¤À¤è¤Ê¤¡¡£
¾¤Ë async signal safe ¤Ë¤Ê¤ë¤È´ò¤·¤¤¤â¤Î¤È¤·¤Æ¤Ï¡¢ ¤¿¤Ö¤ó malloc ¤¬É®Æ¬¤Ê¤ó¤¸¤ã¤Ê¤¤¤«¤È»×¤¦¡£ ¤±¤É¡¢¤³¤ì¤ÏÁêÅö¤¦¤¶¤¤¤È¤¤¤¦¤«ÉÔ²Äǽ¤Ë¶á¤¤¤È»×¤¦¡£
¤Ç¤Þ¤¡ async signal safe ¤Ë¤¹¤ë¤Ë¤Ï¤É¤¦¤¹¤ì¤Ð¤¤¤¤¤«¤È¤¤¤¦¤È¡¢ ÍפϤ¿¤Ö¤ó¡¢
¤ß¤¿¤¤¤Ê´¶¤¸¤À¤È»×¤¦¡£¤¿¤Ö¤ó¡£
¤Ç¤Þ¤¡¥í¥Ã¥¯Ìµ¤·¤Ç MT-safe ¤Ê malloc ¤¬½ñ¤±¤ë¤«¤È¤¤¤¦¤È¡¢ ¤Þ¤¡ÃΤé¤ó¤±¤É¥¥Ä¤¤¤À¤í¤¦¡£ ¥¥Ä¤¤¤±¤É¤Ê¤ó¤«¤Þ¤¡¡¢¤¬¤ó¤Ð¤ì¤Ð¤Ç¤¤ë¤ó¤¸¤ã¤Ê¤¤¤«¤Ê¡¼ ¤È¤¤¤¦µ¤¤¬¤Ê¤ó¤È¤Ê¤¯¤¹¤ë¡£
¤¢¤¢¤¿¤À brk ¤¬¤½¤â¤½¤â¸Æ¤ó¤¸¤ã¤¤¤±¤Ê¤¤¤Î¤Ç¡¢ ¤½¤Î¤Ø¤ó¤Ï¥´¥Þ¤«¤¹¤È¤¤¤¦¤« ¥Ò¡¼¥×¥µ¥¤¥º¤Ï¸ÇÄê¤Ë¤»¤¶¤ë¤ò¤¨¤Ê¤¤¤È»×¤¦¤±¤É¡£
º£ÅÙ½ñ¤¤¤Æ¤ß¤è¤¦
(19:31)
http://www.nicovideo.jp/watch/sm7270634
Direct3D ¾è¤Ã¼è¤ê¤Ã¤Æ¤Î¤Ï¤¦¤Þ¤¤ÊýË¡¤À¤Ê¤¡
(20:02)
Á° | 2009ǯ 6·î |
¼¡ | ||||
Æü | ·î | ²Ð | ¿å | ÌÚ | ¶â | ÅÚ |
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Á´¤Æ¥ê¥ó¥¯¥Õ¥ê¡¼¤Ç¤¹¡£ ¥³¡¼¥ÉÊҤϼ«Í³¤Ë»ÈÍѤ·¤Æ¤¤¤¿¤À¤¤¤Æ¹½¤¤¤Þ¤»¤ó¡£ ¤½¤Î¾¤Î¤â¤Î¤ÏGPL°·¤¤¤Ç¤¢¤ì¤Ð¤¢¤é¤æ¤ë»ÈÍѤ˴ؤ·¤Æʸ¶ç¤Ï¸À¤¤¤Þ¤»¤ó¡£ ¤Ê¤Ë¤«¤¢¤ì¤Ð²¼µ¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ø¡£
> ¥Ò¡¼¥×¥µ¥¤¥º¤Ï¸ÇÄê¤Ë¤»¤¶¤ë¤ò¤¨¤Ê¤¤¤È»×¤¦¤±¤É¡£
brk(2)¤Ë¤Ä¤¤¤Æ¤Ï¡¢MAP_ANON¤Çmmap(2)¤È¤¤¤¦¼ê¤¬°ì±þ¤¢¤ê¤Þ¤¹¤è¤Í¡Ä
¤È»×¤Ã¤Æ³Îǧ¤¹¤ë¤È¡¢POSIX ¤Î async-signal-safe ´Ø¿ô¤Îɽ¤ËºÜ¤Ã¤Æ
¤Þ¤»¤ó¤Í¡£
Æþ¤ì˺¤ì? async-signal-safe¤Ç¤Ê¤¤¼ÂÁõ¤¬Â¸ºß¤¹¤ë? ¤Ê¤¼¤Ç¤·¤ç¤¦¡£
>Solaris ¤Î printf ¤¬
¤Ç¤Ï¤Ê¤¯¤Æsprintf/snprintf¤Ç¤¹¤Í¡£global¤Ë¿¨¤ëÍ×ÁǤ¬¤Ê¤¤¤Î¤Ç¤à¤·¤ísafe¤Ç¤Ê¤¤¤Û¤¦¤¬¤ª¤«¤·¤¤
> global¤Ë¿¨¤ëÍ×ÁǤ¬¤Ê¤¤¤Î¤Ç¤à¤·¤ísafe¤Ç¤Ê¤¤¤Û¤¦¤¬¤ª¤«¤·¤¤
¤½¤Î¹Í¤¨¤Ï´Å¤¤¤Ç¤¹¡£
¤¿¤È¤¨¤Ð snprintf ¤Î %f ·Á¼°¤Ï LC_NUMERIC locale¡¢
%ls ·Á¼°¤À¤È¡¢¥ï¥¤¥Éʸ»úÎ󤫤é¥Þ¥ë¥Á¥Ð¥¤¥Èʸ»úÎó¤Ø¤ÎÊÑ´¹¤Î¤¿¤á
LC_CTYPE locale ¤ò»²¾È¤·¤Þ¤¹¤¬¡¢¤³¤ì¤é locale ¾ðÊó¤Ï¥×¥í¥»¥¹¡¦
¥°¥í¡¼¥Ð¥ë¤Ê¾ðÊó¤Ç¤¹¡£
ÆÃ¤Ë LC_CTYPE ¤Ï codeset °Í¸¤Î wcrtomb() ´Ø¿ô¤ò»²¾È¤¹¤ë¤ï¤±¤Ç
¤¹¤¬¡¢¤â¤·²¾¤Ë¤³¤Î´Ø¿ô¼ÂÁõ¤òÃÙ±ä¥í¡¼¥É¤¹¤ë¼ÂÁõ¤¬¤¢¤Ã¤¿¤Ê¤é¤Ð¡¢
¤½¤Î¤¿¤á¤Ë¤µ¤é¤ËưŪ¥ê¥ó¥«¤Îµ¯Æ°¤À¤Ã¤ÆȯÀ¸¤¹¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤è¡£(¤¢¤ë¤«¤É¤¦¤«¤ÏÃΤê¤Þ¤»¤ó¤¬)
ŬÅö¤Ë¸¡º÷¤·¤Æ¤ß¤ë¤Ë mmap ¤Ï mach/darwin ¤Ç¥À¥á¤Ê¤ó¤¸¤ã¤Í¤È¤¤¤¦¤³¤È¤é¤·¤¤¤Ç¤¹¤Í¡£
http://www.hpl.hp.com/research/linux/atomic_ops/README_malloc.txt
printf ¤Ë¤Ä¤¤¤Æ¤Ï¡¢ locale ¤È¤«Á´Á³¹Í¤¨¤Æ¤Ê¤¯¤Æ¡¢¤½¤â¤½¤â¤É¤Ã¤«¤Ç malloc ¤¬É¬Íפˤʤë¤ó¤¸¤ã¤Ê¤¤¤«¤Ê¤¡¤ÈÇùÁ³¤È»×¤Ã¤Æ¤¿¤ó¤Ç¤¹¤¬¡¢¤½¤¦¤Ç¤â¤Ê¤¤¤â¤ó¤Ç¤·¤ç¤¦¤«¡£ %f ¤È¤«³°Éô¥Ð¥Ã¥Õ¥¡Ìµ¤·¤Ç¼ÂÁõ¤Ç¤¤ë¤â¤ó¤Ê¤ó¤Ç¤¹¤«¤Í¡£
locale¤Ïµ¤¤Å¤¤¤Æ¤¿¤±¤Éreadonly¤¸¤ã¤Í¡©¤È»×¤Ã¤¿(solaris¤Î¥Þ¥Ë¥å¥¢¥ë¤â¡Ölocale¤¤¤¸¤é¤Ê¤±¤ì¤Ð¡×¤ÈÃí¼á¤¬¤¢¤Ã¤¿¤È»×¤¦)
ÃÙ±ä¥í¡¼¥É¤Þ¤Ç¤Ï¤«¤ó¤¬¤¨¤Æ¤Ê¤«¤Ã¤¿
¤³¤Î´Ö¤â½ÓÂÀϺ¤Î»í¤ò¤ª http://www.stlouisbusinesslist.com/business/5021837.htm?info=viagra cheap viagra >:-(((