linux-4.4.1/mutex
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#w2465e4a]
#backlinks
*説明 [#t1051952]
-パス: [[linux-4.4.1/include/linux/mutex.h]]
-FIXME: これは何?
--説明
**参考 [#y38b9d76]
*実装 [#zf202dc0]
/*
* Simple, straightforward mutexes with strict semantics:
*
* - only one task can hold the mutex at a time
* - only the owner can unlock the mutex
* - multiple unlocks are not permitted
* - recursive locking is not permitted
* - a mutex object must be initialized via the API
* - a mutex object must not be initialized via memset o...
* - task may not exit with mutex held
* - memory areas where held locks reside must not be fr...
* - held mutexes must not be reinitialized
* - mutexes may not be used in hardware or software int...
* contexts such as tasklets and timers
*
* These semantics are fully enforced when DEBUG_MUTEXES...
* enabled. Furthermore, besides enforcing the above rul...
* debugging code also implements a number of additional...
* that make lock debugging easier and faster:
*
* - uses symbolic names of mutexes, whenever they are p...
* - point-of-acquire tracking, symbolic lookup of funct...
* - list of all locks held in the system, printout of t...
* - owner tracking
* - detects self-recursing locks and prints out all rel...
* - detects multi-task circular deadlocks and prints ou...
* locks and tasks (and only those tasks)
*/
struct mutex {
/* 1: unlocked, 0: locked, negative: locked, pos...
atomic_t count;
-
--[[linux-4.4.1/atomic_t]]
spinlock_t wait_lock;
-
--[[linux-4.4.1/spinlock_t]]
struct list_head wait_list;
-
--[[linux-4.4.1/list_head]]
#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTE...
-
--[[linux-4.4.1/CONFIG_DEBUG_MUTEXES]]
--[[linux-4.4.1/CONFIG_MUTEX_SPIN_ON_OWNER]]
struct task_struct *owner;
-
--[[linux-4.4.1/task_struct]]
#endif
#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
struct optimistic_spin_queue osq; /* Spinner MCS...
-
--[[linux-4.4.1/optimistic_spin_queue]]
#endif
#ifdef CONFIG_DEBUG_MUTEXES
void *magic;
#endif
#ifdef CONFIG_DEBUG_LOCK_ALLOC
-
--[[linux-4.4.1/CONFIG_DEBUG_LOCK_ALLOC]]
struct lockdep_map dep_map;
-
--[[linux-4.4.1/lockdep_map]]
#endif
};
*コメント [#d51290ea]
終了行:
*参照元 [#w2465e4a]
#backlinks
*説明 [#t1051952]
-パス: [[linux-4.4.1/include/linux/mutex.h]]
-FIXME: これは何?
--説明
**参考 [#y38b9d76]
*実装 [#zf202dc0]
/*
* Simple, straightforward mutexes with strict semantics:
*
* - only one task can hold the mutex at a time
* - only the owner can unlock the mutex
* - multiple unlocks are not permitted
* - recursive locking is not permitted
* - a mutex object must be initialized via the API
* - a mutex object must not be initialized via memset o...
* - task may not exit with mutex held
* - memory areas where held locks reside must not be fr...
* - held mutexes must not be reinitialized
* - mutexes may not be used in hardware or software int...
* contexts such as tasklets and timers
*
* These semantics are fully enforced when DEBUG_MUTEXES...
* enabled. Furthermore, besides enforcing the above rul...
* debugging code also implements a number of additional...
* that make lock debugging easier and faster:
*
* - uses symbolic names of mutexes, whenever they are p...
* - point-of-acquire tracking, symbolic lookup of funct...
* - list of all locks held in the system, printout of t...
* - owner tracking
* - detects self-recursing locks and prints out all rel...
* - detects multi-task circular deadlocks and prints ou...
* locks and tasks (and only those tasks)
*/
struct mutex {
/* 1: unlocked, 0: locked, negative: locked, pos...
atomic_t count;
-
--[[linux-4.4.1/atomic_t]]
spinlock_t wait_lock;
-
--[[linux-4.4.1/spinlock_t]]
struct list_head wait_list;
-
--[[linux-4.4.1/list_head]]
#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTE...
-
--[[linux-4.4.1/CONFIG_DEBUG_MUTEXES]]
--[[linux-4.4.1/CONFIG_MUTEX_SPIN_ON_OWNER]]
struct task_struct *owner;
-
--[[linux-4.4.1/task_struct]]
#endif
#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
struct optimistic_spin_queue osq; /* Spinner MCS...
-
--[[linux-4.4.1/optimistic_spin_queue]]
#endif
#ifdef CONFIG_DEBUG_MUTEXES
void *magic;
#endif
#ifdef CONFIG_DEBUG_LOCK_ALLOC
-
--[[linux-4.4.1/CONFIG_DEBUG_LOCK_ALLOC]]
struct lockdep_map dep_map;
-
--[[linux-4.4.1/lockdep_map]]
#endif
};
*コメント [#d51290ea]
ページ名: