Question: need a parallel program in C using pthreads and mutex (without omp) In this homework you will implement a thread safe Stack (UFO) with the

need a parallel program in C using pthreads and mutex (without omp)
In this homework you will implement a thread safe Stack (UFO) with the following characteristics: Use a data structure of your choice to represent a stack of integers. (Linked list or dynamically allocated array). This document will consider you are using a linked list. . One can push or pop an integer from the stack Thus you would need two functions to accomplish these: o void Push(int value) This function adds an integer to the Stack (linked list or array) o int Popo: This function removes the last element from the Stack and returns it through the function o The push and pop can happen simultaneously . Another function that you need to implement ts int GetStackCount). This function returns the, number of elements currently in the stack. See more below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
