Question

1,What is the following code an example of: volatile int i = 0; static void *f1(void...

1,What is the following code an example of:

volatile int i = 0;

static void *f1(void *p) {

while (i==0) {

/* do nothing - just keep checking over and over */

}

printf("i's value has changed to %d.\n", i);

return NULL; }

/* i is global, so it is visible to all functions. It's also marked volatile, because it may change in a way which is not predictable by the compiler, here from a different thread.*/

Question 14 options:

interpreted language

busy waiting

attribute grammar

concurrency

0 0
Add a comment Improve this question Transcribed image text
Answer #1

busy waiting

Add a comment
Know the answer?
Add Answer to:
1,What is the following code an example of: volatile int i = 0; static void *f1(void...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an...

    Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT