[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sparc-rtems, pthreads, help
- Date: Tue, 2 Mar 2004 00:15:42 -0800 (PST)
- From: svasn_rtems at yahoo.com (sashti srinivasan)
- Subject: sparc-rtems, pthreads, help
As you have suggested me, I have started using
sparc-rtems instead of posix bsp and simulate using
tsim simulator. I want to measure the context
switching time using posix threads and mutexes. I
create two posix threads( I tried with both default
attributes and SCHED_RR) for this purpose. These
threads simply unlock a mutex and locks another
mutex(forcing context switch). The parent thread
which created these threads waits for both of them by
calling pthread_join two times with these thread
I see that One of the threads begin execution and
continues to execute till it it calls
pthread_mutex_lock. The intention is, the other
thread will start execution and unlock that mutex the
first thread is waiting for. But this does not
happen. BUT SAME CODE WORKS ON LINUX AS INTENDED.
Please guide me.
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster