ãã«ãã¹ã¬ããããã°ã©ãã³ã°ã§ã¹ã¬ããéã§å
±æãã¼ã¿ã«ã¢ã¯ã»ã¹ããã¨ãã«ãmutex(MUTual EXclusion, ãã¥ã¼ããã¯ã¹)ãç¨ãã¦ãæä»ããã¯ãè¡ããã¨ãããã¾ããããã°ã©ã ã«ç«¶åç¶æ
ãå¼ãèµ·ãããããªã³ã¼ããããã¨ãè¨ç®ã®æ´åæ§ããã¼ã¿ã®æ´åæ§ã失ããã¾ãã競åç¶æ
ãé¿ããç®çã§ãã¯ãªãã£ã«ã«ãªã¼ã¸ã§ã³ãããã¯ã§ä¿è·ãã¾ããpthread ã§ã¯ãpthread_mutex_tã¨pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock ãç¨ãã¦ãããã¯ãã³ã³ããã¼ã«ãã¾ãã èªã¿æ¹ mutex ã¿ã
ã¼ã¦ã£ãã 競åç¶æ
ãããããããããã MUTual EXclusion ã¿ã
ã¼ã¡ãã ãããããã¼ããã ã¯ãªãã£ã«ã«ã»ã¯ã·ã§ã³ ããã¦ãããããããã critial section ããã¦ãããããã
{{#tags}}- {{label}}
{{/tags}}