Question: Problem 1: Write a function named sync_Func_Calls. This function receives a function pointer as its parameter. The sync_Func_Calls function runs every function that is passed

Problem 1: Write a function named sync_Func_Calls. This function receives a function pointer as its parameter. The sync_Func_Calls function runs every function that is passed to it atomically regardless of that the call has been made from a process or a thread and they are cooperating or not. The sync_Func_Calls will synchronize every function call. It means if different processes/threads call the same function simultaneously, its the responsibility of sync_Func_Calls to execute the call of each process/thread error-free (shared resource problem).

The prototype of the function is given below:

void* sync_Func_Calls(void*(*func_Name(void*)),void* arg)

  • Where arg is the argument to the function func_Name() passed as a void pointer in sync_Func_Calls.

  • The function sync_Func_Calls returns what the function (func_Name) returned value.

  • You can build a library of different functions (func_Name) as you wish.

  • Problem 1: Write a function named sync_Func_Calls. This function receives a function

subject: Operating System

language: c

Making your Library MT-safe Problem 1: Write a function named sync Func Calls. This function receives a function pointer as its parameter. The sync Func Calls function runs every function that is passed to it atomically regardless of that the call has been made from a process or a thread and they are cooperating or not. The sync Func Calls will synchronize every function call. It means if different processes/threads call the same function simultaneously, it's the responsibility of sync Func. Calls to execute the call of each process/thread error-free (shared resource problem). The prototype of the function is given below: void* syns.Funs. Calls(void*(*func.Name(void*)),void* arg) Where arg is the argument to the function func Name() passed as a void pointer in sync. Fung Calls. The function syng Func Calls returns what the function (func. Name) returned value. You can build a library of different functions (func. Name) as you wish. Making your Library MT-safe Problem 1: Write a function named sync Func Calls. This function receives a function pointer as its parameter. The sync Func Calls function runs every function that is passed to it atomically regardless of that the call has been made from a process or a thread and they are cooperating or not. The sync Func Calls will synchronize every function call. It means if different processes/threads call the same function simultaneously, it's the responsibility of sync Func. Calls to execute the call of each process/thread error-free (shared resource problem). The prototype of the function is given below: void* syns.Funs. Calls(void*(*func.Name(void*)),void* arg) Where arg is the argument to the function func Name() passed as a void pointer in sync. Fung Calls. The function syng Func Calls returns what the function (func. Name) returned value. You can build a library of different functions (func. Name) as you wish

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!