Linux.com

Author Message
Joined: Apr 23, 2008
Posts: 16
Other Topics
Posted May 05, 2008 at 3:10:14 PM
Subject: pthread safe library functions?
In linux using pthreads When I call a whatever usual function like for instance: thread 1 a=div(b,c).rem thread 2 x=div(y,z).rem so I call the same function on different (not shared) data Can I be sure that the two function calls by the two threads do not share any (internal) data (may be registers or global-library-shared) and so have no side unpredicted effect?? The same question holds for usual functions like sin() exp() pow() rand() nanosleep() etc.
Back to top Profile Email Website
Shashank Sharma
Joined Jan 01, 1970
Posts: 1657
Location:New Delhi, India

Other Topics
Posted: May 08, 2008 1:30:54 PM
Subject: pthread safe library functions?
astella, I get all sorts of results when I search for this, so not sure how helpful, if at all, any of these links are. They discuss things like "thread safety" and "mutexes": http://www-128.ibm.com/developerworks/library/l-pthred.html http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html http://students.cs.byu.edu/~cs460ta/cs460/labs/pthreads.html Cheers!

Coauthor of Beginning Fedora: From Novice to Professional published by Apress.

Please follow the Forum Guidelines

Back to top Profile Email Website Yahoo!
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya