Question: What's wrong with the following code? Please list all problems you can find. Please fix all the problems you have identified. void task1(void) BUFFER *p_bufferA,

What's wrong with the following code? Please list all problems you can find. Please fix all the problems you have identified. void task1(void) BUFFER *p_bufferA, *p_bufferA1,; p_bufferA GetBuffer(): p_BufferA1- GetBuffer(): // put useful data into p_bufferA SendMsg(task2, p bufferA); // copy data from p_bufferA into p_bufferA1; FreeBuffer(p_bufferA1); Void task2(void) t BUFFER p_bufferB; p_bufferB getMsg(0: // use the data in p_bufferB What's wrong with the following code? Please list all problems you can find. Please fix all the problems you have identified. void task1(void) BUFFER *p_bufferA, *p_bufferA1,; p_bufferA GetBuffer(): p_BufferA1- GetBuffer(): // put useful data into p_bufferA SendMsg(task2, p bufferA); // copy data from p_bufferA into p_bufferA1; FreeBuffer(p_bufferA1); Void task2(void) t BUFFER p_bufferB; p_bufferB getMsg(0: // use the data in p_bufferB
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
