标签:val span code ops mod int style sem color
sem bowl; sem chopsticks[n]; for(int i=0;i<n;i++) chopsticks[i].value=1; bowl.value=min(n-1,m)//bowl.value<=n-1,确保不死锁 while(True) { p(bowl); p(chopsticks[i]); p(chopsticks[(i+1]MOD n); 就餐; v(chopsticks[i]); v(chopsticks[(i+1]MOD n); v(bowl); }
标签:val span code ops mod int style sem color
原文地址:https://www.cnblogs.com/yangmenda/p/11708061.html