Commit Graph

12543 Commits

Author SHA1 Message Date
Max Kellermann 7384ec199e Compiler.h: remove support for GCC 4.9
Supporting GCC 4.9 is becoming cumbersome as we refactor more code to
C++14.

This shouldn't be a problem for anybody, because Debian Stable
(Stretch) has version 6.3, and Ubuntu LTS (Xenial) has version 5.3.
2017-12-27 08:40:24 +01:00
Max Kellermann 7bce6329e3 archive/File, input/Plugin: return InputStreamPtr 2017-12-26 20:05:22 +01:00
Max Kellermann 49619fbd77 input/Proxy: use InputStreamPtr 2017-12-26 20:03:37 +01:00
Max Kellermann fb9a2c5431 input/Icy: manage the parser in a std::shared_ptr
This resolves the circular dependency between IcyInputStream and
CurlInputStream.
2017-12-26 20:03:35 +01:00
Max Kellermann cd38aa3b2a Merge branch 'v0.20.x' 2017-12-26 20:03:18 +01:00
Max Kellermann eee10ad2ed input/curl: add missing mutex locks to OnEnd(), OnError() 2017-12-26 20:01:13 +01:00
Max Kellermann daeb7ae949 input/InputStream: add "noexcept" 2017-12-26 11:39:34 +01:00
Max Kellermann 82a79565de input/InputStream: use C++11 initializers 2017-12-26 11:32:36 +01:00
Max Kellermann 078839c711 archive/zzip: convert struct to class 2017-12-26 11:22:46 +01:00
Max Kellermann 98472a8104 pcm/SampleFormat: remove wrong "malloc" attribute 2017-12-23 08:38:22 +01:00
Max Kellermann 90cc32f6f8 util/RefCount: remove obsolete class 2017-12-22 16:37:30 +01:00
Max Kellermann 9aec2f019a archive/File: eliminate Close(), make destructor virtual instead 2017-12-22 16:30:17 +01:00
Max Kellermann 5da455080b archive/iso9660: use std::shared_ptr instead of class RefCount 2017-12-22 16:25:08 +01:00
Max Kellermann 17558102f2 archive/zzip: use std::shared_ptr instead of class RefCount 2017-12-22 16:20:05 +01:00
Max Kellermann e1c39f3fdc archive/bz2: use std::shared_ptr instead of class RefCount 2017-12-22 16:14:12 +01:00
Max Kellermann 20555c8e37 archive/File: remove unused attribute "plugin" 2017-12-22 16:13:29 +01:00
Max Kellermann 300a619991 Merge branch 'v0.20.x' 2017-12-22 16:10:05 +01:00
Max Kellermann d094c168aa archive/{iso9660,zzip}: unlock the mutex during I/O
Similar to commit 31ab78ae8e
2017-12-22 16:09:03 +01:00
Max Kellermann 4b18460bc6 archive/bz2: unlock the archive mutex and lock the file mutex
Fixes deadlock because FileInputStream::Read() unlocks the mutex
(which was not locked) and then locks it, keeping it locked.  This can
result in a deadlock.  This happens because the archive and the file
mutex are different.
2017-12-22 16:02:23 +01:00
Max Kellermann 4319dedb23 db/update/Walk: use std::atomic_bool for the "quit" variable
Fixes thread sanitizer warnings.
2017-12-22 12:02:44 +01:00
Max Kellermann f8bb66b4e0 event/Loop: use std::atomic_bool for the "quit" variable
Fixes thread sanitizer warnings.
2017-12-22 11:04:24 +01:00
Max Kellermann 5d6a8b3840 MusicPipe: lock the mutex in Peek() and GetSize() 2017-12-22 11:03:37 +01:00
Max Kellermann 6a8c2848f6 thread/{Thread,Id}: use defaul-initialized pthread_t as "undefined" value
Use the "==" operator instead of pthread_equal().

This allows us to eliminate two boolean flags which are there to avoid
race conditions, and made the thing so fragile that I got tons of
(correct) thread sanitizer warnings.
2017-12-22 10:37:07 +01:00
Max Kellermann 6439727afc player/Thread: use std::lock_guard in RunThread() 2017-12-22 09:35:31 +01:00
Max Kellermann 27b0a581a6 player/Thread: even more fine-grained unlocking
Use one single std::lock_guard in Run(), and replace the manual
Lock()/Unlock() calls.
2017-12-22 08:09:16 +01:00
Max Kellermann 15a54230f1 player/Thread: move unlock call down
Eliminate more unlock/lock transitions, making the code more robust.
2017-12-22 01:14:51 +01:00
Max Kellermann f0d184884a player/Thread: remove obsolete commented code 2017-12-22 01:14:39 +01:00
Max Kellermann 8fca04f140 player/Thread: add missing lock for StartDecoder()
Regression from commit 0772e571b7
2017-12-22 01:12:15 +01:00
Max Kellermann 3b2b5edd26 player/Thread: move mutex lock out of SeekDecoder() 2017-12-22 01:07:13 +01:00
Max Kellermann 5bd1fbb0d6 player/Thread: merge four mutex locks in SeekDecoder() 2017-12-22 01:04:44 +01:00
Max Kellermann 0772e571b7 player/Thread: move mutex lock out of StartDecoder() 2017-12-22 01:03:12 +01:00
Max Kellermann 910496cea9 decoder/Control: caller must lock mutex for Start() 2017-12-22 01:03:01 +01:00
Max Kellermann 739e1da279 player/Thread: move mutex lock out of ActivateDecoder() 2017-12-22 00:58:57 +01:00
Max Kellermann 08b4a7aaf2 player/Thread: eliminate LockWaitDecoderStartup() 2017-12-22 00:58:42 +01:00
Max Kellermann 1f0770ca55 player/Thread: move code to SeekDecoder(SongTime) 2017-12-22 00:49:21 +01:00
Max Kellermann 505d0bfa51 player/Thread: move mutex lock out of StopDecoder() 2017-12-22 00:48:19 +01:00
Max Kellermann 860d13c7d8 decoder/Control: caller must lock mutex for Stop() 2017-12-22 00:48:12 +01:00
Max Kellermann 76d77af0f0 player/Thread: use std::lock_guard once more 2017-12-22 00:47:36 +01:00
Max Kellermann ea8ab4ddf2 player/Thread: merge two mutex locks 2017-12-22 00:42:10 +01:00
Max Kellermann 4bcc38c749 player/Thread: move mutex lock out of WaitDecoderStartup() 2017-12-22 00:41:05 +01:00
Max Kellermann 5becffbba5 player/Thread: merge two mutex locks 2017-12-22 00:39:54 +01:00
Max Kellermann d0194a6fb3 decoder/Control: caller must lock mutex for Seek() 2017-12-22 00:37:25 +01:00
Max Kellermann e45d13d469 player/Thread: add missing mutex lock around PlayerControl::SetError() 2017-12-22 00:35:18 +01:00
Max Kellermann 412c0a965c util/WStringAPI: fix indent 2017-12-21 18:45:26 +01:00
Ilya ilyxa Tyshchenko 2becf79223 correct action for compile on Solaris 11.3 X86 2017-12-21 18:42:36 +01:00
Max Kellermann a431274b32 player/Control: add "occupied" flag to skip REFRESH
Reduces main thread contention.  Avoids blocking the main thread in
"status" commands.
2017-12-21 10:25:40 +01:00
Max Kellermann 994c9a01e3 player/Control: reorder attributes to reduce padding 2017-12-21 10:25:38 +01:00
Max Kellermann ad1d5e8248 Merge branch 'v0.20.x' 2017-12-21 10:25:28 +01:00
Max Kellermann 43ec96d4a0 command/Error: translate std::{length_error,out_of_range} to ACK_ERROR_ARG 2017-12-21 10:22:04 +01:00
Max Kellermann 3d1d779da7 storage/State: use std::set instead of sorting a std::list 2017-12-21 10:22:00 +01:00