sparc-rtems, pthreads, help

sashti srinivasan svasn_rtems at yahoo.com
Tue Mar 2 08:15:42 UTC 2004


 Hello,
 
      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
 ids.
 
 Problem:
     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.
 
 Regards
 Srinivasan


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com



More information about the users mailing list