Home
last modified time | relevance | path

Searched full:mutex (Results 1 – 25 of 2746) sorted by relevance

12345678910>>...110

/linux/drivers/net/ethernet/netronome/nfp/nfpcore/
H A Dnfp_mutex.c69 * nfp_cpp_mutex_init() - Initialize a mutex location
73 * @key: Unique 32-bit value for this mutex
78 * This creates the initial mutex state, as locked by this
109 * nfp_cpp_mutex_alloc() - Create a mutex handle
128 struct nfp_cpp_mutex *mutex; in nfp_cpp_mutex_alloc() local
143 mutex = kzalloc_obj(*mutex); in nfp_cpp_mutex_alloc()
144 if (!mutex) in nfp_cpp_mutex_alloc()
147 mutex->cpp = cpp; in nfp_cpp_mutex_alloc()
148 mutex->target = target; in nfp_cpp_mutex_alloc()
149 mutex->address = address; in nfp_cpp_mutex_alloc()
[all …]
H A Dnfp_resource.c29 * @mutex: NFP CPP Lock
30 * @mutex.owner: NFP CPP Lock, interface owner
31 * @mutex.key: NFP CPP Lock, posix_crc32(name, 8)
45 } mutex; member
66 struct nfp_cpp_mutex *mutex; member
92 if (entry.mutex.key != key) in nfp_cpp_resource_find()
96 res->mutex = in nfp_cpp_resource_find()
99 if (!res->mutex) in nfp_cpp_resource_find()
127 err = nfp_cpp_mutex_trylock(res->mutex); in nfp_resource_try_acquire()
136 nfp_cpp_mutex_free(res->mutex); in nfp_resource_try_acquire()
[all …]
/linux/Documentation/locking/
H A Dmutex-design.rst2 Generic Mutex Subsystem
26 Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h
27 and implemented in kernel/locking/mutex.c. These locks use an atomic variable
37 When acquiring a mutex, there are three possible paths that can be
49 soon. The mutex spinners are queued up using MCS lock so that only
50 one spinner can compete for the mutex.
61 waiting to spin on mutex owner, only to go directly to slowpath upon
78 The mutex subsystem checks and enforces the following rules:
80 - Only one task can hold the mutex at a time.
81 - Only the owner can unlock the mutex.
[all …]
H A Drt-mutex-design.rst2 RT-mutex implementation design
12 Documentation/locking/rt-mutex.rst. Although this document does explain problems
27 to use a resource that a lower priority process has (a mutex for example),
85 mutex
88 the PI locks will be called a mutex.
103 a process being blocked on the mutex, it is fine to allocate
105 structure holds a pointer to the task, as well as the mutex that
107 place the task in the waiters rbtree of a mutex as well as the
108 pi_waiters rbtree of a mutex owner task (described below).
111 on a mutex. This is the same as waiter->task.
[all …]
H A Dfutex-requeue-pi.rst8 boosting logic [see rt-mutex-design.rst] For the purposes of
21 rest to the natural wakeup inherent in unlocking the mutex
26 /* caller must lock mutex */
27 pthread_cond_wait(cond, mutex)
30 unlock(mutex);
37 lock(mutex);
44 futex_requeue(cond->data.__futex, cond->mutex);
47 Once pthread_cond_broadcast() requeues the tasks, the cond->mutex
49 mutex only after it has returned to user space. This will leave the
60 /* caller must lock mutex */
[all …]
/linux/drivers/acpi/acpica/
H A Dutxfmutex.c4 * Module Name: utxfmutex - external AML mutex access functions
25 * PARAMETERS: handle - Mutex or prefix handle (optional)
26 * pathname - Mutex pathname (optional)
27 * ret_obj - Where the mutex object is returned
31 * DESCRIPTION: Get an AML mutex object. The mutex node is pointed to by
52 /* Get a the namespace node for the mutex */ in acpi_ut_get_mutex_object()
64 /* Ensure that we actually have a Mutex object */ in acpi_ut_get_mutex_object()
70 /* Get the low-level mutex object */ in acpi_ut_get_mutex_object()
85 * PARAMETERS: handle - Mutex or prefix handle (optional)
86 * pathname - Mutex pathname (optional)
[all …]
H A Dutmutex.c4 * Module Name: utmutex - local mutex support
27 * DESCRIPTION: Create the system mutex objects. This includes mutexes,
39 /* Create each of the predefined mutex objects */ in acpi_ut_mutex_initialize()
65 /* Mutex for _OSI support */ in acpi_ut_mutex_initialize()
90 * DESCRIPTION: Delete all of the system mutex objects. This includes mutexes,
101 /* Delete each predefined mutex object */ in acpi_ut_mutex_terminate()
125 * PARAMETERS: mutex_ID - ID of the mutex to be created
129 * DESCRIPTION: Create a mutex object.
139 if (!acpi_gbl_mutex_info[mutex_id].mutex) { in acpi_ut_create_mutex()
141 acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex); in acpi_ut_create_mutex()
[all …]
/linux/Documentation/translations/zh_CN/locking/
H A Dmutex-design.rst4 :Original: Documentation/locking/mutex-design.rst
25 在Linux内核中,互斥锁(mutex)指的是一个特殊的加锁原语,它在共享内存系统上
36 互斥锁由“struct mutex”表示,在include/linux/mutex.h中定义,并在
37 kernel/locking/mutex.c中实现。这些锁使用一个原子变量(->owner)来跟踪
107 mutex_init(mutex);
111 void mutex_lock(struct mutex *lock);
112 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
113 int mutex_trylock(struct mutex *lock);
117 int mutex_lock_interruptible_nested(struct mutex *lock,
119 int mutex_lock_interruptible(struct mutex *lock);
[all …]
/linux/include/linux/soc/mediatek/
H A Dmtk-mutex.h71 int mtk_mutex_prepare(struct mtk_mutex *mutex);
72 void mtk_mutex_add_comp(struct mtk_mutex *mutex,
74 void mtk_mutex_enable(struct mtk_mutex *mutex);
75 int mtk_mutex_enable_by_cmdq(struct mtk_mutex *mutex,
77 void mtk_mutex_disable(struct mtk_mutex *mutex);
78 void mtk_mutex_remove_comp(struct mtk_mutex *mutex,
80 void mtk_mutex_unprepare(struct mtk_mutex *mutex);
81 void mtk_mutex_put(struct mtk_mutex *mutex);
82 void mtk_mutex_acquire(struct mtk_mutex *mutex);
83 void mtk_mutex_release(struct mtk_mutex *mutex);
[all …]
/linux/drivers/net/wireless/realtek/rtw88/
H A Dmac80211.c58 mutex_lock(&rtwdev->mutex); in rtw_ops_start()
60 mutex_unlock(&rtwdev->mutex); in rtw_ops_start()
69 mutex_lock(&rtwdev->mutex); in rtw_ops_stop()
71 mutex_unlock(&rtwdev->mutex); in rtw_ops_stop()
82 mutex_lock(&rtwdev->mutex); in rtw_ops_config()
104 mutex_unlock(&rtwdev->mutex); in rtw_ops_config()
168 mutex_lock(&rtwdev->mutex); in rtw_ops_add_interface()
172 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
178 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
207 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
[all …]
/linux/Documentation/devicetree/bindings/hwlock/
H A Dqcom-hwspinlock.yaml7 title: Qualcomm Hardware Mutex Block
20 - qcom,sfpb-mutex
21 - qcom,tcsr-mutex
24 - qcom,apq8084-tcsr-mutex
25 - qcom,ipq6018-tcsr-mutex
26 - qcom,msm8226-tcsr-mutex
27 - qcom,msm8994-tcsr-mutex
28 - const: qcom,tcsr-mutex
31 - qcom,msm8974-tcsr-mutex
32 - const: qcom,tcsr-mutex
[all …]
/linux/drivers/vhost/
H A Dtest.c13 #include <linux/mutex.h>
57 mutex_lock(&vq->mutex); in handle_vq()
60 mutex_unlock(&vq->mutex); in handle_vq()
99 mutex_unlock(&vq->mutex); in handle_vq()
141 mutex_lock(&vq->mutex); in vhost_test_stop_vq()
144 mutex_unlock(&vq->mutex); in vhost_test_stop_vq()
181 mutex_lock(&n->dev.mutex); in vhost_test_run()
196 mutex_lock(&vq->mutex); in vhost_test_run()
205 mutex_unlock(&vq->mutex); in vhost_test_run()
215 mutex_unlock(&n->dev.mutex); in vhost_test_run()
[all …]
/linux/tools/perf/util/
H A Dmutex.h24 /* Documents if a shared field or global variable needs to be protected by a mutex. */
29 * a mutex when dereferencing the pointer.
61 /* Documents a function that expects a mutex to be held prior to entry. */
88 * A wrapper around the mutex implementation that allows perf to error check
91 struct LOCKABLE mutex { struct
101 void mutex_init(struct mutex *mtx);
106 void mutex_init_pshared(struct mutex *mtx);
107 /* Initializes a mutex that may be recursively held on the same thread. */
108 void mutex_init_recursive(struct mutex *mtx);
109 void mutex_destroy(struct mutex *mtx);
[all …]
H A Dmutex.c2 #include "mutex.h"
20 static void __mutex_init(struct mutex *mtx, bool pshared, bool recursive) in __mutex_init()
38 void mutex_init(struct mutex *mtx) in mutex_init()
43 void mutex_init_pshared(struct mutex *mtx) in mutex_init_pshared()
48 void mutex_init_recursive(struct mutex *mtx) in mutex_init_recursive()
53 void mutex_destroy(struct mutex *mtx) in mutex_destroy()
58 void mutex_lock(struct mutex *mtx) in mutex_lock()
64 void mutex_unlock(struct mutex *mtx) in mutex_unlock()
70 bool mutex_trylock(struct mutex *mtx) in mutex_trylock()
112 void cond_wait(struct cond *cnd, struct mutex *mtx) in cond_wait()
/linux/drivers/cpufreq/
H A Dcpufreq_userspace.c15 #include <linux/mutex.h>
21 struct mutex mutex; member
38 mutex_lock(&userspace->mutex); in cpufreq_set()
46 mutex_unlock(&userspace->mutex); in cpufreq_set()
65 mutex_init(&userspace->mutex); in cpufreq_userspace_policy_init()
88 mutex_lock(&userspace->mutex); in cpufreq_userspace_policy_start()
91 mutex_unlock(&userspace->mutex); in cpufreq_userspace_policy_start()
101 mutex_lock(&userspace->mutex); in cpufreq_userspace_policy_stop()
104 mutex_unlock(&userspace->mutex); in cpufreq_userspace_policy_stop()
111 mutex_lock(&userspace->mutex); in cpufreq_userspace_policy_limits()
[all …]
/linux/drivers/media/cec/i2c/
H A Dch7322.c21 #include <linux/mutex.h>
154 struct mutex mutex; /* device access mutex */ member
172 WARN_ON(!mutex_is_locked(&ch7322->mutex)); in ch7322_send_message()
214 WARN_ON(!mutex_is_locked(&ch7322->mutex)); in ch7322_receive_message()
243 mutex_lock(&ch7322->mutex); in ch7322_tx_done()
246 mutex_unlock(&ch7322->mutex); in ch7322_tx_done()
275 mutex_lock(&ch7322->mutex); in ch7322_rx_done()
277 mutex_unlock(&ch7322->mutex); in ch7322_rx_done()
295 mutex_lock(&ch7322->mutex); in ch7322_phys_addr()
298 mutex_unlock(&ch7322->mutex); in ch7322_phys_addr()
[all …]
/linux/net/ceph/
H A Dauth.c66 mutex_init(&ac->mutex); in ceph_auth_init()
94 mutex_lock(&ac->mutex); in ceph_auth_reset()
99 mutex_unlock(&ac->mutex); in ceph_auth_reset()
128 mutex_lock(&ac->mutex); in ceph_auth_build_hello()
156 mutex_unlock(&ac->mutex); in ceph_auth_build_hello()
213 mutex_lock(&ac->mutex); in ceph_handle_auth_reply()
277 mutex_unlock(&ac->mutex); in ceph_handle_auth_reply()
291 mutex_lock(&ac->mutex); in ceph_build_auth()
294 mutex_unlock(&ac->mutex); in ceph_build_auth()
302 mutex_lock(&ac->mutex); in ceph_auth_is_authenticated()
[all …]
/linux/sound/aoa/codecs/
H A Donyx.c59 /* mutex serializes concurrent access to the device
62 struct mutex mutex;
126 guard(mutex)(&onyx->mutex); in onyx_snd_vol_get()
149 guard(mutex)(&onyx->mutex); in onyx_snd_vol_put()
198 guard(mutex)(&onyx->mutex); in onyx_snd_inputgain_get()
216 guard(mutex)( in onyx_snd_inputgain_put()
61 struct mutex mutex; global() member
[all...]
/linux/drivers/gpio/
H A Dgpio-shared-proxy.c14 #include <linux/mutex.h>
34 lockdep_assert_held(&shared_desc->mutex); in gpio_shared_proxy_set_unlocked()
93 guard(mutex)(&shared_desc->mutex); in gpio_shared_proxy_request()
109 guard(mutex)(&shared_desc->mutex); in gpio_shared_proxy_free()
132 guard(mutex)(&shared_desc->mutex); in gpio_shared_proxy_set_config()
160 guard(mutex)(&shared_desc->mutex); in gpio_shared_proxy_direction_input()
190 guard(mutex)(&shared_desc->mutex); in gpio_shared_proxy_direction_output()
234 guard(mutex)(&proxy->shared_desc->mutex); in gpio_shared_proxy_set_cansleep()
280 * Under the descriptor mutex the proxy may call in gpio_shared_proxy_probe()
282 * paths that take a mutex (e.g. gpiod_set_config() -> in gpio_shared_proxy_probe()
[all …]
/linux/drivers/iio/accel/
H A Dmma9551.c44 struct mutex mutex; member
114 mutex_lock(&data->mutex); in mma9551_read_raw()
116 mutex_unlock(&data->mutex); in mma9551_read_raw()
124 mutex_lock(&data->mutex); in mma9551_read_raw()
127 mutex_unlock(&data->mutex); in mma9551_read_raw()
232 mutex_lock(&data->mutex); in mma9551_write_event_config()
235 mutex_unlock(&data->mutex); in mma9551_write_event_config()
256 mutex_lock(&data->mutex); in mma9551_write_event_value()
262 mutex_unlock(&data->mutex); in mma9551_write_event_value()
282 mutex_lock(&data->mutex); in mma9551_read_event_value()
[all …]
/linux/drivers/mtd/lpddr/
H A Dlpddr_cmds.c87 mutex_init(&chip->mutex); in lpddr_cmdset()
151 mutex_unlock(&chip->mutex); in wait_for_ready()
166 mutex_lock(&chip->mutex); in wait_for_ready()
173 mutex_unlock(&chip->mutex); in wait_for_ready()
176 mutex_lock(&chip->mutex); in wait_for_ready()
237 ret = mutex_trylock(&contender->mutex); in get_chip()
241 mutex_unlock(&chip->mutex); in get_chip()
243 mutex_lock(&chip->mutex); in get_chip()
246 mutex_unlock(&contender->mutex); in get_chip()
250 mutex_unlock(&contender->mutex); in get_chip()
[all …]
/linux/tools/testing/selftests/drivers/ntsync/
H A Dntsync.c49 static int read_mutex_state(int mutex, __u32 *count, __u32 *owner) in read_mutex_state()
55 ret = ioctl(mutex, NTSYNC_IOC_MUTEX_READ, &args); argument
61 #define check_mutex_state(mutex, count, owner) \
64 int ret = read_mutex_state((mutex), &__count, &__owner); \ in unlock_mutex() argument
70 static int unlock_mutex(int mutex, __u32 owner, __u32 *count) in unlock_mutex()
77 ret = ioctl(mutex, NTSYNC_IOC_MUTEX_UNLOCK, &args); in read_event_state()
236 int fd, ret, mutex; in TEST()
245 mutex = ioctl(fd, NTSYNC_IOC_CREATE_MUTEX, &mutex_args); in TEST()
246 EXPECT_EQ(-1, mutex); in TEST()
251 mutex in TEST()
43 read_mutex_state(int mutex,__u32 * count,__u32 * owner) read_mutex_state() argument
230 int fd, ret, mutex; TEST() local
[all...]
/linux/drivers/gpu/drm/vkms/
H A Dvkms_configfs.c4 #include <linux/mutex.h>
36 struct mutex lock;
144 scoped_guard(mutex, &crtc->dev->lock) in crtc_writeback_show()
161 scoped_guard(mutex, &crtc->dev->lock) { in crtc_writeback_store()
181 struct mutex *lock; in crtc_release()
186 scoped_guard(mutex, lock) { in crtc_release()
211 scoped_guard(mutex, &dev->lock) { in make_crtc_group()
256 scoped_guard(mutex, &plane->dev->lock) { in plane_possible_crtcs_allow_link()
275 scoped_guard(mutex, &plane->dev->lock) in plane_possible_crtcs_drop_link()
296 scoped_guard(mutex, &plane->dev->lock) in plane_type_show()
[all …]
/linux/drivers/misc/uacce/
H A Duacce.c83 * gets called with mmap_lock held, by taking uacce->mutex instead of in uacce_fops_unl_ioctl()
84 * q->mutex. Doing this in uacce_fops_mmap() is not possible because in uacce_fops_unl_ioctl()
86 * mmap_lock, while holding uacce->mutex. in uacce_fops_unl_ioctl()
88 mutex_lock(&uacce->mutex); in uacce_fops_unl_ioctl()
106 mutex_unlock(&uacce->mutex); in uacce_fops_unl_ioctl()
165 mutex_lock(&uacce->mutex); in uacce_fops_open()
188 mutex_init(&q->mutex); in uacce_fops_open()
190 mutex_unlock(&uacce->mutex); in uacce_fops_open()
198 mutex_unlock(&uacce->mutex); in uacce_fops_open()
207 mutex_lock(&uacce->mutex); in uacce_fops_release()
[all …]
/linux/drivers/net/wireless/zydas/zd1211rw/
H A Dzd_chip.c27 mutex_init(&chip->mutex); in zd_chip_init()
34 ZD_ASSERT(!mutex_is_locked(&chip->mutex)); in zd_chip_clear()
37 mutex_destroy(&chip->mutex); in zd_chip_clear()
141 ZD_ASSERT(mutex_is_locked(&chip->mutex)); in _zd_iowrite32v_async_locked()
190 ZD_ASSERT(mutex_is_locked(&chip->mutex)); in zd_iowrite16a_locked()
259 mutex_lock(&chip->mutex); in zd_ioread16()
261 mutex_unlock(&chip->mutex); in zd_ioread16()
269 mutex_lock(&chip->mutex); in zd_ioread32()
271 mutex_unlock(&chip->mutex); in zd_ioread32()
279 mutex_lock(&chip->mutex); in zd_iowrite16()
[all …]

12345678910>>...110