Project

General

Profile

Actions

Bug #635

closed

Add mutex_is_locked() to model of rule#32

Added by Alexey Khoroshilov over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Rules and Models
Start date:
12/21/2010
Due date:
% Done:

0%

Estimated time:
Detected in build:
588b549
Platform:
Published in build:
4b63f97716aff56612b5252b9409b96c78846bfe

Description

Lack of the mutex_is_locked() in our model leads to false positives.

/**
 * mutex_is_locked - is the mutex locked
 * @lock: the mutex to be queried
 *
 * Returns 1 if the mutex is locked, 0 if unlocked.
 */
static inline int mutex_is_locked(struct mutex *lock)
{
        return atomic_read(&lock->count) != 1;
}

Files

mutexislocked.c (978 Bytes) mutexislocked.c Broken regression test file Evgeny Novikov, 01/29/2011 12:49 PM
Actions

Also available in: Atom PDF