Thread: pthread safe library functions?

  1. #1
    Alessio Stella
    Join Date
    May 2008
    Location
    Italy, Bologna
    Posts
    251

    Question 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.
    Last edited by mynickmynick; 05-06-2008 at 02:01 AM. Reason: I add a note

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Library Functions
    By gr8npwrfl in forum C++ Programming
    Replies: 0
    Last Post: 07-28-2008, 11:16 AM
  2. Library functions eg. String manipulation function
    By bhupesh.kec in forum C Programming
    Replies: 6
    Last Post: 07-08-2008, 07:32 AM
  3. Gnu Scientific Library functions
    By zdream8 in forum C Programming
    Replies: 11
    Last Post: 06-09-2008, 09:37 AM
  4. Prime Number Generator... Help !?!!
    By Halo in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2003, 07:26 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM