Skip to main content

is_pthread_lock

Function is_pthread_lock 

Source
pub fn is_pthread_lock(stmt: &HirStatement) -> Option<String>
Expand description

Detects if a function call is a pthread mutex lock operation.

Recognizes patterns:

  • pthread_mutex_lock(&mutex)
  • pthread_mutex_lock(&ptr->mutex)

Returns the name of the mutex variable if detected, None otherwise.