Question: Which line ( s ) if any might crash when calling these functions in a multi - threaded program? lock ( mutex ) void iter

Which line(s) if any might crash when calling these functions in a multi-threaded program? lock(mutex) void iter_next(iter_t* iter){
2. if (iter){
3. if (iter->curr){
4. lock(&mutex);
5. iter->curr = iter->curr->next;
6. unlock(&mutex);
7.}
8.}
9.}
10. void* iter_get(iter_t* iter){
11. if (iter){
12. if (iter->curr){
13. return iter->curr->obj;
14.}
15.}
16. return NULL;
17.

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!