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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!