Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Langauge: c subject: operating system do not copy previous answer on chegg only answer if you have studied operating system subject Making your Library MT-safe

image text in transcribed

Langauge: c

subject: operating system

do not copy previous answer on chegg

only answer if you have studied operating system subject

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* 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. Fung Callsreturns 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions