sparc-rtems, pthreads, help
svasn_rtems at yahoo.com
Tue Mar 2 08:15:42 UTC 2004
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 youre looking for faster
More information about the users