/src/mpv/osdep/threads-posix.h
Line | Count | Source |
1 | | /* |
2 | | * This file is part of mpv. |
3 | | * |
4 | | * mpv is free software; you can redistribute it and/or |
5 | | * modify it under the terms of the GNU Lesser General Public |
6 | | * License as published by the Free Software Foundation; either |
7 | | * version 2.1 of the License, or (at your option) any later version. |
8 | | * |
9 | | * mpv is distributed in the hope that it will be useful, |
10 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | | * GNU Lesser General Public License for more details. |
13 | | * |
14 | | * You should have received a copy of the GNU Lesser General Public |
15 | | * License along with mpv. If not, see <http://www.gnu.org/licenses/>. |
16 | | */ |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include <errno.h> |
21 | | #include <pthread.h> |
22 | | #include <stdio.h> |
23 | | |
24 | | #include "common/common.h" |
25 | | #include "config.h" |
26 | | // We make use of NON-POSIX pthreads functions and certain systems |
27 | | // require this header to build without issues. (ex: OpenBSD) |
28 | | #if HAVE_BSD_THREAD_NAME |
29 | | #include <pthread_np.h> |
30 | | #endif |
31 | | #include "osdep/compiler.h" |
32 | | #include "timer.h" |
33 | | |
34 | | int mp_ptwrap_check(const char *file, int line, int res); |
35 | | int mp_ptwrap_mutex_init(const char *file, int line, pthread_mutex_t *m, |
36 | | const pthread_mutexattr_t *attr); |
37 | | int mp_ptwrap_mutex_trylock(const char *file, int line, pthread_mutex_t *m); |
38 | | |
39 | | #if HAVE_PTHREAD_DEBUG |
40 | | |
41 | | // pthread debugging wrappers. Technically, this is undefined behavior, because |
42 | | // you are not supposed to define any symbols that clash with reserved names. |
43 | | // Other than that, they should be fine. |
44 | | |
45 | | // Note: mpv normally never checks pthread error return values of certain |
46 | | // functions that should never fail. It does so because these cases would |
47 | | // be undefined behavior anyway (such as double-frees etc.). However, |
48 | | // since there are no good pthread debugging tools, these wrappers are |
49 | | // provided for the sake of debugging. They crash on unexpected errors. |
50 | | // |
51 | | // Technically, pthread_cond/mutex_init() can fail with ENOMEM. We don't |
52 | | // really respect this for normal/recursive mutex types, as due to the |
53 | | // existence of static initializers, no sane implementation could actually |
54 | | // require allocating memory. |
55 | | |
56 | | #define MP_PTWRAP(fn, ...) \ |
57 | | mp_ptwrap_check(__FILE__, __LINE__, (fn)(__VA_ARGS__)) |
58 | | |
59 | | // ISO C defines that all standard functions can be macros, except undef'ing |
60 | | // them is allowed and must make the "real" definitions available. (Whatever.) |
61 | | #undef pthread_cond_init |
62 | | #undef pthread_cond_destroy |
63 | | #undef pthread_cond_broadcast |
64 | | #undef pthread_cond_signal |
65 | | #undef pthread_cond_wait |
66 | | #undef pthread_cond_timedwait |
67 | | #undef pthread_detach |
68 | | #undef pthread_join |
69 | | #undef pthread_mutex_destroy |
70 | | #undef pthread_mutex_lock |
71 | | #undef pthread_mutex_trylock |
72 | | #undef pthread_mutex_unlock |
73 | | |
74 | | #define pthread_cond_init(...) MP_PTWRAP(pthread_cond_init, __VA_ARGS__) |
75 | | #define pthread_cond_destroy(...) MP_PTWRAP(pthread_cond_destroy, __VA_ARGS__) |
76 | | #define pthread_cond_broadcast(...) MP_PTWRAP(pthread_cond_broadcast, __VA_ARGS__) |
77 | | #define pthread_cond_signal(...) MP_PTWRAP(pthread_cond_signal, __VA_ARGS__) |
78 | | #define pthread_cond_wait(...) MP_PTWRAP(pthread_cond_wait, __VA_ARGS__) |
79 | | #define pthread_cond_timedwait(...) MP_PTWRAP(pthread_cond_timedwait, __VA_ARGS__) |
80 | | #define pthread_detach(...) MP_PTWRAP(pthread_detach, __VA_ARGS__) |
81 | | #define pthread_join(...) MP_PTWRAP(pthread_join, __VA_ARGS__) |
82 | | #define pthread_mutex_destroy(...) MP_PTWRAP(pthread_mutex_destroy, __VA_ARGS__) |
83 | | #define pthread_mutex_lock(...) MP_PTWRAP(pthread_mutex_lock, __VA_ARGS__) |
84 | | #define pthread_mutex_unlock(...) MP_PTWRAP(pthread_mutex_unlock, __VA_ARGS__) |
85 | | |
86 | | #define pthread_mutex_init(...) \ |
87 | | mp_ptwrap_mutex_init(__FILE__, __LINE__, __VA_ARGS__) |
88 | | |
89 | | #define pthread_mutex_trylock(...) \ |
90 | | mp_ptwrap_mutex_trylock(__FILE__, __LINE__, __VA_ARGS__) |
91 | | |
92 | | #endif |
93 | | |
94 | | typedef struct { |
95 | | pthread_cond_t cond; |
96 | | clockid_t clk_id; |
97 | | } mp_cond; |
98 | | |
99 | | typedef pthread_mutex_t mp_mutex; |
100 | | typedef pthread_mutex_t mp_static_mutex; |
101 | | typedef pthread_once_t mp_once; |
102 | | typedef pthread_t mp_thread_id; |
103 | | typedef pthread_t mp_thread; |
104 | | |
105 | 314k | #define MP_STATIC_COND_INITIALIZER { .cond = PTHREAD_COND_INITIALIZER, .clk_id = CLOCK_REALTIME } |
106 | 314k | #define MP_STATIC_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER |
107 | | #define MP_STATIC_ONCE_INITIALIZER PTHREAD_ONCE_INIT |
108 | | |
109 | | static inline int mp_mutex_init(mp_mutex *mutex) |
110 | 5.08M | { |
111 | 5.08M | #ifndef NDEBUG |
112 | 5.08M | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; |
113 | | #else |
114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; |
115 | | #endif |
116 | | |
117 | 5.08M | int ret = 0; |
118 | 5.08M | pthread_mutexattr_t attr; |
119 | 5.08M | ret = pthread_mutexattr_init(&attr); |
120 | 5.08M | if (ret != 0) |
121 | 0 | return ret; |
122 | | |
123 | 5.08M | pthread_mutexattr_settype(&attr, mutex_type); |
124 | 5.08M | ret = pthread_mutex_init(mutex, &attr); |
125 | 5.08M | pthread_mutexattr_destroy(&attr); |
126 | 5.08M | mp_assert(!ret); |
127 | 5.08M | return ret; |
128 | 5.08M | } Line | Count | Source | 110 | 665k | { | 111 | 665k | #ifndef NDEBUG | 112 | 665k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 665k | int ret = 0; | 118 | 665k | pthread_mutexattr_t attr; | 119 | 665k | ret = pthread_mutexattr_init(&attr); | 120 | 665k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 665k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 665k | ret = pthread_mutex_init(mutex, &attr); | 125 | 665k | pthread_mutexattr_destroy(&attr); | 126 | 665k | mp_assert(!ret); | 127 | 665k | return ret; | 128 | 665k | } |
Unexecuted instantiation: command.c:mp_mutex_init Unexecuted instantiation: configfiles.c:mp_mutex_init Unexecuted instantiation: discnav.c:mp_mutex_init Unexecuted instantiation: loadfile.c:mp_mutex_init Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
Unexecuted instantiation: misc.c:mp_mutex_init Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
Unexecuted instantiation: playloop.c:mp_mutex_init Unexecuted instantiation: screenshot.c:mp_mutex_init Unexecuted instantiation: scripting.c:mp_mutex_init Unexecuted instantiation: sub.c:mp_mutex_init Unexecuted instantiation: video.c:mp_mutex_init clipboard.c:mp_mutex_init Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
Unexecuted instantiation: clipboard-vo.c:mp_mutex_init Unexecuted instantiation: stream.c:mp_mutex_init Unexecuted instantiation: stream_cb.c:mp_mutex_init Unexecuted instantiation: stream_file.c:mp_mutex_init Unexecuted instantiation: stream_lavf.c:mp_mutex_init Unexecuted instantiation: stream_mpv.c:mp_mutex_init Line | Count | Source | 110 | 1.95k | { | 111 | 1.95k | #ifndef NDEBUG | 112 | 1.95k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 1.95k | int ret = 0; | 118 | 1.95k | pthread_mutexattr_t attr; | 119 | 1.95k | ret = pthread_mutexattr_init(&attr); | 120 | 1.95k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 1.95k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 1.95k | ret = pthread_mutex_init(mutex, &attr); | 125 | 1.95k | pthread_mutexattr_destroy(&attr); | 126 | 1.95k | mp_assert(!ret); | 127 | 1.95k | return ret; | 128 | 1.95k | } |
Unexecuted instantiation: osd_libass.c:mp_mutex_init Unexecuted instantiation: sd_ass.c:mp_mutex_init Unexecuted instantiation: sd_lavc.c:mp_mutex_init Unexecuted instantiation: hwdec.c:mp_mutex_init Unexecuted instantiation: mp_image.c:mp_mutex_init Unexecuted instantiation: mp_image_pool.c:mp_mutex_init Line | Count | Source | 110 | 113k | { | 111 | 113k | #ifndef NDEBUG | 112 | 113k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 113k | int ret = 0; | 118 | 113k | pthread_mutexattr_t attr; | 119 | 113k | ret = pthread_mutexattr_init(&attr); | 120 | 113k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 113k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 113k | ret = pthread_mutex_init(mutex, &attr); | 125 | 113k | pthread_mutexattr_destroy(&attr); | 126 | 113k | mp_assert(!ret); | 127 | 113k | return ret; | 128 | 113k | } |
Unexecuted instantiation: vo_gpu.c:mp_mutex_init Unexecuted instantiation: vo_image.c:mp_mutex_init Unexecuted instantiation: vo_lavc.c:mp_mutex_init Unexecuted instantiation: vo_libmpv.c:mp_mutex_init Unexecuted instantiation: vo_null.c:mp_mutex_init Unexecuted instantiation: vo_tct.c:mp_mutex_init Unexecuted instantiation: vo_kitty.c:mp_mutex_init Unexecuted instantiation: vo_gpu_next.c:mp_mutex_init Unexecuted instantiation: context.c:mp_mutex_init Unexecuted instantiation: timer.c:mp_mutex_init Unexecuted instantiation: ta.c:mp_mutex_init Unexecuted instantiation: ipc-unix.c:mp_mutex_init Unexecuted instantiation: terminal-unix.c:mp_mutex_init Unexecuted instantiation: filter_regex.c:mp_mutex_init Unexecuted instantiation: als-linux.c:mp_mutex_init Unexecuted instantiation: stream_dvb.c:mp_mutex_init Unexecuted instantiation: ra_gl.c:mp_mutex_init Unexecuted instantiation: utils.c:mp_mutex_init Unexecuted instantiation: ao_lavc.c:mp_mutex_init Line | Count | Source | 110 | 62.2k | { | 111 | 62.2k | #ifndef NDEBUG | 112 | 62.2k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 62.2k | int ret = 0; | 118 | 62.2k | pthread_mutexattr_t attr; | 119 | 62.2k | ret = pthread_mutexattr_init(&attr); | 120 | 62.2k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 62.2k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 62.2k | ret = pthread_mutex_init(mutex, &attr); | 125 | 62.2k | pthread_mutexattr_destroy(&attr); | 126 | 62.2k | mp_assert(!ret); | 127 | 62.2k | return ret; | 128 | 62.2k | } |
Unexecuted instantiation: av_log.c:mp_mutex_init encode_lavc.c:mp_mutex_init Line | Count | Source | 110 | 242 | { | 111 | 242 | #ifndef NDEBUG | 112 | 242 | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 242 | int ret = 0; | 118 | 242 | pthread_mutexattr_t attr; | 119 | 242 | ret = pthread_mutexattr_init(&attr); | 120 | 242 | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 242 | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 242 | ret = pthread_mutex_init(mutex, &attr); | 125 | 242 | pthread_mutexattr_destroy(&attr); | 126 | 242 | mp_assert(!ret); | 127 | 242 | return ret; | 128 | 242 | } |
Line | Count | Source | 110 | 530k | { | 111 | 530k | #ifndef NDEBUG | 112 | 530k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 530k | int ret = 0; | 118 | 530k | pthread_mutexattr_t attr; | 119 | 530k | ret = pthread_mutexattr_init(&attr); | 120 | 530k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 530k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 530k | ret = pthread_mutex_init(mutex, &attr); | 125 | 530k | pthread_mutexattr_destroy(&attr); | 126 | 530k | mp_assert(!ret); | 127 | 530k | return ret; | 128 | 530k | } |
Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
Line | Count | Source | 110 | 1.17M | { | 111 | 1.17M | #ifndef NDEBUG | 112 | 1.17M | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 1.17M | int ret = 0; | 118 | 1.17M | pthread_mutexattr_t attr; | 119 | 1.17M | ret = pthread_mutexattr_init(&attr); | 120 | 1.17M | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 1.17M | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 1.17M | ret = pthread_mutex_init(mutex, &attr); | 125 | 1.17M | pthread_mutexattr_destroy(&attr); | 126 | 1.17M | mp_assert(!ret); | 127 | 1.17M | return ret; | 128 | 1.17M | } |
Unexecuted instantiation: demux_lavf.c:mp_mutex_init Unexecuted instantiation: demux_mkv_timeline.c:mp_mutex_init Unexecuted instantiation: demux_playlist.c:mp_mutex_init packet_pool.c:mp_mutex_init Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
f_async_queue.c:mp_mutex_init Line | Count | Source | 110 | 31.1k | { | 111 | 31.1k | #ifndef NDEBUG | 112 | 31.1k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 31.1k | int ret = 0; | 118 | 31.1k | pthread_mutexattr_t attr; | 119 | 31.1k | ret = pthread_mutexattr_init(&attr); | 120 | 31.1k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 31.1k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 31.1k | ret = pthread_mutex_init(mutex, &attr); | 125 | 31.1k | pthread_mutexattr_destroy(&attr); | 126 | 31.1k | mp_assert(!ret); | 127 | 31.1k | return ret; | 128 | 31.1k | } |
f_decoder_wrapper.c:mp_mutex_init Line | Count | Source | 110 | 101k | { | 111 | 101k | #ifndef NDEBUG | 112 | 101k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 101k | int ret = 0; | 118 | 101k | pthread_mutexattr_t attr; | 119 | 101k | ret = pthread_mutexattr_init(&attr); | 120 | 101k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 101k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 101k | ret = pthread_mutex_init(mutex, &attr); | 125 | 101k | pthread_mutexattr_destroy(&attr); | 126 | 101k | mp_assert(!ret); | 127 | 101k | return ret; | 128 | 101k | } |
Unexecuted instantiation: f_lavfi.c:mp_mutex_init Unexecuted instantiation: f_output_chain.c:mp_mutex_init Line | Count | Source | 110 | 459k | { | 111 | 459k | #ifndef NDEBUG | 112 | 459k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 459k | int ret = 0; | 118 | 459k | pthread_mutexattr_t attr; | 119 | 459k | ret = pthread_mutexattr_init(&attr); | 120 | 459k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 459k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 459k | ret = pthread_mutex_init(mutex, &attr); | 125 | 459k | pthread_mutexattr_destroy(&attr); | 126 | 459k | mp_assert(!ret); | 127 | 459k | return ret; | 128 | 459k | } |
Unexecuted instantiation: dnd.c:mp_mutex_init Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
Line | Count | Source | 110 | 194k | { | 111 | 194k | #ifndef NDEBUG | 112 | 194k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 194k | int ret = 0; | 118 | 194k | pthread_mutexattr_t attr; | 119 | 194k | ret = pthread_mutexattr_init(&attr); | 120 | 194k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 194k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 194k | ret = pthread_mutex_init(mutex, &attr); | 125 | 194k | pthread_mutexattr_destroy(&attr); | 126 | 194k | mp_assert(!ret); | 127 | 194k | return ret; | 128 | 194k | } |
Unexecuted instantiation: rendezvous.c:mp_mutex_init thread_pool.c:mp_mutex_init Line | Count | Source | 110 | 138k | { | 111 | 138k | #ifndef NDEBUG | 112 | 138k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 138k | int ret = 0; | 118 | 138k | pthread_mutexattr_t attr; | 119 | 138k | ret = pthread_mutexattr_init(&attr); | 120 | 138k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 138k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 138k | ret = pthread_mutex_init(mutex, &attr); | 125 | 138k | pthread_mutexattr_destroy(&attr); | 126 | 138k | mp_assert(!ret); | 127 | 138k | return ret; | 128 | 138k | } |
thread_tools.c:mp_mutex_init Line | Count | Source | 110 | 428k | { | 111 | 428k | #ifndef NDEBUG | 112 | 428k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 428k | int ret = 0; | 118 | 428k | pthread_mutexattr_t attr; | 119 | 428k | ret = pthread_mutexattr_init(&attr); | 120 | 428k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 428k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 428k | ret = pthread_mutex_init(mutex, &attr); | 125 | 428k | pthread_mutexattr_destroy(&attr); | 126 | 428k | mp_assert(!ret); | 127 | 428k | return ret; | 128 | 428k | } |
m_config_core.c:mp_mutex_init Line | Count | Source | 110 | 301k | { | 111 | 301k | #ifndef NDEBUG | 112 | 301k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 301k | int ret = 0; | 118 | 301k | pthread_mutexattr_t attr; | 119 | 301k | ret = pthread_mutexattr_init(&attr); | 120 | 301k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 301k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 301k | ret = pthread_mutex_init(mutex, &attr); | 125 | 301k | pthread_mutexattr_destroy(&attr); | 126 | 301k | mp_assert(!ret); | 127 | 301k | return ret; | 128 | 301k | } |
Unexecuted instantiation: m_config_frontend.c:mp_mutex_init Unexecuted instantiation: options.c:mp_mutex_init Unexecuted instantiation: audio.c:mp_mutex_init Unexecuted instantiation: external_files.c:mp_mutex_init Unexecuted instantiation: filter_sdh.c:mp_mutex_init Unexecuted instantiation: lavc_conv.c:mp_mutex_init Line | Count | Source | 110 | 48.1k | { | 111 | 48.1k | #ifndef NDEBUG | 112 | 48.1k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 48.1k | int ret = 0; | 118 | 48.1k | pthread_mutexattr_t attr; | 119 | 48.1k | ret = pthread_mutexattr_init(&attr); | 120 | 48.1k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 48.1k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 48.1k | ret = pthread_mutex_init(mutex, &attr); | 125 | 48.1k | pthread_mutexattr_destroy(&attr); | 126 | 48.1k | mp_assert(!ret); | 127 | 48.1k | return ret; | 128 | 48.1k | } |
Unexecuted instantiation: vf_sub.c:mp_mutex_init Unexecuted instantiation: aspect.c:mp_mutex_init dr_helper.c:mp_mutex_init Line | Count | Source | 110 | 2.98k | { | 111 | 2.98k | #ifndef NDEBUG | 112 | 2.98k | int mutex_type = PTHREAD_MUTEX_ERRORCHECK; | 113 | | #else | 114 | | int mutex_type = PTHREAD_MUTEX_DEFAULT; | 115 | | #endif | 116 | | | 117 | 2.98k | int ret = 0; | 118 | 2.98k | pthread_mutexattr_t attr; | 119 | 2.98k | ret = pthread_mutexattr_init(&attr); | 120 | 2.98k | if (ret != 0) | 121 | 0 | return ret; | 122 | | | 123 | 2.98k | pthread_mutexattr_settype(&attr, mutex_type); | 124 | 2.98k | ret = pthread_mutex_init(mutex, &attr); | 125 | 2.98k | pthread_mutexattr_destroy(&attr); | 126 | 2.98k | mp_assert(!ret); | 127 | 2.98k | return ret; | 128 | 2.98k | } |
Unexecuted instantiation: libmpv_gpu.c:mp_mutex_init Unexecuted instantiation: spirv.c:mp_mutex_init Unexecuted instantiation: video_shaders.c:mp_mutex_init Unexecuted instantiation: libmpv_sw.c:mp_mutex_init Unexecuted instantiation: path-unix.c:mp_mutex_init Unexecuted instantiation: formats.c:mp_mutex_init Unexecuted instantiation: libmpv_gl.c:mp_mutex_init Unexecuted instantiation: error_diffusion.c:mp_mutex_init Unexecuted instantiation: shader_cache.c:mp_mutex_init Unexecuted instantiation: user_shaders.c:mp_mutex_init Unexecuted instantiation: common.c:mp_mutex_init Unexecuted instantiation: win_state.c:mp_mutex_init Unexecuted instantiation: threads-posix.c:mp_mutex_init |
129 | | |
130 | 5.40M | #define mp_mutex_destroy pthread_mutex_destroy |
131 | 434M | #define mp_mutex_lock pthread_mutex_lock |
132 | 0 | #define mp_mutex_trylock pthread_mutex_trylock |
133 | 434M | #define mp_mutex_unlock pthread_mutex_unlock |
134 | | |
135 | | static inline int mp_cond_init(mp_cond *cond) |
136 | 2.46M | { |
137 | 2.46M | mp_assert(cond); |
138 | | |
139 | 2.46M | int ret = 0; |
140 | 2.46M | pthread_condattr_t attr; |
141 | 2.46M | ret = pthread_condattr_init(&attr); |
142 | 2.46M | if (ret) |
143 | 0 | return ret; |
144 | | |
145 | 2.46M | cond->clk_id = CLOCK_REALTIME; |
146 | 2.46M | #if HAVE_PTHREAD_CONDATTR_SETCLOCK |
147 | 2.46M | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) |
148 | 2.46M | cond->clk_id = CLOCK_MONOTONIC; |
149 | 2.46M | #endif |
150 | | |
151 | 2.46M | ret = pthread_cond_init(&cond->cond, &attr); |
152 | 2.46M | pthread_condattr_destroy(&attr); |
153 | 2.46M | return ret; |
154 | 2.46M | } Line | Count | Source | 136 | 263k | { | 137 | 263k | mp_assert(cond); | 138 | | | 139 | 263k | int ret = 0; | 140 | 263k | pthread_condattr_t attr; | 141 | 263k | ret = pthread_condattr_init(&attr); | 142 | 263k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 263k | cond->clk_id = CLOCK_REALTIME; | 146 | 263k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 263k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 263k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 263k | #endif | 150 | | | 151 | 263k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 263k | pthread_condattr_destroy(&attr); | 153 | 263k | return ret; | 154 | 263k | } |
Unexecuted instantiation: command.c:mp_cond_init Unexecuted instantiation: configfiles.c:mp_cond_init Unexecuted instantiation: discnav.c:mp_cond_init Unexecuted instantiation: loadfile.c:mp_cond_init Unexecuted instantiation: main.c:mp_cond_init Unexecuted instantiation: misc.c:mp_cond_init Unexecuted instantiation: osd.c:mp_cond_init Unexecuted instantiation: playloop.c:mp_cond_init Unexecuted instantiation: screenshot.c:mp_cond_init Unexecuted instantiation: scripting.c:mp_cond_init Unexecuted instantiation: sub.c:mp_cond_init Unexecuted instantiation: video.c:mp_cond_init Unexecuted instantiation: clipboard.c:mp_cond_init Unexecuted instantiation: clipboard-vo.c:mp_cond_init Unexecuted instantiation: stream.c:mp_cond_init Unexecuted instantiation: stream_cb.c:mp_cond_init Unexecuted instantiation: stream_file.c:mp_cond_init Unexecuted instantiation: stream_lavf.c:mp_cond_init Unexecuted instantiation: stream_mpv.c:mp_cond_init Unexecuted instantiation: dec_sub.c:mp_cond_init Unexecuted instantiation: osd_libass.c:mp_cond_init Unexecuted instantiation: sd_ass.c:mp_cond_init Unexecuted instantiation: sd_lavc.c:mp_cond_init Unexecuted instantiation: hwdec.c:mp_cond_init Unexecuted instantiation: mp_image.c:mp_cond_init Unexecuted instantiation: mp_image_pool.c:mp_cond_init Line | Count | Source | 136 | 56.6k | { | 137 | 56.6k | mp_assert(cond); | 138 | | | 139 | 56.6k | int ret = 0; | 140 | 56.6k | pthread_condattr_t attr; | 141 | 56.6k | ret = pthread_condattr_init(&attr); | 142 | 56.6k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 56.6k | cond->clk_id = CLOCK_REALTIME; | 146 | 56.6k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 56.6k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 56.6k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 56.6k | #endif | 150 | | | 151 | 56.6k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 56.6k | pthread_condattr_destroy(&attr); | 153 | 56.6k | return ret; | 154 | 56.6k | } |
Unexecuted instantiation: vo_gpu.c:mp_cond_init Unexecuted instantiation: vo_image.c:mp_cond_init Unexecuted instantiation: vo_lavc.c:mp_cond_init Unexecuted instantiation: vo_libmpv.c:mp_cond_init Unexecuted instantiation: vo_null.c:mp_cond_init Unexecuted instantiation: vo_tct.c:mp_cond_init Unexecuted instantiation: vo_kitty.c:mp_cond_init Unexecuted instantiation: vo_gpu_next.c:mp_cond_init Unexecuted instantiation: context.c:mp_cond_init Unexecuted instantiation: timer.c:mp_cond_init Unexecuted instantiation: ta.c:mp_cond_init Unexecuted instantiation: ipc-unix.c:mp_cond_init Unexecuted instantiation: terminal-unix.c:mp_cond_init Unexecuted instantiation: filter_regex.c:mp_cond_init Unexecuted instantiation: als-linux.c:mp_cond_init Unexecuted instantiation: stream_dvb.c:mp_cond_init Unexecuted instantiation: ra_gl.c:mp_cond_init Unexecuted instantiation: utils.c:mp_cond_init Unexecuted instantiation: ao_lavc.c:mp_cond_init Line | Count | Source | 136 | 62.2k | { | 137 | 62.2k | mp_assert(cond); | 138 | | | 139 | 62.2k | int ret = 0; | 140 | 62.2k | pthread_condattr_t attr; | 141 | 62.2k | ret = pthread_condattr_init(&attr); | 142 | 62.2k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 62.2k | cond->clk_id = CLOCK_REALTIME; | 146 | 62.2k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 62.2k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 62.2k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 62.2k | #endif | 150 | | | 151 | 62.2k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 62.2k | pthread_condattr_destroy(&attr); | 153 | 62.2k | return ret; | 154 | 62.2k | } |
Unexecuted instantiation: av_log.c:mp_cond_init Unexecuted instantiation: encode_lavc.c:mp_cond_init Line | Count | Source | 136 | 138k | { | 137 | 138k | mp_assert(cond); | 138 | | | 139 | 138k | int ret = 0; | 140 | 138k | pthread_condattr_t attr; | 141 | 138k | ret = pthread_condattr_init(&attr); | 142 | 138k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 138k | cond->clk_id = CLOCK_REALTIME; | 146 | 138k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 138k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 138k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 138k | #endif | 150 | | | 151 | 138k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 138k | pthread_condattr_destroy(&attr); | 153 | 138k | return ret; | 154 | 138k | } |
Unexecuted instantiation: stats.c:mp_cond_init Line | Count | Source | 136 | 1.17M | { | 137 | 1.17M | mp_assert(cond); | 138 | | | 139 | 1.17M | int ret = 0; | 140 | 1.17M | pthread_condattr_t attr; | 141 | 1.17M | ret = pthread_condattr_init(&attr); | 142 | 1.17M | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 1.17M | cond->clk_id = CLOCK_REALTIME; | 146 | 1.17M | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 1.17M | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 1.17M | cond->clk_id = CLOCK_MONOTONIC; | 149 | 1.17M | #endif | 150 | | | 151 | 1.17M | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 1.17M | pthread_condattr_destroy(&attr); | 153 | 1.17M | return ret; | 154 | 1.17M | } |
Unexecuted instantiation: demux_lavf.c:mp_cond_init Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_init Unexecuted instantiation: demux_playlist.c:mp_cond_init Unexecuted instantiation: packet_pool.c:mp_cond_init Unexecuted instantiation: f_async_queue.c:mp_cond_init Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_init Unexecuted instantiation: f_lavfi.c:mp_cond_init Unexecuted instantiation: f_output_chain.c:mp_cond_init Unexecuted instantiation: filter.c:mp_cond_init Unexecuted instantiation: dnd.c:mp_cond_init Unexecuted instantiation: input.c:mp_cond_init Line | Count | Source | 136 | 194k | { | 137 | 194k | mp_assert(cond); | 138 | | | 139 | 194k | int ret = 0; | 140 | 194k | pthread_condattr_t attr; | 141 | 194k | ret = pthread_condattr_init(&attr); | 142 | 194k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 194k | cond->clk_id = CLOCK_REALTIME; | 146 | 194k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 194k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 194k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 194k | #endif | 150 | | | 151 | 194k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 194k | pthread_condattr_destroy(&attr); | 153 | 194k | return ret; | 154 | 194k | } |
Unexecuted instantiation: rendezvous.c:mp_cond_init thread_pool.c:mp_cond_init Line | Count | Source | 136 | 138k | { | 137 | 138k | mp_assert(cond); | 138 | | | 139 | 138k | int ret = 0; | 140 | 138k | pthread_condattr_t attr; | 141 | 138k | ret = pthread_condattr_init(&attr); | 142 | 138k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 138k | cond->clk_id = CLOCK_REALTIME; | 146 | 138k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 138k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 138k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 138k | #endif | 150 | | | 151 | 138k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 138k | pthread_condattr_destroy(&attr); | 153 | 138k | return ret; | 154 | 138k | } |
thread_tools.c:mp_cond_init Line | Count | Source | 136 | 428k | { | 137 | 428k | mp_assert(cond); | 138 | | | 139 | 428k | int ret = 0; | 140 | 428k | pthread_condattr_t attr; | 141 | 428k | ret = pthread_condattr_init(&attr); | 142 | 428k | if (ret) | 143 | 0 | return ret; | 144 | | | 145 | 428k | cond->clk_id = CLOCK_REALTIME; | 146 | 428k | #if HAVE_PTHREAD_CONDATTR_SETCLOCK | 147 | 428k | if (!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) | 148 | 428k | cond->clk_id = CLOCK_MONOTONIC; | 149 | 428k | #endif | 150 | | | 151 | 428k | ret = pthread_cond_init(&cond->cond, &attr); | 152 | 428k | pthread_condattr_destroy(&attr); | 153 | 428k | return ret; | 154 | 428k | } |
Unexecuted instantiation: m_config_core.c:mp_cond_init Unexecuted instantiation: m_config_frontend.c:mp_cond_init Unexecuted instantiation: options.c:mp_cond_init Unexecuted instantiation: audio.c:mp_cond_init Unexecuted instantiation: external_files.c:mp_cond_init Unexecuted instantiation: filter_sdh.c:mp_cond_init Unexecuted instantiation: lavc_conv.c:mp_cond_init Unexecuted instantiation: vd_lavc.c:mp_cond_init Unexecuted instantiation: vf_sub.c:mp_cond_init Unexecuted instantiation: aspect.c:mp_cond_init Unexecuted instantiation: dr_helper.c:mp_cond_init Unexecuted instantiation: libmpv_gpu.c:mp_cond_init Unexecuted instantiation: spirv.c:mp_cond_init Unexecuted instantiation: video_shaders.c:mp_cond_init Unexecuted instantiation: libmpv_sw.c:mp_cond_init Unexecuted instantiation: path-unix.c:mp_cond_init Unexecuted instantiation: formats.c:mp_cond_init Unexecuted instantiation: libmpv_gl.c:mp_cond_init Unexecuted instantiation: error_diffusion.c:mp_cond_init Unexecuted instantiation: shader_cache.c:mp_cond_init Unexecuted instantiation: user_shaders.c:mp_cond_init Unexecuted instantiation: common.c:mp_cond_init Unexecuted instantiation: win_state.c:mp_cond_init Unexecuted instantiation: threads-posix.c:mp_cond_init |
155 | | |
156 | | static inline int mp_cond_destroy(mp_cond *cond) |
157 | 2.77M | { |
158 | 2.77M | mp_assert(cond); |
159 | 2.77M | return pthread_cond_destroy(&cond->cond); |
160 | 2.77M | } Line | Count | Source | 157 | 263k | { | 158 | 263k | mp_assert(cond); | 159 | 263k | return pthread_cond_destroy(&cond->cond); | 160 | 263k | } |
Unexecuted instantiation: command.c:mp_cond_destroy Unexecuted instantiation: configfiles.c:mp_cond_destroy Unexecuted instantiation: discnav.c:mp_cond_destroy Unexecuted instantiation: loadfile.c:mp_cond_destroy Unexecuted instantiation: main.c:mp_cond_destroy Unexecuted instantiation: misc.c:mp_cond_destroy Unexecuted instantiation: osd.c:mp_cond_destroy Unexecuted instantiation: playloop.c:mp_cond_destroy Unexecuted instantiation: screenshot.c:mp_cond_destroy Unexecuted instantiation: scripting.c:mp_cond_destroy Unexecuted instantiation: sub.c:mp_cond_destroy Unexecuted instantiation: video.c:mp_cond_destroy Unexecuted instantiation: clipboard.c:mp_cond_destroy Unexecuted instantiation: clipboard-vo.c:mp_cond_destroy Unexecuted instantiation: stream.c:mp_cond_destroy Unexecuted instantiation: stream_cb.c:mp_cond_destroy Unexecuted instantiation: stream_file.c:mp_cond_destroy Unexecuted instantiation: stream_lavf.c:mp_cond_destroy Unexecuted instantiation: stream_mpv.c:mp_cond_destroy Unexecuted instantiation: dec_sub.c:mp_cond_destroy Unexecuted instantiation: osd_libass.c:mp_cond_destroy Unexecuted instantiation: sd_ass.c:mp_cond_destroy Unexecuted instantiation: sd_lavc.c:mp_cond_destroy Unexecuted instantiation: hwdec.c:mp_cond_destroy Unexecuted instantiation: mp_image.c:mp_cond_destroy Unexecuted instantiation: mp_image_pool.c:mp_cond_destroy Line | Count | Source | 157 | 56.6k | { | 158 | 56.6k | mp_assert(cond); | 159 | 56.6k | return pthread_cond_destroy(&cond->cond); | 160 | 56.6k | } |
Unexecuted instantiation: vo_gpu.c:mp_cond_destroy Unexecuted instantiation: vo_image.c:mp_cond_destroy Unexecuted instantiation: vo_lavc.c:mp_cond_destroy Unexecuted instantiation: vo_libmpv.c:mp_cond_destroy Unexecuted instantiation: vo_null.c:mp_cond_destroy Unexecuted instantiation: vo_tct.c:mp_cond_destroy Unexecuted instantiation: vo_kitty.c:mp_cond_destroy Unexecuted instantiation: vo_gpu_next.c:mp_cond_destroy Unexecuted instantiation: context.c:mp_cond_destroy Unexecuted instantiation: timer.c:mp_cond_destroy Unexecuted instantiation: ta.c:mp_cond_destroy Unexecuted instantiation: ipc-unix.c:mp_cond_destroy Unexecuted instantiation: terminal-unix.c:mp_cond_destroy Unexecuted instantiation: filter_regex.c:mp_cond_destroy Unexecuted instantiation: als-linux.c:mp_cond_destroy Unexecuted instantiation: stream_dvb.c:mp_cond_destroy Unexecuted instantiation: ra_gl.c:mp_cond_destroy Unexecuted instantiation: utils.c:mp_cond_destroy Unexecuted instantiation: ao_lavc.c:mp_cond_destroy Line | Count | Source | 157 | 62.5k | { | 158 | 62.5k | mp_assert(cond); | 159 | 62.5k | return pthread_cond_destroy(&cond->cond); | 160 | 62.5k | } |
Unexecuted instantiation: av_log.c:mp_cond_destroy Unexecuted instantiation: encode_lavc.c:mp_cond_destroy Line | Count | Source | 157 | 138k | { | 158 | 138k | mp_assert(cond); | 159 | 138k | return pthread_cond_destroy(&cond->cond); | 160 | 138k | } |
Unexecuted instantiation: stats.c:mp_cond_destroy Line | Count | Source | 157 | 1.17M | { | 158 | 1.17M | mp_assert(cond); | 159 | 1.17M | return pthread_cond_destroy(&cond->cond); | 160 | 1.17M | } |
Unexecuted instantiation: demux_lavf.c:mp_cond_destroy Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_destroy Unexecuted instantiation: demux_playlist.c:mp_cond_destroy Unexecuted instantiation: packet_pool.c:mp_cond_destroy Unexecuted instantiation: f_async_queue.c:mp_cond_destroy Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_destroy Unexecuted instantiation: f_lavfi.c:mp_cond_destroy Unexecuted instantiation: f_output_chain.c:mp_cond_destroy Unexecuted instantiation: filter.c:mp_cond_destroy Unexecuted instantiation: dnd.c:mp_cond_destroy Unexecuted instantiation: input.c:mp_cond_destroy dispatch.c:mp_cond_destroy Line | Count | Source | 157 | 194k | { | 158 | 194k | mp_assert(cond); | 159 | 194k | return pthread_cond_destroy(&cond->cond); | 160 | 194k | } |
Unexecuted instantiation: rendezvous.c:mp_cond_destroy thread_pool.c:mp_cond_destroy Line | Count | Source | 157 | 138k | { | 158 | 138k | mp_assert(cond); | 159 | 138k | return pthread_cond_destroy(&cond->cond); | 160 | 138k | } |
thread_tools.c:mp_cond_destroy Line | Count | Source | 157 | 743k | { | 158 | 743k | mp_assert(cond); | 159 | 743k | return pthread_cond_destroy(&cond->cond); | 160 | 743k | } |
Unexecuted instantiation: m_config_core.c:mp_cond_destroy Unexecuted instantiation: m_config_frontend.c:mp_cond_destroy Unexecuted instantiation: options.c:mp_cond_destroy Unexecuted instantiation: audio.c:mp_cond_destroy Unexecuted instantiation: external_files.c:mp_cond_destroy Unexecuted instantiation: filter_sdh.c:mp_cond_destroy Unexecuted instantiation: lavc_conv.c:mp_cond_destroy Unexecuted instantiation: vd_lavc.c:mp_cond_destroy Unexecuted instantiation: vf_sub.c:mp_cond_destroy Unexecuted instantiation: aspect.c:mp_cond_destroy Unexecuted instantiation: dr_helper.c:mp_cond_destroy Unexecuted instantiation: libmpv_gpu.c:mp_cond_destroy Unexecuted instantiation: spirv.c:mp_cond_destroy Unexecuted instantiation: video_shaders.c:mp_cond_destroy Unexecuted instantiation: libmpv_sw.c:mp_cond_destroy Unexecuted instantiation: path-unix.c:mp_cond_destroy Unexecuted instantiation: formats.c:mp_cond_destroy Unexecuted instantiation: libmpv_gl.c:mp_cond_destroy Unexecuted instantiation: error_diffusion.c:mp_cond_destroy Unexecuted instantiation: shader_cache.c:mp_cond_destroy Unexecuted instantiation: user_shaders.c:mp_cond_destroy Unexecuted instantiation: common.c:mp_cond_destroy Unexecuted instantiation: win_state.c:mp_cond_destroy Unexecuted instantiation: threads-posix.c:mp_cond_destroy |
161 | | |
162 | | static inline int mp_cond_broadcast(mp_cond *cond) |
163 | 17.1M | { |
164 | 17.1M | mp_assert(cond); |
165 | 17.1M | return pthread_cond_broadcast(&cond->cond); |
166 | 17.1M | } client.c:mp_cond_broadcast Line | Count | Source | 163 | 2.22M | { | 164 | 2.22M | mp_assert(cond); | 165 | 2.22M | return pthread_cond_broadcast(&cond->cond); | 166 | 2.22M | } |
Unexecuted instantiation: command.c:mp_cond_broadcast Unexecuted instantiation: configfiles.c:mp_cond_broadcast Unexecuted instantiation: discnav.c:mp_cond_broadcast Unexecuted instantiation: loadfile.c:mp_cond_broadcast Unexecuted instantiation: main.c:mp_cond_broadcast Unexecuted instantiation: misc.c:mp_cond_broadcast Unexecuted instantiation: osd.c:mp_cond_broadcast Unexecuted instantiation: playloop.c:mp_cond_broadcast Unexecuted instantiation: screenshot.c:mp_cond_broadcast Unexecuted instantiation: scripting.c:mp_cond_broadcast Unexecuted instantiation: sub.c:mp_cond_broadcast Unexecuted instantiation: video.c:mp_cond_broadcast Unexecuted instantiation: clipboard.c:mp_cond_broadcast Unexecuted instantiation: clipboard-vo.c:mp_cond_broadcast Unexecuted instantiation: stream.c:mp_cond_broadcast Unexecuted instantiation: stream_cb.c:mp_cond_broadcast Unexecuted instantiation: stream_file.c:mp_cond_broadcast Unexecuted instantiation: stream_lavf.c:mp_cond_broadcast Unexecuted instantiation: stream_mpv.c:mp_cond_broadcast Unexecuted instantiation: dec_sub.c:mp_cond_broadcast Unexecuted instantiation: osd_libass.c:mp_cond_broadcast Unexecuted instantiation: sd_ass.c:mp_cond_broadcast Unexecuted instantiation: sd_lavc.c:mp_cond_broadcast Unexecuted instantiation: hwdec.c:mp_cond_broadcast Unexecuted instantiation: mp_image.c:mp_cond_broadcast Unexecuted instantiation: mp_image_pool.c:mp_cond_broadcast Line | Count | Source | 163 | 1.45M | { | 164 | 1.45M | mp_assert(cond); | 165 | 1.45M | return pthread_cond_broadcast(&cond->cond); | 166 | 1.45M | } |
Unexecuted instantiation: vo_gpu.c:mp_cond_broadcast Unexecuted instantiation: vo_image.c:mp_cond_broadcast Unexecuted instantiation: vo_lavc.c:mp_cond_broadcast Unexecuted instantiation: vo_libmpv.c:mp_cond_broadcast Unexecuted instantiation: vo_null.c:mp_cond_broadcast Unexecuted instantiation: vo_tct.c:mp_cond_broadcast Unexecuted instantiation: vo_kitty.c:mp_cond_broadcast Unexecuted instantiation: vo_gpu_next.c:mp_cond_broadcast Unexecuted instantiation: context.c:mp_cond_broadcast Unexecuted instantiation: timer.c:mp_cond_broadcast Unexecuted instantiation: ta.c:mp_cond_broadcast Unexecuted instantiation: ipc-unix.c:mp_cond_broadcast Unexecuted instantiation: terminal-unix.c:mp_cond_broadcast Unexecuted instantiation: filter_regex.c:mp_cond_broadcast Unexecuted instantiation: als-linux.c:mp_cond_broadcast Unexecuted instantiation: stream_dvb.c:mp_cond_broadcast Unexecuted instantiation: ra_gl.c:mp_cond_broadcast Unexecuted instantiation: utils.c:mp_cond_broadcast Unexecuted instantiation: ao_lavc.c:mp_cond_broadcast buffer.c:mp_cond_broadcast Line | Count | Source | 163 | 3.71M | { | 164 | 3.71M | mp_assert(cond); | 165 | 3.71M | return pthread_cond_broadcast(&cond->cond); | 166 | 3.71M | } |
Unexecuted instantiation: av_log.c:mp_cond_broadcast Unexecuted instantiation: encode_lavc.c:mp_cond_broadcast Unexecuted instantiation: msg.c:mp_cond_broadcast Unexecuted instantiation: stats.c:mp_cond_broadcast Unexecuted instantiation: demux.c:mp_cond_broadcast Unexecuted instantiation: demux_lavf.c:mp_cond_broadcast Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_broadcast Unexecuted instantiation: demux_playlist.c:mp_cond_broadcast Unexecuted instantiation: packet_pool.c:mp_cond_broadcast Unexecuted instantiation: f_async_queue.c:mp_cond_broadcast Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_broadcast Unexecuted instantiation: f_lavfi.c:mp_cond_broadcast Unexecuted instantiation: f_output_chain.c:mp_cond_broadcast Unexecuted instantiation: filter.c:mp_cond_broadcast Unexecuted instantiation: dnd.c:mp_cond_broadcast Unexecuted instantiation: input.c:mp_cond_broadcast dispatch.c:mp_cond_broadcast Line | Count | Source | 163 | 8.87M | { | 164 | 8.87M | mp_assert(cond); | 165 | 8.87M | return pthread_cond_broadcast(&cond->cond); | 166 | 8.87M | } |
rendezvous.c:mp_cond_broadcast Line | Count | Source | 163 | 56.6k | { | 164 | 56.6k | mp_assert(cond); | 165 | 56.6k | return pthread_cond_broadcast(&cond->cond); | 166 | 56.6k | } |
thread_pool.c:mp_cond_broadcast Line | Count | Source | 163 | 138k | { | 164 | 138k | mp_assert(cond); | 165 | 138k | return pthread_cond_broadcast(&cond->cond); | 166 | 138k | } |
thread_tools.c:mp_cond_broadcast Line | Count | Source | 163 | 695k | { | 164 | 695k | mp_assert(cond); | 165 | 695k | return pthread_cond_broadcast(&cond->cond); | 166 | 695k | } |
Unexecuted instantiation: m_config_core.c:mp_cond_broadcast Unexecuted instantiation: m_config_frontend.c:mp_cond_broadcast Unexecuted instantiation: options.c:mp_cond_broadcast Unexecuted instantiation: audio.c:mp_cond_broadcast Unexecuted instantiation: external_files.c:mp_cond_broadcast Unexecuted instantiation: filter_sdh.c:mp_cond_broadcast Unexecuted instantiation: lavc_conv.c:mp_cond_broadcast Unexecuted instantiation: vd_lavc.c:mp_cond_broadcast Unexecuted instantiation: vf_sub.c:mp_cond_broadcast Unexecuted instantiation: aspect.c:mp_cond_broadcast Unexecuted instantiation: dr_helper.c:mp_cond_broadcast Unexecuted instantiation: libmpv_gpu.c:mp_cond_broadcast Unexecuted instantiation: spirv.c:mp_cond_broadcast Unexecuted instantiation: video_shaders.c:mp_cond_broadcast Unexecuted instantiation: libmpv_sw.c:mp_cond_broadcast Unexecuted instantiation: path-unix.c:mp_cond_broadcast Unexecuted instantiation: formats.c:mp_cond_broadcast Unexecuted instantiation: libmpv_gl.c:mp_cond_broadcast Unexecuted instantiation: error_diffusion.c:mp_cond_broadcast Unexecuted instantiation: shader_cache.c:mp_cond_broadcast Unexecuted instantiation: user_shaders.c:mp_cond_broadcast Unexecuted instantiation: common.c:mp_cond_broadcast Unexecuted instantiation: win_state.c:mp_cond_broadcast Unexecuted instantiation: threads-posix.c:mp_cond_broadcast |
167 | | |
168 | | static inline int mp_cond_signal(mp_cond *cond) |
169 | 7.53M | { |
170 | 7.53M | mp_assert(cond); |
171 | 7.53M | return pthread_cond_signal(&cond->cond); |
172 | 7.53M | } Unexecuted instantiation: client.c:mp_cond_signal Unexecuted instantiation: command.c:mp_cond_signal Unexecuted instantiation: configfiles.c:mp_cond_signal Unexecuted instantiation: discnav.c:mp_cond_signal Unexecuted instantiation: loadfile.c:mp_cond_signal Unexecuted instantiation: main.c:mp_cond_signal Unexecuted instantiation: misc.c:mp_cond_signal Unexecuted instantiation: osd.c:mp_cond_signal Unexecuted instantiation: playloop.c:mp_cond_signal Unexecuted instantiation: screenshot.c:mp_cond_signal Unexecuted instantiation: scripting.c:mp_cond_signal Unexecuted instantiation: sub.c:mp_cond_signal Unexecuted instantiation: video.c:mp_cond_signal Unexecuted instantiation: clipboard.c:mp_cond_signal Unexecuted instantiation: clipboard-vo.c:mp_cond_signal Unexecuted instantiation: stream.c:mp_cond_signal Unexecuted instantiation: stream_cb.c:mp_cond_signal Unexecuted instantiation: stream_file.c:mp_cond_signal Unexecuted instantiation: stream_lavf.c:mp_cond_signal Unexecuted instantiation: stream_mpv.c:mp_cond_signal Unexecuted instantiation: dec_sub.c:mp_cond_signal Unexecuted instantiation: osd_libass.c:mp_cond_signal Unexecuted instantiation: sd_ass.c:mp_cond_signal Unexecuted instantiation: sd_lavc.c:mp_cond_signal Unexecuted instantiation: hwdec.c:mp_cond_signal Unexecuted instantiation: mp_image.c:mp_cond_signal Unexecuted instantiation: mp_image_pool.c:mp_cond_signal Unexecuted instantiation: vo.c:mp_cond_signal Unexecuted instantiation: vo_gpu.c:mp_cond_signal Unexecuted instantiation: vo_image.c:mp_cond_signal Unexecuted instantiation: vo_lavc.c:mp_cond_signal Unexecuted instantiation: vo_libmpv.c:mp_cond_signal Unexecuted instantiation: vo_null.c:mp_cond_signal Unexecuted instantiation: vo_tct.c:mp_cond_signal Unexecuted instantiation: vo_kitty.c:mp_cond_signal Unexecuted instantiation: vo_gpu_next.c:mp_cond_signal Unexecuted instantiation: context.c:mp_cond_signal Unexecuted instantiation: timer.c:mp_cond_signal Unexecuted instantiation: ta.c:mp_cond_signal Unexecuted instantiation: ipc-unix.c:mp_cond_signal Unexecuted instantiation: terminal-unix.c:mp_cond_signal Unexecuted instantiation: filter_regex.c:mp_cond_signal Unexecuted instantiation: als-linux.c:mp_cond_signal Unexecuted instantiation: stream_dvb.c:mp_cond_signal Unexecuted instantiation: ra_gl.c:mp_cond_signal Unexecuted instantiation: utils.c:mp_cond_signal Unexecuted instantiation: ao_lavc.c:mp_cond_signal Unexecuted instantiation: buffer.c:mp_cond_signal Unexecuted instantiation: av_log.c:mp_cond_signal Unexecuted instantiation: encode_lavc.c:mp_cond_signal Unexecuted instantiation: msg.c:mp_cond_signal Unexecuted instantiation: stats.c:mp_cond_signal Line | Count | Source | 169 | 7.13M | { | 170 | 7.13M | mp_assert(cond); | 171 | 7.13M | return pthread_cond_signal(&cond->cond); | 172 | 7.13M | } |
Unexecuted instantiation: demux_lavf.c:mp_cond_signal Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_signal Unexecuted instantiation: demux_playlist.c:mp_cond_signal Unexecuted instantiation: packet_pool.c:mp_cond_signal Unexecuted instantiation: f_async_queue.c:mp_cond_signal Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_signal Unexecuted instantiation: f_lavfi.c:mp_cond_signal Unexecuted instantiation: f_output_chain.c:mp_cond_signal Unexecuted instantiation: filter.c:mp_cond_signal Unexecuted instantiation: dnd.c:mp_cond_signal Unexecuted instantiation: input.c:mp_cond_signal Unexecuted instantiation: dispatch.c:mp_cond_signal Unexecuted instantiation: rendezvous.c:mp_cond_signal thread_pool.c:mp_cond_signal Line | Count | Source | 169 | 83.6k | { | 170 | 83.6k | mp_assert(cond); | 171 | 83.6k | return pthread_cond_signal(&cond->cond); | 172 | 83.6k | } |
thread_tools.c:mp_cond_signal Line | Count | Source | 169 | 314k | { | 170 | 314k | mp_assert(cond); | 171 | 314k | return pthread_cond_signal(&cond->cond); | 172 | 314k | } |
Unexecuted instantiation: m_config_core.c:mp_cond_signal Unexecuted instantiation: m_config_frontend.c:mp_cond_signal Unexecuted instantiation: options.c:mp_cond_signal Unexecuted instantiation: audio.c:mp_cond_signal Unexecuted instantiation: external_files.c:mp_cond_signal Unexecuted instantiation: filter_sdh.c:mp_cond_signal Unexecuted instantiation: lavc_conv.c:mp_cond_signal Unexecuted instantiation: vd_lavc.c:mp_cond_signal Unexecuted instantiation: vf_sub.c:mp_cond_signal Unexecuted instantiation: aspect.c:mp_cond_signal Unexecuted instantiation: dr_helper.c:mp_cond_signal Unexecuted instantiation: libmpv_gpu.c:mp_cond_signal Unexecuted instantiation: spirv.c:mp_cond_signal Unexecuted instantiation: video_shaders.c:mp_cond_signal Unexecuted instantiation: libmpv_sw.c:mp_cond_signal Unexecuted instantiation: path-unix.c:mp_cond_signal Unexecuted instantiation: formats.c:mp_cond_signal Unexecuted instantiation: libmpv_gl.c:mp_cond_signal Unexecuted instantiation: error_diffusion.c:mp_cond_signal Unexecuted instantiation: shader_cache.c:mp_cond_signal Unexecuted instantiation: user_shaders.c:mp_cond_signal Unexecuted instantiation: common.c:mp_cond_signal Unexecuted instantiation: win_state.c:mp_cond_signal Unexecuted instantiation: threads-posix.c:mp_cond_signal |
173 | | |
174 | | static inline int mp_cond_wait(mp_cond *cond, mp_mutex *mutex) |
175 | 2.34M | { |
176 | 2.34M | mp_assert(cond); |
177 | 2.34M | return pthread_cond_wait(&cond->cond, mutex); |
178 | 2.34M | } Unexecuted instantiation: client.c:mp_cond_wait Unexecuted instantiation: command.c:mp_cond_wait Unexecuted instantiation: configfiles.c:mp_cond_wait Unexecuted instantiation: discnav.c:mp_cond_wait Unexecuted instantiation: loadfile.c:mp_cond_wait Unexecuted instantiation: main.c:mp_cond_wait Unexecuted instantiation: misc.c:mp_cond_wait Unexecuted instantiation: osd.c:mp_cond_wait Unexecuted instantiation: playloop.c:mp_cond_wait Unexecuted instantiation: screenshot.c:mp_cond_wait Unexecuted instantiation: scripting.c:mp_cond_wait Unexecuted instantiation: sub.c:mp_cond_wait Unexecuted instantiation: video.c:mp_cond_wait Unexecuted instantiation: clipboard.c:mp_cond_wait Unexecuted instantiation: clipboard-vo.c:mp_cond_wait Unexecuted instantiation: stream.c:mp_cond_wait Unexecuted instantiation: stream_cb.c:mp_cond_wait Unexecuted instantiation: stream_file.c:mp_cond_wait Unexecuted instantiation: stream_lavf.c:mp_cond_wait Unexecuted instantiation: stream_mpv.c:mp_cond_wait Unexecuted instantiation: dec_sub.c:mp_cond_wait Unexecuted instantiation: osd_libass.c:mp_cond_wait Unexecuted instantiation: sd_ass.c:mp_cond_wait Unexecuted instantiation: sd_lavc.c:mp_cond_wait Unexecuted instantiation: hwdec.c:mp_cond_wait Unexecuted instantiation: mp_image.c:mp_cond_wait Unexecuted instantiation: mp_image_pool.c:mp_cond_wait Line | Count | Source | 175 | 22.4k | { | 176 | 22.4k | mp_assert(cond); | 177 | 22.4k | return pthread_cond_wait(&cond->cond, mutex); | 178 | 22.4k | } |
Unexecuted instantiation: vo_gpu.c:mp_cond_wait Unexecuted instantiation: vo_image.c:mp_cond_wait Unexecuted instantiation: vo_lavc.c:mp_cond_wait Unexecuted instantiation: vo_libmpv.c:mp_cond_wait Unexecuted instantiation: vo_null.c:mp_cond_wait Unexecuted instantiation: vo_tct.c:mp_cond_wait Unexecuted instantiation: vo_kitty.c:mp_cond_wait Unexecuted instantiation: vo_gpu_next.c:mp_cond_wait Unexecuted instantiation: context.c:mp_cond_wait Unexecuted instantiation: timer.c:mp_cond_wait Unexecuted instantiation: ta.c:mp_cond_wait Unexecuted instantiation: ipc-unix.c:mp_cond_wait Unexecuted instantiation: terminal-unix.c:mp_cond_wait Unexecuted instantiation: filter_regex.c:mp_cond_wait Unexecuted instantiation: als-linux.c:mp_cond_wait Unexecuted instantiation: stream_dvb.c:mp_cond_wait Unexecuted instantiation: ra_gl.c:mp_cond_wait Unexecuted instantiation: utils.c:mp_cond_wait Unexecuted instantiation: ao_lavc.c:mp_cond_wait Unexecuted instantiation: buffer.c:mp_cond_wait Unexecuted instantiation: av_log.c:mp_cond_wait Unexecuted instantiation: encode_lavc.c:mp_cond_wait Unexecuted instantiation: msg.c:mp_cond_wait Unexecuted instantiation: stats.c:mp_cond_wait Unexecuted instantiation: demux.c:mp_cond_wait Unexecuted instantiation: demux_lavf.c:mp_cond_wait Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_wait Unexecuted instantiation: demux_playlist.c:mp_cond_wait Unexecuted instantiation: packet_pool.c:mp_cond_wait Unexecuted instantiation: f_async_queue.c:mp_cond_wait Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_wait Unexecuted instantiation: f_lavfi.c:mp_cond_wait Unexecuted instantiation: f_output_chain.c:mp_cond_wait Unexecuted instantiation: filter.c:mp_cond_wait Unexecuted instantiation: dnd.c:mp_cond_wait Unexecuted instantiation: input.c:mp_cond_wait Line | Count | Source | 175 | 2.17M | { | 176 | 2.17M | mp_assert(cond); | 177 | 2.17M | return pthread_cond_wait(&cond->cond, mutex); | 178 | 2.17M | } |
rendezvous.c:mp_cond_wait Line | Count | Source | 175 | 56.6k | { | 176 | 56.6k | mp_assert(cond); | 177 | 56.6k | return pthread_cond_wait(&cond->cond, mutex); | 178 | 56.6k | } |
thread_pool.c:mp_cond_wait Line | Count | Source | 175 | 83.6k | { | 176 | 83.6k | mp_assert(cond); | 177 | 83.6k | return pthread_cond_wait(&cond->cond, mutex); | 178 | 83.6k | } |
Unexecuted instantiation: thread_tools.c:mp_cond_wait Unexecuted instantiation: m_config_core.c:mp_cond_wait Unexecuted instantiation: m_config_frontend.c:mp_cond_wait Unexecuted instantiation: options.c:mp_cond_wait Unexecuted instantiation: audio.c:mp_cond_wait Unexecuted instantiation: external_files.c:mp_cond_wait Unexecuted instantiation: filter_sdh.c:mp_cond_wait Unexecuted instantiation: lavc_conv.c:mp_cond_wait Unexecuted instantiation: vd_lavc.c:mp_cond_wait Unexecuted instantiation: vf_sub.c:mp_cond_wait Unexecuted instantiation: aspect.c:mp_cond_wait Unexecuted instantiation: dr_helper.c:mp_cond_wait Unexecuted instantiation: libmpv_gpu.c:mp_cond_wait Unexecuted instantiation: spirv.c:mp_cond_wait Unexecuted instantiation: video_shaders.c:mp_cond_wait Unexecuted instantiation: libmpv_sw.c:mp_cond_wait Unexecuted instantiation: path-unix.c:mp_cond_wait Unexecuted instantiation: formats.c:mp_cond_wait Unexecuted instantiation: libmpv_gl.c:mp_cond_wait Unexecuted instantiation: error_diffusion.c:mp_cond_wait Unexecuted instantiation: shader_cache.c:mp_cond_wait Unexecuted instantiation: user_shaders.c:mp_cond_wait Unexecuted instantiation: common.c:mp_cond_wait Unexecuted instantiation: win_state.c:mp_cond_wait Unexecuted instantiation: threads-posix.c:mp_cond_wait |
179 | | |
180 | | static inline int mp_cond_timedwait(mp_cond *cond, mp_mutex *mutex, int64_t timeout) |
181 | 9.73M | { |
182 | 9.73M | mp_assert(cond); |
183 | | |
184 | 9.73M | timeout = MPMAX(0, timeout); |
185 | | // consider anything above 1000 days as infinity |
186 | 9.73M | if (timeout > MP_TIME_S_TO_NS(1000 * 24 * 60 * 60)) |
187 | 2.06M | return pthread_cond_wait(&cond->cond, mutex); |
188 | | |
189 | 7.67M | struct timespec ts; |
190 | 7.67M | clock_gettime(cond->clk_id, &ts); |
191 | 7.67M | ts.tv_sec += timeout / MP_TIME_S_TO_NS(1); |
192 | 7.67M | ts.tv_nsec += timeout % MP_TIME_S_TO_NS(1); |
193 | 7.67M | if (ts.tv_nsec >= MP_TIME_S_TO_NS(1)) { |
194 | 3.90M | ts.tv_nsec -= MP_TIME_S_TO_NS(1); |
195 | 3.90M | ts.tv_sec++; |
196 | 3.90M | } |
197 | | |
198 | 7.67M | return pthread_cond_timedwait(&cond->cond, mutex, &ts); |
199 | 9.73M | } client.c:mp_cond_timedwait Line | Count | Source | 181 | 2.05M | { | 182 | 2.05M | mp_assert(cond); | 183 | | | 184 | 2.05M | timeout = MPMAX(0, timeout); | 185 | | // consider anything above 1000 days as infinity | 186 | 2.05M | if (timeout > MP_TIME_S_TO_NS(1000 * 24 * 60 * 60)) | 187 | 1.87M | return pthread_cond_wait(&cond->cond, mutex); | 188 | | | 189 | 179k | struct timespec ts; | 190 | 179k | clock_gettime(cond->clk_id, &ts); | 191 | 179k | ts.tv_sec += timeout / MP_TIME_S_TO_NS(1); | 192 | 179k | ts.tv_nsec += timeout % MP_TIME_S_TO_NS(1); | 193 | 179k | if (ts.tv_nsec >= MP_TIME_S_TO_NS(1)) { | 194 | 178k | ts.tv_nsec -= MP_TIME_S_TO_NS(1); | 195 | 178k | ts.tv_sec++; | 196 | 178k | } | 197 | | | 198 | 179k | return pthread_cond_timedwait(&cond->cond, mutex, &ts); | 199 | 2.05M | } |
Unexecuted instantiation: command.c:mp_cond_timedwait Unexecuted instantiation: configfiles.c:mp_cond_timedwait Unexecuted instantiation: discnav.c:mp_cond_timedwait Unexecuted instantiation: loadfile.c:mp_cond_timedwait Unexecuted instantiation: main.c:mp_cond_timedwait Unexecuted instantiation: misc.c:mp_cond_timedwait Unexecuted instantiation: osd.c:mp_cond_timedwait Unexecuted instantiation: playloop.c:mp_cond_timedwait Unexecuted instantiation: screenshot.c:mp_cond_timedwait Unexecuted instantiation: scripting.c:mp_cond_timedwait Unexecuted instantiation: sub.c:mp_cond_timedwait Unexecuted instantiation: video.c:mp_cond_timedwait Unexecuted instantiation: clipboard.c:mp_cond_timedwait Unexecuted instantiation: clipboard-vo.c:mp_cond_timedwait Unexecuted instantiation: stream.c:mp_cond_timedwait Unexecuted instantiation: stream_cb.c:mp_cond_timedwait Unexecuted instantiation: stream_file.c:mp_cond_timedwait Unexecuted instantiation: stream_lavf.c:mp_cond_timedwait Unexecuted instantiation: stream_mpv.c:mp_cond_timedwait Unexecuted instantiation: dec_sub.c:mp_cond_timedwait Unexecuted instantiation: osd_libass.c:mp_cond_timedwait Unexecuted instantiation: sd_ass.c:mp_cond_timedwait Unexecuted instantiation: sd_lavc.c:mp_cond_timedwait Unexecuted instantiation: hwdec.c:mp_cond_timedwait Unexecuted instantiation: mp_image.c:mp_cond_timedwait Unexecuted instantiation: mp_image_pool.c:mp_cond_timedwait Line | Count | Source | 181 | 896k | { | 182 | 896k | mp_assert(cond); | 183 | | | 184 | 896k | timeout = MPMAX(0, timeout); | 185 | | // consider anything above 1000 days as infinity | 186 | 896k | if (timeout > MP_TIME_S_TO_NS(1000 * 24 * 60 * 60)) | 187 | 47 | return pthread_cond_wait(&cond->cond, mutex); | 188 | | | 189 | 896k | struct timespec ts; | 190 | 896k | clock_gettime(cond->clk_id, &ts); | 191 | 896k | ts.tv_sec += timeout / MP_TIME_S_TO_NS(1); | 192 | 896k | ts.tv_nsec += timeout % MP_TIME_S_TO_NS(1); | 193 | 896k | if (ts.tv_nsec >= MP_TIME_S_TO_NS(1)) { | 194 | 896k | ts.tv_nsec -= MP_TIME_S_TO_NS(1); | 195 | 896k | ts.tv_sec++; | 196 | 896k | } | 197 | | | 198 | 896k | return pthread_cond_timedwait(&cond->cond, mutex, &ts); | 199 | 896k | } |
Unexecuted instantiation: vo_gpu.c:mp_cond_timedwait Unexecuted instantiation: vo_image.c:mp_cond_timedwait Unexecuted instantiation: vo_lavc.c:mp_cond_timedwait Unexecuted instantiation: vo_libmpv.c:mp_cond_timedwait Unexecuted instantiation: vo_null.c:mp_cond_timedwait Unexecuted instantiation: vo_tct.c:mp_cond_timedwait Unexecuted instantiation: vo_kitty.c:mp_cond_timedwait Unexecuted instantiation: vo_gpu_next.c:mp_cond_timedwait Unexecuted instantiation: context.c:mp_cond_timedwait Unexecuted instantiation: timer.c:mp_cond_timedwait Unexecuted instantiation: ta.c:mp_cond_timedwait Unexecuted instantiation: ipc-unix.c:mp_cond_timedwait Unexecuted instantiation: terminal-unix.c:mp_cond_timedwait Unexecuted instantiation: filter_regex.c:mp_cond_timedwait Unexecuted instantiation: als-linux.c:mp_cond_timedwait Unexecuted instantiation: stream_dvb.c:mp_cond_timedwait Unexecuted instantiation: ra_gl.c:mp_cond_timedwait Unexecuted instantiation: utils.c:mp_cond_timedwait Unexecuted instantiation: ao_lavc.c:mp_cond_timedwait buffer.c:mp_cond_timedwait Line | Count | Source | 181 | 3.21M | { | 182 | 3.21M | mp_assert(cond); | 183 | | | 184 | 3.21M | timeout = MPMAX(0, timeout); | 185 | | // consider anything above 1000 days as infinity | 186 | 3.21M | if (timeout > MP_TIME_S_TO_NS(1000 * 24 * 60 * 60)) | 187 | 71.2k | return pthread_cond_wait(&cond->cond, mutex); | 188 | | | 189 | 3.14M | struct timespec ts; | 190 | 3.14M | clock_gettime(cond->clk_id, &ts); | 191 | 3.14M | ts.tv_sec += timeout / MP_TIME_S_TO_NS(1); | 192 | 3.14M | ts.tv_nsec += timeout % MP_TIME_S_TO_NS(1); | 193 | 3.14M | if (ts.tv_nsec >= MP_TIME_S_TO_NS(1)) { | 194 | 152k | ts.tv_nsec -= MP_TIME_S_TO_NS(1); | 195 | 152k | ts.tv_sec++; | 196 | 152k | } | 197 | | | 198 | 3.14M | return pthread_cond_timedwait(&cond->cond, mutex, &ts); | 199 | 3.21M | } |
Unexecuted instantiation: av_log.c:mp_cond_timedwait Unexecuted instantiation: encode_lavc.c:mp_cond_timedwait Unexecuted instantiation: msg.c:mp_cond_timedwait Unexecuted instantiation: stats.c:mp_cond_timedwait demux.c:mp_cond_timedwait Line | Count | Source | 181 | 2.69M | { | 182 | 2.69M | mp_assert(cond); | 183 | | | 184 | 2.69M | timeout = MPMAX(0, timeout); | 185 | | // consider anything above 1000 days as infinity | 186 | 2.69M | if (timeout > MP_TIME_S_TO_NS(1000 * 24 * 60 * 60)) | 187 | 110k | return pthread_cond_wait(&cond->cond, mutex); | 188 | | | 189 | 2.58M | struct timespec ts; | 190 | 2.58M | clock_gettime(cond->clk_id, &ts); | 191 | 2.58M | ts.tv_sec += timeout / MP_TIME_S_TO_NS(1); | 192 | 2.58M | ts.tv_nsec += timeout % MP_TIME_S_TO_NS(1); | 193 | 2.58M | if (ts.tv_nsec >= MP_TIME_S_TO_NS(1)) { | 194 | 2.58M | ts.tv_nsec -= MP_TIME_S_TO_NS(1); | 195 | 2.58M | ts.tv_sec++; | 196 | 2.58M | } | 197 | | | 198 | 2.58M | return pthread_cond_timedwait(&cond->cond, mutex, &ts); | 199 | 2.69M | } |
Unexecuted instantiation: demux_lavf.c:mp_cond_timedwait Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_timedwait Unexecuted instantiation: demux_playlist.c:mp_cond_timedwait Unexecuted instantiation: packet_pool.c:mp_cond_timedwait Unexecuted instantiation: f_async_queue.c:mp_cond_timedwait Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_timedwait Unexecuted instantiation: f_lavfi.c:mp_cond_timedwait Unexecuted instantiation: f_output_chain.c:mp_cond_timedwait Unexecuted instantiation: filter.c:mp_cond_timedwait Unexecuted instantiation: dnd.c:mp_cond_timedwait Unexecuted instantiation: input.c:mp_cond_timedwait dispatch.c:mp_cond_timedwait Line | Count | Source | 181 | 868k | { | 182 | 868k | mp_assert(cond); | 183 | | | 184 | 868k | timeout = MPMAX(0, timeout); | 185 | | // consider anything above 1000 days as infinity | 186 | 868k | if (timeout > MP_TIME_S_TO_NS(1000 * 24 * 60 * 60)) | 187 | 4.74k | return pthread_cond_wait(&cond->cond, mutex); | 188 | | | 189 | 863k | struct timespec ts; | 190 | 863k | clock_gettime(cond->clk_id, &ts); | 191 | 863k | ts.tv_sec += timeout / MP_TIME_S_TO_NS(1); | 192 | 863k | ts.tv_nsec += timeout % MP_TIME_S_TO_NS(1); | 193 | 863k | if (ts.tv_nsec >= MP_TIME_S_TO_NS(1)) { | 194 | 98.5k | ts.tv_nsec -= MP_TIME_S_TO_NS(1); | 195 | 98.5k | ts.tv_sec++; | 196 | 98.5k | } | 197 | | | 198 | 863k | return pthread_cond_timedwait(&cond->cond, mutex, &ts); | 199 | 868k | } |
Unexecuted instantiation: rendezvous.c:mp_cond_timedwait Unexecuted instantiation: thread_pool.c:mp_cond_timedwait Unexecuted instantiation: thread_tools.c:mp_cond_timedwait Unexecuted instantiation: m_config_core.c:mp_cond_timedwait Unexecuted instantiation: m_config_frontend.c:mp_cond_timedwait Unexecuted instantiation: options.c:mp_cond_timedwait Unexecuted instantiation: audio.c:mp_cond_timedwait Unexecuted instantiation: external_files.c:mp_cond_timedwait Unexecuted instantiation: filter_sdh.c:mp_cond_timedwait Unexecuted instantiation: lavc_conv.c:mp_cond_timedwait Unexecuted instantiation: vd_lavc.c:mp_cond_timedwait Unexecuted instantiation: vf_sub.c:mp_cond_timedwait Unexecuted instantiation: aspect.c:mp_cond_timedwait Unexecuted instantiation: dr_helper.c:mp_cond_timedwait Unexecuted instantiation: libmpv_gpu.c:mp_cond_timedwait Unexecuted instantiation: spirv.c:mp_cond_timedwait Unexecuted instantiation: video_shaders.c:mp_cond_timedwait Unexecuted instantiation: libmpv_sw.c:mp_cond_timedwait Unexecuted instantiation: path-unix.c:mp_cond_timedwait Unexecuted instantiation: formats.c:mp_cond_timedwait Unexecuted instantiation: libmpv_gl.c:mp_cond_timedwait Unexecuted instantiation: error_diffusion.c:mp_cond_timedwait Unexecuted instantiation: shader_cache.c:mp_cond_timedwait Unexecuted instantiation: user_shaders.c:mp_cond_timedwait Unexecuted instantiation: common.c:mp_cond_timedwait Unexecuted instantiation: win_state.c:mp_cond_timedwait Unexecuted instantiation: threads-posix.c:mp_cond_timedwait |
200 | | |
201 | | static inline int mp_cond_timedwait_until(mp_cond *cond, mp_mutex *mutex, int64_t until) |
202 | 6.51M | { |
203 | 6.51M | return mp_cond_timedwait(cond, mutex, until - mp_time_ns()); |
204 | 6.51M | } client.c:mp_cond_timedwait_until Line | Count | Source | 202 | 2.05M | { | 203 | 2.05M | return mp_cond_timedwait(cond, mutex, until - mp_time_ns()); | 204 | 2.05M | } |
Unexecuted instantiation: command.c:mp_cond_timedwait_until Unexecuted instantiation: configfiles.c:mp_cond_timedwait_until Unexecuted instantiation: discnav.c:mp_cond_timedwait_until Unexecuted instantiation: loadfile.c:mp_cond_timedwait_until Unexecuted instantiation: main.c:mp_cond_timedwait_until Unexecuted instantiation: misc.c:mp_cond_timedwait_until Unexecuted instantiation: osd.c:mp_cond_timedwait_until Unexecuted instantiation: playloop.c:mp_cond_timedwait_until Unexecuted instantiation: screenshot.c:mp_cond_timedwait_until Unexecuted instantiation: scripting.c:mp_cond_timedwait_until Unexecuted instantiation: sub.c:mp_cond_timedwait_until Unexecuted instantiation: video.c:mp_cond_timedwait_until Unexecuted instantiation: clipboard.c:mp_cond_timedwait_until Unexecuted instantiation: clipboard-vo.c:mp_cond_timedwait_until Unexecuted instantiation: stream.c:mp_cond_timedwait_until Unexecuted instantiation: stream_cb.c:mp_cond_timedwait_until Unexecuted instantiation: stream_file.c:mp_cond_timedwait_until Unexecuted instantiation: stream_lavf.c:mp_cond_timedwait_until Unexecuted instantiation: stream_mpv.c:mp_cond_timedwait_until Unexecuted instantiation: dec_sub.c:mp_cond_timedwait_until Unexecuted instantiation: osd_libass.c:mp_cond_timedwait_until Unexecuted instantiation: sd_ass.c:mp_cond_timedwait_until Unexecuted instantiation: sd_lavc.c:mp_cond_timedwait_until Unexecuted instantiation: hwdec.c:mp_cond_timedwait_until Unexecuted instantiation: mp_image.c:mp_cond_timedwait_until Unexecuted instantiation: mp_image_pool.c:mp_cond_timedwait_until vo.c:mp_cond_timedwait_until Line | Count | Source | 202 | 896k | { | 203 | 896k | return mp_cond_timedwait(cond, mutex, until - mp_time_ns()); | 204 | 896k | } |
Unexecuted instantiation: vo_gpu.c:mp_cond_timedwait_until Unexecuted instantiation: vo_image.c:mp_cond_timedwait_until Unexecuted instantiation: vo_lavc.c:mp_cond_timedwait_until Unexecuted instantiation: vo_libmpv.c:mp_cond_timedwait_until Unexecuted instantiation: vo_null.c:mp_cond_timedwait_until Unexecuted instantiation: vo_tct.c:mp_cond_timedwait_until Unexecuted instantiation: vo_kitty.c:mp_cond_timedwait_until Unexecuted instantiation: vo_gpu_next.c:mp_cond_timedwait_until Unexecuted instantiation: context.c:mp_cond_timedwait_until Unexecuted instantiation: timer.c:mp_cond_timedwait_until Unexecuted instantiation: ta.c:mp_cond_timedwait_until Unexecuted instantiation: ipc-unix.c:mp_cond_timedwait_until Unexecuted instantiation: terminal-unix.c:mp_cond_timedwait_until Unexecuted instantiation: filter_regex.c:mp_cond_timedwait_until Unexecuted instantiation: als-linux.c:mp_cond_timedwait_until Unexecuted instantiation: stream_dvb.c:mp_cond_timedwait_until Unexecuted instantiation: ra_gl.c:mp_cond_timedwait_until Unexecuted instantiation: utils.c:mp_cond_timedwait_until Unexecuted instantiation: ao_lavc.c:mp_cond_timedwait_until Unexecuted instantiation: buffer.c:mp_cond_timedwait_until Unexecuted instantiation: av_log.c:mp_cond_timedwait_until Unexecuted instantiation: encode_lavc.c:mp_cond_timedwait_until Unexecuted instantiation: msg.c:mp_cond_timedwait_until Unexecuted instantiation: stats.c:mp_cond_timedwait_until demux.c:mp_cond_timedwait_until Line | Count | Source | 202 | 2.69M | { | 203 | 2.69M | return mp_cond_timedwait(cond, mutex, until - mp_time_ns()); | 204 | 2.69M | } |
Unexecuted instantiation: demux_lavf.c:mp_cond_timedwait_until Unexecuted instantiation: demux_mkv_timeline.c:mp_cond_timedwait_until Unexecuted instantiation: demux_playlist.c:mp_cond_timedwait_until Unexecuted instantiation: packet_pool.c:mp_cond_timedwait_until Unexecuted instantiation: f_async_queue.c:mp_cond_timedwait_until Unexecuted instantiation: f_decoder_wrapper.c:mp_cond_timedwait_until Unexecuted instantiation: f_lavfi.c:mp_cond_timedwait_until Unexecuted instantiation: f_output_chain.c:mp_cond_timedwait_until Unexecuted instantiation: filter.c:mp_cond_timedwait_until Unexecuted instantiation: dnd.c:mp_cond_timedwait_until Unexecuted instantiation: input.c:mp_cond_timedwait_until dispatch.c:mp_cond_timedwait_until Line | Count | Source | 202 | 868k | { | 203 | 868k | return mp_cond_timedwait(cond, mutex, until - mp_time_ns()); | 204 | 868k | } |
Unexecuted instantiation: rendezvous.c:mp_cond_timedwait_until Unexecuted instantiation: thread_pool.c:mp_cond_timedwait_until Unexecuted instantiation: thread_tools.c:mp_cond_timedwait_until Unexecuted instantiation: m_config_core.c:mp_cond_timedwait_until Unexecuted instantiation: m_config_frontend.c:mp_cond_timedwait_until Unexecuted instantiation: options.c:mp_cond_timedwait_until Unexecuted instantiation: audio.c:mp_cond_timedwait_until Unexecuted instantiation: external_files.c:mp_cond_timedwait_until Unexecuted instantiation: filter_sdh.c:mp_cond_timedwait_until Unexecuted instantiation: lavc_conv.c:mp_cond_timedwait_until Unexecuted instantiation: vd_lavc.c:mp_cond_timedwait_until Unexecuted instantiation: vf_sub.c:mp_cond_timedwait_until Unexecuted instantiation: aspect.c:mp_cond_timedwait_until Unexecuted instantiation: dr_helper.c:mp_cond_timedwait_until Unexecuted instantiation: libmpv_gpu.c:mp_cond_timedwait_until Unexecuted instantiation: spirv.c:mp_cond_timedwait_until Unexecuted instantiation: video_shaders.c:mp_cond_timedwait_until Unexecuted instantiation: libmpv_sw.c:mp_cond_timedwait_until Unexecuted instantiation: path-unix.c:mp_cond_timedwait_until Unexecuted instantiation: formats.c:mp_cond_timedwait_until Unexecuted instantiation: libmpv_gl.c:mp_cond_timedwait_until Unexecuted instantiation: error_diffusion.c:mp_cond_timedwait_until Unexecuted instantiation: shader_cache.c:mp_cond_timedwait_until Unexecuted instantiation: user_shaders.c:mp_cond_timedwait_until Unexecuted instantiation: common.c:mp_cond_timedwait_until Unexecuted instantiation: win_state.c:mp_cond_timedwait_until Unexecuted instantiation: threads-posix.c:mp_cond_timedwait_until |
205 | | |
206 | 165k | #define mp_exec_once pthread_once |
207 | | |
208 | | #define MP_THREAD_VOID void * |
209 | 636k | #define MP_THREAD_RETURN() return NULL |
210 | | |
211 | 636k | #define mp_thread_create(t, f, a) pthread_create(t, NULL, f, a) |
212 | 510k | #define mp_thread_join(t) pthread_join(t, NULL) |
213 | 125k | #define mp_thread_detach pthread_detach |
214 | 5.33M | #define mp_thread_current_id pthread_self |
215 | 0 | #define mp_thread_id_equal(a, b) ((a) == (b)) |
216 | | #define mp_thread_get_id(thread) (thread) |
217 | | |
218 | | static inline void mp_thread_set_name(const char *name) |
219 | 637k | { |
220 | 637k | #if HAVE_GLIBC_THREAD_NAME |
221 | 637k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { |
222 | 1.09k | char tname[16] = {0}; // glibc-checked kernel limit |
223 | 1.09k | strncpy(tname, name, sizeof(tname) - 1); |
224 | 1.09k | pthread_setname_np(pthread_self(), tname); |
225 | 1.09k | } |
226 | | #elif HAVE_BSD_THREAD_NAME |
227 | | pthread_set_name_np(pthread_self(), name); |
228 | | #elif HAVE_MAC_THREAD_NAME |
229 | | pthread_setname_np(name); |
230 | | #endif |
231 | 637k | } client.c:mp_thread_set_name Line | Count | Source | 219 | 138k | { | 220 | 138k | #if HAVE_GLIBC_THREAD_NAME | 221 | 138k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 138k | } |
Unexecuted instantiation: command.c:mp_thread_set_name Unexecuted instantiation: configfiles.c:mp_thread_set_name Unexecuted instantiation: discnav.c:mp_thread_set_name loadfile.c:mp_thread_set_name Line | Count | Source | 219 | 112k | { | 220 | 112k | #if HAVE_GLIBC_THREAD_NAME | 221 | 112k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 112k | } |
Unexecuted instantiation: main.c:mp_thread_set_name Unexecuted instantiation: misc.c:mp_thread_set_name Unexecuted instantiation: osd.c:mp_thread_set_name Unexecuted instantiation: playloop.c:mp_thread_set_name Unexecuted instantiation: screenshot.c:mp_thread_set_name scripting.c:mp_thread_set_name Line | Count | Source | 219 | 2.93k | { | 220 | 2.93k | #if HAVE_GLIBC_THREAD_NAME | 221 | 2.93k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 733 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 733 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 733 | pthread_setname_np(pthread_self(), tname); | 225 | 733 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 2.93k | } |
Unexecuted instantiation: sub.c:mp_thread_set_name Unexecuted instantiation: video.c:mp_thread_set_name Unexecuted instantiation: clipboard.c:mp_thread_set_name Unexecuted instantiation: clipboard-vo.c:mp_thread_set_name Unexecuted instantiation: stream.c:mp_thread_set_name Unexecuted instantiation: stream_cb.c:mp_thread_set_name Unexecuted instantiation: stream_file.c:mp_thread_set_name Unexecuted instantiation: stream_lavf.c:mp_thread_set_name Unexecuted instantiation: stream_mpv.c:mp_thread_set_name Unexecuted instantiation: dec_sub.c:mp_thread_set_name Unexecuted instantiation: osd_libass.c:mp_thread_set_name Unexecuted instantiation: sd_ass.c:mp_thread_set_name Unexecuted instantiation: sd_lavc.c:mp_thread_set_name Unexecuted instantiation: hwdec.c:mp_thread_set_name Unexecuted instantiation: mp_image.c:mp_thread_set_name Unexecuted instantiation: mp_image_pool.c:mp_thread_set_name Line | Count | Source | 219 | 56.6k | { | 220 | 56.6k | #if HAVE_GLIBC_THREAD_NAME | 221 | 56.6k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 56.6k | } |
Unexecuted instantiation: vo_gpu.c:mp_thread_set_name Unexecuted instantiation: vo_image.c:mp_thread_set_name Unexecuted instantiation: vo_lavc.c:mp_thread_set_name Unexecuted instantiation: vo_libmpv.c:mp_thread_set_name Unexecuted instantiation: vo_null.c:mp_thread_set_name Unexecuted instantiation: vo_tct.c:mp_thread_set_name Unexecuted instantiation: vo_kitty.c:mp_thread_set_name Unexecuted instantiation: vo_gpu_next.c:mp_thread_set_name Unexecuted instantiation: context.c:mp_thread_set_name Unexecuted instantiation: timer.c:mp_thread_set_name Unexecuted instantiation: ta.c:mp_thread_set_name ipc-unix.c:mp_thread_set_name Line | Count | Source | 219 | 1.76k | { | 220 | 1.76k | #if HAVE_GLIBC_THREAD_NAME | 221 | 1.76k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 366 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 366 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 366 | pthread_setname_np(pthread_self(), tname); | 225 | 366 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 1.76k | } |
terminal-unix.c:mp_thread_set_name Line | Count | Source | 219 | 5 | { | 220 | 5 | #if HAVE_GLIBC_THREAD_NAME | 221 | 5 | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 5 | } |
Unexecuted instantiation: filter_regex.c:mp_thread_set_name Unexecuted instantiation: als-linux.c:mp_thread_set_name Unexecuted instantiation: stream_dvb.c:mp_thread_set_name Unexecuted instantiation: ra_gl.c:mp_thread_set_name Unexecuted instantiation: utils.c:mp_thread_set_name Unexecuted instantiation: ao_lavc.c:mp_thread_set_name buffer.c:mp_thread_set_name Line | Count | Source | 219 | 31.1k | { | 220 | 31.1k | #if HAVE_GLIBC_THREAD_NAME | 221 | 31.1k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 31.1k | } |
Unexecuted instantiation: av_log.c:mp_thread_set_name Unexecuted instantiation: encode_lavc.c:mp_thread_set_name Unexecuted instantiation: msg.c:mp_thread_set_name Unexecuted instantiation: stats.c:mp_thread_set_name demux.c:mp_thread_set_name Line | Count | Source | 219 | 88.7k | { | 220 | 88.7k | #if HAVE_GLIBC_THREAD_NAME | 221 | 88.7k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 88.7k | } |
Unexecuted instantiation: demux_lavf.c:mp_thread_set_name Unexecuted instantiation: demux_mkv_timeline.c:mp_thread_set_name Unexecuted instantiation: demux_playlist.c:mp_thread_set_name Unexecuted instantiation: packet_pool.c:mp_thread_set_name Unexecuted instantiation: f_async_queue.c:mp_thread_set_name Unexecuted instantiation: f_decoder_wrapper.c:mp_thread_set_name Unexecuted instantiation: f_lavfi.c:mp_thread_set_name Unexecuted instantiation: f_output_chain.c:mp_thread_set_name Unexecuted instantiation: filter.c:mp_thread_set_name Line | Count | Source | 219 | 122k | { | 220 | 122k | #if HAVE_GLIBC_THREAD_NAME | 221 | 122k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 122k | } |
Unexecuted instantiation: input.c:mp_thread_set_name Unexecuted instantiation: dispatch.c:mp_thread_set_name Unexecuted instantiation: rendezvous.c:mp_thread_set_name thread_pool.c:mp_thread_set_name Line | Count | Source | 219 | 83.4k | { | 220 | 83.4k | #if HAVE_GLIBC_THREAD_NAME | 221 | 83.4k | if (pthread_setname_np(pthread_self(), name) == ERANGE) { | 222 | 0 | char tname[16] = {0}; // glibc-checked kernel limit | 223 | 0 | strncpy(tname, name, sizeof(tname) - 1); | 224 | 0 | pthread_setname_np(pthread_self(), tname); | 225 | 0 | } | 226 | | #elif HAVE_BSD_THREAD_NAME | 227 | | pthread_set_name_np(pthread_self(), name); | 228 | | #elif HAVE_MAC_THREAD_NAME | 229 | | pthread_setname_np(name); | 230 | | #endif | 231 | 83.4k | } |
Unexecuted instantiation: thread_tools.c:mp_thread_set_name Unexecuted instantiation: m_config_core.c:mp_thread_set_name Unexecuted instantiation: m_config_frontend.c:mp_thread_set_name Unexecuted instantiation: options.c:mp_thread_set_name Unexecuted instantiation: audio.c:mp_thread_set_name Unexecuted instantiation: external_files.c:mp_thread_set_name Unexecuted instantiation: filter_sdh.c:mp_thread_set_name Unexecuted instantiation: lavc_conv.c:mp_thread_set_name Unexecuted instantiation: vd_lavc.c:mp_thread_set_name Unexecuted instantiation: vf_sub.c:mp_thread_set_name Unexecuted instantiation: aspect.c:mp_thread_set_name Unexecuted instantiation: dr_helper.c:mp_thread_set_name Unexecuted instantiation: libmpv_gpu.c:mp_thread_set_name Unexecuted instantiation: spirv.c:mp_thread_set_name Unexecuted instantiation: video_shaders.c:mp_thread_set_name Unexecuted instantiation: libmpv_sw.c:mp_thread_set_name Unexecuted instantiation: path-unix.c:mp_thread_set_name Unexecuted instantiation: formats.c:mp_thread_set_name Unexecuted instantiation: libmpv_gl.c:mp_thread_set_name Unexecuted instantiation: error_diffusion.c:mp_thread_set_name Unexecuted instantiation: shader_cache.c:mp_thread_set_name Unexecuted instantiation: user_shaders.c:mp_thread_set_name Unexecuted instantiation: common.c:mp_thread_set_name Unexecuted instantiation: win_state.c:mp_thread_set_name Unexecuted instantiation: threads-posix.c:mp_thread_set_name |
232 | | |
233 | | static inline int64_t mp_thread_cpu_time_ns(mp_thread_id thread) |
234 | 1.77k | { |
235 | 1.77k | #if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME) |
236 | 1.77k | clockid_t id; |
237 | 1.77k | struct timespec ts; |
238 | 1.77k | if (pthread_getcpuclockid(thread, &id) == 0 && clock_gettime(id, &ts) == 0) |
239 | 1.77k | return MP_TIME_S_TO_NS(ts.tv_sec) + ts.tv_nsec; |
240 | 0 | #endif |
241 | 0 | return -1; |
242 | 1.77k | } Unexecuted instantiation: client.c:mp_thread_cpu_time_ns Unexecuted instantiation: command.c:mp_thread_cpu_time_ns Unexecuted instantiation: configfiles.c:mp_thread_cpu_time_ns Unexecuted instantiation: discnav.c:mp_thread_cpu_time_ns Unexecuted instantiation: loadfile.c:mp_thread_cpu_time_ns Unexecuted instantiation: main.c:mp_thread_cpu_time_ns Unexecuted instantiation: misc.c:mp_thread_cpu_time_ns Unexecuted instantiation: osd.c:mp_thread_cpu_time_ns Unexecuted instantiation: playloop.c:mp_thread_cpu_time_ns Unexecuted instantiation: screenshot.c:mp_thread_cpu_time_ns Unexecuted instantiation: scripting.c:mp_thread_cpu_time_ns Unexecuted instantiation: sub.c:mp_thread_cpu_time_ns Unexecuted instantiation: video.c:mp_thread_cpu_time_ns Unexecuted instantiation: clipboard.c:mp_thread_cpu_time_ns Unexecuted instantiation: clipboard-vo.c:mp_thread_cpu_time_ns Unexecuted instantiation: stream.c:mp_thread_cpu_time_ns Unexecuted instantiation: stream_cb.c:mp_thread_cpu_time_ns Unexecuted instantiation: stream_file.c:mp_thread_cpu_time_ns Unexecuted instantiation: stream_lavf.c:mp_thread_cpu_time_ns Unexecuted instantiation: stream_mpv.c:mp_thread_cpu_time_ns Unexecuted instantiation: dec_sub.c:mp_thread_cpu_time_ns Unexecuted instantiation: osd_libass.c:mp_thread_cpu_time_ns Unexecuted instantiation: sd_ass.c:mp_thread_cpu_time_ns Unexecuted instantiation: sd_lavc.c:mp_thread_cpu_time_ns Unexecuted instantiation: hwdec.c:mp_thread_cpu_time_ns Unexecuted instantiation: mp_image.c:mp_thread_cpu_time_ns Unexecuted instantiation: mp_image_pool.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_gpu.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_image.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_lavc.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_libmpv.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_null.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_tct.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_kitty.c:mp_thread_cpu_time_ns Unexecuted instantiation: vo_gpu_next.c:mp_thread_cpu_time_ns Unexecuted instantiation: context.c:mp_thread_cpu_time_ns Unexecuted instantiation: timer.c:mp_thread_cpu_time_ns Unexecuted instantiation: ta.c:mp_thread_cpu_time_ns Unexecuted instantiation: ipc-unix.c:mp_thread_cpu_time_ns Unexecuted instantiation: terminal-unix.c:mp_thread_cpu_time_ns Unexecuted instantiation: filter_regex.c:mp_thread_cpu_time_ns Unexecuted instantiation: als-linux.c:mp_thread_cpu_time_ns Unexecuted instantiation: stream_dvb.c:mp_thread_cpu_time_ns Unexecuted instantiation: ra_gl.c:mp_thread_cpu_time_ns Unexecuted instantiation: utils.c:mp_thread_cpu_time_ns Unexecuted instantiation: ao_lavc.c:mp_thread_cpu_time_ns Unexecuted instantiation: buffer.c:mp_thread_cpu_time_ns Unexecuted instantiation: av_log.c:mp_thread_cpu_time_ns Unexecuted instantiation: encode_lavc.c:mp_thread_cpu_time_ns Unexecuted instantiation: msg.c:mp_thread_cpu_time_ns stats.c:mp_thread_cpu_time_ns Line | Count | Source | 234 | 1.77k | { | 235 | 1.77k | #if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME) | 236 | 1.77k | clockid_t id; | 237 | 1.77k | struct timespec ts; | 238 | 1.77k | if (pthread_getcpuclockid(thread, &id) == 0 && clock_gettime(id, &ts) == 0) | 239 | 1.77k | return MP_TIME_S_TO_NS(ts.tv_sec) + ts.tv_nsec; | 240 | 0 | #endif | 241 | 0 | return -1; | 242 | 1.77k | } |
Unexecuted instantiation: demux.c:mp_thread_cpu_time_ns Unexecuted instantiation: demux_lavf.c:mp_thread_cpu_time_ns Unexecuted instantiation: demux_mkv_timeline.c:mp_thread_cpu_time_ns Unexecuted instantiation: demux_playlist.c:mp_thread_cpu_time_ns Unexecuted instantiation: packet_pool.c:mp_thread_cpu_time_ns Unexecuted instantiation: f_async_queue.c:mp_thread_cpu_time_ns Unexecuted instantiation: f_decoder_wrapper.c:mp_thread_cpu_time_ns Unexecuted instantiation: f_lavfi.c:mp_thread_cpu_time_ns Unexecuted instantiation: f_output_chain.c:mp_thread_cpu_time_ns Unexecuted instantiation: filter.c:mp_thread_cpu_time_ns Unexecuted instantiation: dnd.c:mp_thread_cpu_time_ns Unexecuted instantiation: input.c:mp_thread_cpu_time_ns Unexecuted instantiation: dispatch.c:mp_thread_cpu_time_ns Unexecuted instantiation: rendezvous.c:mp_thread_cpu_time_ns Unexecuted instantiation: thread_pool.c:mp_thread_cpu_time_ns Unexecuted instantiation: thread_tools.c:mp_thread_cpu_time_ns Unexecuted instantiation: m_config_core.c:mp_thread_cpu_time_ns Unexecuted instantiation: m_config_frontend.c:mp_thread_cpu_time_ns Unexecuted instantiation: options.c:mp_thread_cpu_time_ns Unexecuted instantiation: audio.c:mp_thread_cpu_time_ns Unexecuted instantiation: external_files.c:mp_thread_cpu_time_ns Unexecuted instantiation: filter_sdh.c:mp_thread_cpu_time_ns Unexecuted instantiation: lavc_conv.c:mp_thread_cpu_time_ns Unexecuted instantiation: vd_lavc.c:mp_thread_cpu_time_ns Unexecuted instantiation: vf_sub.c:mp_thread_cpu_time_ns Unexecuted instantiation: aspect.c:mp_thread_cpu_time_ns Unexecuted instantiation: dr_helper.c:mp_thread_cpu_time_ns Unexecuted instantiation: libmpv_gpu.c:mp_thread_cpu_time_ns Unexecuted instantiation: spirv.c:mp_thread_cpu_time_ns Unexecuted instantiation: video_shaders.c:mp_thread_cpu_time_ns Unexecuted instantiation: libmpv_sw.c:mp_thread_cpu_time_ns Unexecuted instantiation: path-unix.c:mp_thread_cpu_time_ns Unexecuted instantiation: formats.c:mp_thread_cpu_time_ns Unexecuted instantiation: libmpv_gl.c:mp_thread_cpu_time_ns Unexecuted instantiation: error_diffusion.c:mp_thread_cpu_time_ns Unexecuted instantiation: shader_cache.c:mp_thread_cpu_time_ns Unexecuted instantiation: user_shaders.c:mp_thread_cpu_time_ns Unexecuted instantiation: common.c:mp_thread_cpu_time_ns Unexecuted instantiation: win_state.c:mp_thread_cpu_time_ns Unexecuted instantiation: threads-posix.c:mp_thread_cpu_time_ns |