Question
Embedded System Programming You have 2 functions. bool ReleaseExamSemaphore(void) { bool out; out = AcquireExamSemaphore(false); return out; } bool AcquireExamSemaphore(bool ResOrRel) { bool check =
Embedded System Programming
You have 2 functions.
bool ReleaseExamSemaphore(void) { bool out; out = AcquireExamSemaphore(false); return out; } bool AcquireExamSemaphore(bool ResOrRel) { bool check = true; storage_class bool s=0; switch (ResOrRel){ case 0: s = 0; break; case 1: while (check){ while (s); // wait for zero Xil_ExceptionDisable(); if (s == false) // no one has changed during execution of last 2 lines ? { s = true; check = false; // no weve got it }; Xil_ExceptionEnable(); } break; } return s; }
Whic are correct answer, select one or more.
a. storage_class should include class: volatile
b. storage_class should include class: extern
c. storage_class should include class: auto
d. storage_class should include class: register
e. storage_class should include class: static
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started