back to "index"

        THREAD




detached

PRTY=1
EVENTS FUNCTIONS CONSEQUENCES                                              
EVT_THREAD_DETACH pthread_create The new thread will be detachable or joinable.                                                          

state




PRTY=1
ATTRIBUTES EVENTS
FUNCTIONS CONSEQUENCES
running
EVT_THREAD_STATE_DEAD
EVT_THREAD_STATE_WAIT
clone
start_thread
pthread_barrier_wait
pthread_cond_wait

pthread_join
The running thread becomes unknow or zombi  
The running thread becomes blocked.
blocked  EVT_THREAD_STATE_WAKE pthread_barrier_wait
pthread_cond_broadcast
pthread_cond_signal
pthread_join
pthread_cond_wait
The blocked thread becomes running.                    
zombie



init

PRTY=1
EVENTS FUNCTIONS CONSEQUENCES
EVT_THREAD_INIT clone The unknow thread becomes running.                                                            


 























back to "index"
  

MUTEX





state


PRTY=1
ATTRIBUTES
EVENTS FUNCTIONS CONSEQUENCES
free
EVT_MUTEX_STATE_FREE
pthread_mutex_unlock
pthread_cond_wait
The mutex becomes free, any thread can get it.
There is no owner for the mutex except if the mutex is recursive and count !=0.   
taken
EVT_MUTEX_STATE_REQUIER

EVT_MUTEX_STATE_TAKEN
pthread_mutex_lock
pthread_cond_wait
The running thread requieres for the mutex, if it doesn't get the mutex, it becomes blocked.
So when the mutex becomes free the thread gets it, then  the thread becomes running.
According to the type of mutex the owner of the mutex can change or not and count can be incremented or not.
       

count


PRTY=2
EVENTS FUNCTIONS CONSEQUENCES
EVT_MUTEX_COUNT_DEC pthread_mutex_unlock  An unlock happened.                                                                                                                 
EVT_MUTEX_COUNT_INC pthread_mutex_lock A lock happened.                                                                                                  

owner


PRTY=2

EVENTS FUNCTIONS CONSEQUENCES                                                                                                            
EVT_MUTEX_OWNER_CHANGE pthread_mutex_unlock
pthread_mutex_lock
The owner of the mutex changes.
 If the mutex is a recursive one, and if it is the same thread which requieres it , the owner will not change.                                                                  

init


PRTY=1
EVENTS FUNCTIONS CONSEQUENCES 
EVT_MUTEX_INIT pthread_mutex_init The fields of the mutex are initialized (kind, owner, count).                                                                          

destroy


PRTY=1
EVENTS FUNCTIONS CONSEQUENCES 
EVT_MUTEX_DESTROY pthread_mutex_destroy The mutex is destroyed                                                                                








 




BARRIER


back to "index"






lock 




PRTY=1
ATTRIBUTES EVENTS FUNCTIONS CONSEQUENCES
free EVT_BARRIER_LOCK_FREE pthread_barrier_destroy
pthread_barrier_wait
The lock become free,  any thread can get it.
taken EVT_BARRIER_LOCK_REQUIER
EVT_BARRIER_LOCK_TAKEN
pthread_barrier_destroy
pthread_barrier_wait
The running thread requieres for the lock, if it doesn't get the lock, it becomes blocked.
So when the lock becomes free the thread gets it, then  the thread becomes running.                                                                                        

left



PRTY=2
EVENTS FUNCTIONS CONSEQUENCES
EVT_BARRIER_LEFT_DEC pthread_barrier_wait One thread come in the barrier.                                                                                              
EVT_BARRIER_LEFT_INC pthread_barrier_wait One trhead wakes up.                                                                                                                      

init


PRTY=1
EVENTS FUNCTIONS CONSEQUENCES
EVT_BARRIER_INIT pthread_barrier_init   The fields of the mutex are initialized (lock, left).                                                                                     

destroy


PRTY=1
EVENTS FUNCTIONS CONSEQUENCES
EVT_BARRIER_DESTROY pthread_barrier_destroy The barrier is destroyed                                                                            


           
             












 COND-VAR

back to "index"

lock



 PRTY=1
ATTRIBUTES EVENTS FUNCTION CONSEQUENCES
free EVT_COND_LOCK_FREE pthread_cond_broadcast
pthread_cond_signal
pthread_cond_wait
The lock become free,  any thread can get it
taken EVT_COND_LOCK_REQUIER
EVT_COND_LOCK_TAKEN
pthread_cond_broadcast
pthread_cond_signal
The running thread requieres for the lock, if it doesn't get the lock, it becomes blocked
So when the lock becomes free the thread gets it, then  the thread becomes running                                                                       

total_seq



PRTY=2
EVENTS FUNCTIONS CONSEQUENCES
EVT_COND_TOTAL_SEQ_INC pthread_cond_wait the cond is used by one more thread                                                                                 

broadcast_seq



PRTY=2
EVENTS FUNCTIONS CONSEQUENCES
EVT_COND_BROAD_SEQ_INC pthread_cond_broadcast a broadcast happened                                                                                               

mutex



PRTY=1
ATTRIBUTES EVENTS FUNCTIONS CONSEQUENCES
free EVT_COND_MUTEX_FREE

pthread_cond_init
pthread_cond_wait
The mutex becomes free, any thread can get it                                    There is no owner for the mutex                                      
taken EVT_COND_MUTEX_REQUIER
EVT_COND_MUTEX_TAKEN
pthread_cond_init
pthread_cond_wait
The running thread requieres for the mutex, if it doesn't get the mutex, it becomes blocked
So when the mutex becomes free the thread gets it, then  the thread becomes running
The owner of the mutex doesn't change

init


PRTY=1
EVENTS FUNCTIONS CONSEQUENCES
EVT_COND_INIT pthread_cond_init The fields of the cond are initialized (lock, total_seq, broadcast_seq,mutex).                                                         

destroy


PRTY=1
EVENTS FUNCTIONS CONSEQUENCES
EVT_COND_DESTROY pthread_cond_destroy The cond is destroyed                                                                         




 


back to "index"


  These tables summarize the different objects  we  follow thanks to the trace tool .

For each objects we have chosen some interesting properties to trace, and each one of these properties has  attributes which states change according to their use.
These changes are thus gathered in events which will constitute our trace points in the nptl functions.

    It is important to detail these events for each object because they have consequences on the other objects.

In particular about threads: each time a running thread has the lock of an object or a mutex, the competiting threads which requiers this lock or this mutex pass in a  blocked state ,thus suspending the execution their of "start-routine".