Re: [beagleboard] Optimization of pthread_mutex_lock in the application code

2020-09-03 Thread Micka
Why would you optimize the mutex ? sleep(1/2); ==> doesn't work , because 1/2 is cast to 0. On Thu, Sep 3, 2020 at 9:25 AM Niresh wrote: > Hi, > > I am using beagle Bone Black with debian image. Could any please suggest > how to optimize the application code using pthread_mutex_lock. Let me >

[beagleboard] Optimization of pthread_mutex_lock in the application code

2020-09-03 Thread Niresh
Hi, I am using beagle Bone Black with debian image. Could any please suggest how to optimize the application code using pthread_mutex_lock. Let me describe the solution I am looking at. For example, I have two thread sharing a global shared memory variable as below thr_id1 = pthread_create (