| 
                  Thread Safety
                   in Pthreads  | 
            
| 
                   
                      
                     Prof. David Bernstein
                       | 
            
| Computer Science Department | 
| bernstdh@jmu.edu | 
               
            
         
            
         
         
            
         
         
            
         
         
            
         malloc() in C)
              static
              variable (e.g., a random number generator)static Local Variable:
      asctime() returns a pointer to
              a statically allocated date-time string
         
            
         pthread_mutex_lock(), and 
              the last statement is a call to 
              pthread_mutex_unlock()