<commit_before>/*
 * RT-Mutexes: simple blocking mutual exclusion locks with PI support
 *
 * started by <NAME> and <NAME>.
 *
 *  Copyright (C) 2004-2006 Red Hat, Inc., <NAME> <<EMAIL>>
 *  Copyright (C) 2005-2006 Timesys Corp., <NAME> <<EMAIL>>
 *  Copyright (C) 2005 Kihon Technologies Inc., <NAME>
 *  Copyright (C) 2006 <NAME>
 */
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/timer.h>

#include "rtmutex_common.h"

#ifdef CONFIG_DEBUG_RT_MUTEXES
# include "rtmutex-debug.h"
#else
# include "rtmutex.h"
#endif

/*
 * lock->owner state tracking:
 *
 * lock->owner holds the task_struct pointer of the owner. Bit 0 and 1
 * are used to keep track of the "owner is pending" and "lock has
 * waiters" state.
 *
 * owner	bit1	bit0
 * NULL		0	0	lock is free (fast acquire possible)
 * NULL		0	1	invalid state
 * NULL		1	0	Transitional State*
 * NULL		1	1	invalid state
 * taskpointer	0	0	lock is held (fast release possible)
 * taskpointer	0	1	task is pending owner
 * taskpointer	1	0	lock is held and has waiters
 * taskpointer	1	1	task is pending owner and lock has more waiters
 *<commit_msg>[PATCH] reference rt-mutex-design in rtmutex.c<commit_after>/*
 * RT-Mutexes: simple blocking mutual exclusion locks with PI support
 *
 * started by <NAME> and <NAME>.
 *
 *  Copyright (C) 2004-2006 Red Hat, Inc., <NAME> <<EMAIL>>
 *  Copyright (C) 2005-2006 Timesys Corp., <NAME> <<EMAIL>>
 *  Copyright (C) 2005 Kihon Technologies Inc., <NAME>
 *  Copyright (C) 2006 <NAME>
 *
 *  See Documentation/rt-mutex-design.txt for details.
 */
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/timer.h>

#include "rtmutex_common.h"

#ifdef CONFIG_DEBUG_RT_MUTEXES
# include "rtmutex-debug.h"
#else
# include "rtmutex.h"
#endif

/*
 * lock->owner state tracking:
 *
 * lock->owner holds the task_struct pointer of the owner. Bit 0 and 1
 * are used to keep track of the "owner is pending" and "lock has
 * waiters" state.
 *
 * owner	bit1	bit0
 * NULL		0	0	lock is free (fast acquire possible)
 * NULL		0	1	invalid state
 * NULL		1	0	Transitional State*
 * NULL		1	1	invalid state
 * taskpointer	0	0	lock is held (fast release possible)
 * taskpointer	0	1	task is pending owner
 * taskpointer	1	0	lock is held and has waiters
 * taskpointer	1	1	task is pending owner and lock has more waiters
 *
{'fraction_non_alphanumeric': 0.11022297013041649, 'fraction_numerical': 0.0370214556163231, 'mean_word_length': 3.699604743083004, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7172894', 'n_tokens_mistral': 872, 'n_tokens_neox': 818, 'n_words': 314}