os-70-350

os-70-350 Commit Details


Date:2013-12-21 22:07:28 (11 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:41aa65c1141a8d514ebadfb9be61fbc34feeda55
Parents: 232afae0a7a41a77810024a97c137a22e182c0d7
Message:updating example

Changes:

File differences

petersons-windows/main.c
2222
2323
2424
25
2625
27
26
2827
2928
3029
......
4443
4544
4645
47
4846
49
47
5048
5149
5250
{
flag[0] = true;
turn = 1;
//while (counter == BUFFER_SIZE - 1); // make sure the buffer doesn't overflow
while (flag[1] && turn == 1);
if (counter == BUFFER_SIZE - 1)
if (counter == BUFFER_SIZE - 1) // make sure the buffer doesn't overflow
{
continue;
flag[0] = false;
{
flag[1] = true;
turn = 0;
//while (counter == -1); // make sure there is content to consume
while (flag[0] && turn == 0);
if (counter == -1) // producer hasn't produced
if (counter == -1) // producer hasn't produced - make sure there is content to consume
{
flag[1] = false;
continue;

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.35920s using 14 queries.