Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0a0cc66e
Commit
0a0cc66e
authored
May 07, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
thread/Mutex: use `using` instead of making it a derived class
Prepare the transition to std::mutex.
parent
1b5c1f75
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
21 additions
and
25 deletions
+21
-25
ArchiveFile.hxx
src/archive/ArchiveFile.hxx
+2
-2
InputPlugin.hxx
src/input/InputPlugin.hxx
+1
-1
LocalOpen.hxx
src/input/LocalOpen.hxx
+1
-1
ArchiveInputPlugin.hxx
src/input/plugins/ArchiveInputPlugin.hxx
+1
-1
CurlInputPlugin.hxx
src/input/plugins/CurlInputPlugin.hxx
+1
-2
FileInputPlugin.hxx
src/input/plugins/FileInputPlugin.hxx
+1
-1
Init.hxx
src/lib/curl/Init.hxx
+3
-2
Mutex.cxx
src/lib/smbclient/Mutex.cxx
+0
-1
Mutex.hxx
src/lib/smbclient/Mutex.hxx
+1
-1
Control.hxx
src/output/Control.hxx
+0
-1
Source.hxx
src/output/Source.hxx
+1
-1
PlaylistAny.hxx
src/playlist/PlaylistAny.hxx
+1
-1
PlaylistMapper.hxx
src/playlist/PlaylistMapper.hxx
+1
-1
PlaylistPlugin.hxx
src/playlist/PlaylistPlugin.hxx
+1
-1
PlaylistRegistry.hxx
src/playlist/PlaylistRegistry.hxx
+1
-1
PlaylistStream.hxx
src/playlist/PlaylistStream.hxx
+1
-1
Aiff.hxx
src/tag/Aiff.hxx
+1
-2
Riff.hxx
src/tag/Riff.hxx
+1
-2
Mutex.hxx
src/thread/Mutex.hxx
+2
-2
No files found.
src/archive/ArchiveFile.hxx
View file @
0a0cc66e
/*
/*
* Copyright 2003-201
8
The Music Player Daemon Project
* Copyright 2003-201
9
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#define MPD_ARCHIVE_FILE_HXX
#define MPD_ARCHIVE_FILE_HXX
#include "input/Ptr.hxx"
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
class
Mutex
;
class
ArchiveVisitor
;
class
ArchiveVisitor
;
class
ArchiveFile
{
class
ArchiveFile
{
...
...
src/input/InputPlugin.hxx
View file @
0a0cc66e
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
#define MPD_INPUT_PLUGIN_HXX
#define MPD_INPUT_PLUGIN_HXX
#include "Ptr.hxx"
#include "Ptr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include "util/Compiler.h"
struct
ConfigBlock
;
struct
ConfigBlock
;
class
Mutex
;
class
EventLoop
;
class
EventLoop
;
class
RemoteTagScanner
;
class
RemoteTagScanner
;
class
RemoteTagHandler
;
class
RemoteTagHandler
;
...
...
src/input/LocalOpen.hxx
View file @
0a0cc66e
...
@@ -21,9 +21,9 @@
...
@@ -21,9 +21,9 @@
#define MPD_INPUT_LOCAL_OPEN_HXX
#define MPD_INPUT_LOCAL_OPEN_HXX
#include "Ptr.hxx"
#include "Ptr.hxx"
#include "thread/Mutex.hxx"
class
Path
;
class
Path
;
class
Mutex
;
/**
/**
* Open a "local" file. This is a wrapper for the input plugins
* Open a "local" file. This is a wrapper for the input plugins
...
...
src/input/plugins/ArchiveInputPlugin.hxx
View file @
0a0cc66e
...
@@ -21,9 +21,9 @@
...
@@ -21,9 +21,9 @@
#define MPD_INPUT_ARCHIVE_HXX
#define MPD_INPUT_ARCHIVE_HXX
#include "input/Ptr.hxx"
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
class
Path
;
class
Path
;
class
Mutex
;
InputStreamPtr
InputStreamPtr
OpenArchiveInputStream
(
Path
path
,
Mutex
&
mutex
);
OpenArchiveInputStream
(
Path
path
,
Mutex
&
mutex
);
...
...
src/input/plugins/CurlInputPlugin.hxx
View file @
0a0cc66e
...
@@ -21,12 +21,11 @@
...
@@ -21,12 +21,11 @@
#define MPD_INPUT_CURL_HXX
#define MPD_INPUT_CURL_HXX
#include "input/Ptr.hxx"
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
#include <string>
#include <string>
#include <map>
#include <map>
class
Mutex
;
extern
const
struct
InputPlugin
input_plugin_curl
;
extern
const
struct
InputPlugin
input_plugin_curl
;
/**
/**
...
...
src/input/plugins/FileInputPlugin.hxx
View file @
0a0cc66e
...
@@ -21,9 +21,9 @@
...
@@ -21,9 +21,9 @@
#define MPD_INPUT_FILE_HXX
#define MPD_INPUT_FILE_HXX
#include "input/Ptr.hxx"
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
class
Path
;
class
Path
;
class
Mutex
;
InputStreamPtr
InputStreamPtr
OpenFileInputStream
(
Path
path
,
Mutex
&
mutex
);
OpenFileInputStream
(
Path
path
,
Mutex
&
mutex
);
...
...
src/lib/curl/Init.hxx
View file @
0a0cc66e
/*
/*
* Copyright
(C) 2008-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2008-2019
Max Kellermann <max.kellermann@gmail.com>
*
*
* Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* modification, are permitted provided that the following conditions
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
#ifndef CURL_INIT_HXX
#ifndef CURL_INIT_HXX
#define CURL_INIT_HXX
#define CURL_INIT_HXX
class
Mutex
;
#include "thread/Mutex.hxx"
class
EventLoop
;
class
EventLoop
;
class
CurlGlobal
;
class
CurlGlobal
;
...
...
src/lib/smbclient/Mutex.cxx
View file @
0a0cc66e
...
@@ -18,6 +18,5 @@
...
@@ -18,6 +18,5 @@
*/
*/
#include "Mutex.hxx"
#include "Mutex.hxx"
#include "thread/Mutex.hxx"
Mutex
smbclient_mutex
;
Mutex
smbclient_mutex
;
src/lib/smbclient/Mutex.hxx
View file @
0a0cc66e
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#ifndef MPD_SMBCLIENT_MUTEX_HXX
#ifndef MPD_SMBCLIENT_MUTEX_HXX
#define MPD_SMBCLIENT_MUTEX_HXX
#define MPD_SMBCLIENT_MUTEX_HXX
class
Mutex
;
#include "thread/Mutex.hxx"
/**
/**
* Since libsmbclient is not thread-safe, this mutex must be locked
* Since libsmbclient is not thread-safe, this mutex must be locked
...
...
src/output/Control.hxx
View file @
0a0cc66e
...
@@ -45,7 +45,6 @@ struct FilteredAudioOutput;
...
@@ -45,7 +45,6 @@ struct FilteredAudioOutput;
struct
MusicChunk
;
struct
MusicChunk
;
struct
ConfigBlock
;
struct
ConfigBlock
;
class
MusicPipe
;
class
MusicPipe
;
class
Mutex
;
class
Mixer
;
class
Mixer
;
class
AudioOutputClient
;
class
AudioOutputClient
;
...
...
src/output/Source.hxx
View file @
0a0cc66e
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "ReplayGainMode.hxx"
#include "ReplayGainMode.hxx"
#include "pcm/PcmBuffer.hxx"
#include "pcm/PcmBuffer.hxx"
#include "pcm/PcmDither.hxx"
#include "pcm/PcmDither.hxx"
#include "thread/Mutex.hxx"
#include "util/ConstBuffer.hxx"
#include "util/ConstBuffer.hxx"
#include <utility>
#include <utility>
...
@@ -36,7 +37,6 @@
...
@@ -36,7 +37,6 @@
struct
MusicChunk
;
struct
MusicChunk
;
struct
Tag
;
struct
Tag
;
class
Mutex
;
class
Filter
;
class
Filter
;
class
PreparedFilter
;
class
PreparedFilter
;
...
...
src/playlist/PlaylistAny.hxx
View file @
0a0cc66e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
#ifndef MPD_PLAYLIST_ANY_HXX
#ifndef MPD_PLAYLIST_ANY_HXX
#define MPD_PLAYLIST_ANY_HXX
#define MPD_PLAYLIST_ANY_HXX
#include "thread/Mutex.hxx"
#include "config.h"
#include "config.h"
#include <memory>
#include <memory>
class
Mutex
;
class
SongEnumerator
;
class
SongEnumerator
;
class
Storage
;
class
Storage
;
...
...
src/playlist/PlaylistMapper.hxx
View file @
0a0cc66e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
#ifndef MPD_PLAYLIST_MAPPER_HXX
#ifndef MPD_PLAYLIST_MAPPER_HXX
#define MPD_PLAYLIST_MAPPER_HXX
#define MPD_PLAYLIST_MAPPER_HXX
#include "thread/Mutex.hxx"
#include "config.h"
#include "config.h"
#include <memory>
#include <memory>
class
Mutex
;
class
SongEnumerator
;
class
SongEnumerator
;
class
Storage
;
class
Storage
;
...
...
src/playlist/PlaylistPlugin.hxx
View file @
0a0cc66e
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
#define MPD_PLAYLIST_PLUGIN_HXX
#define MPD_PLAYLIST_PLUGIN_HXX
#include "input/Ptr.hxx"
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
struct
ConfigBlock
;
struct
ConfigBlock
;
struct
Tag
;
struct
Tag
;
class
Mutex
;
class
SongEnumerator
;
class
SongEnumerator
;
struct
playlist_plugin
{
struct
playlist_plugin
{
...
...
src/playlist/PlaylistRegistry.hxx
View file @
0a0cc66e
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
#define MPD_PLAYLIST_REGISTRY_HXX
#define MPD_PLAYLIST_REGISTRY_HXX
#include "input/Ptr.hxx"
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include "util/Compiler.h"
struct
ConfigData
;
struct
ConfigData
;
class
Mutex
;
class
SongEnumerator
;
class
SongEnumerator
;
extern
const
struct
playlist_plugin
*
const
playlist_plugins
[];
extern
const
struct
playlist_plugin
*
const
playlist_plugins
[];
...
...
src/playlist/PlaylistStream.hxx
View file @
0a0cc66e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
#ifndef MPD_PLAYLIST_STREAM_HXX
#ifndef MPD_PLAYLIST_STREAM_HXX
#define MPD_PLAYLIST_STREAM_HXX
#define MPD_PLAYLIST_STREAM_HXX
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include "util/Compiler.h"
#include <memory>
#include <memory>
class
Mutex
;
class
SongEnumerator
;
class
SongEnumerator
;
class
Path
;
class
Path
;
...
...
src/tag/Aiff.hxx
View file @
0a0cc66e
...
@@ -25,12 +25,11 @@
...
@@ -25,12 +25,11 @@
#ifndef MPD_AIFF_HXX
#ifndef MPD_AIFF_HXX
#define MPD_AIFF_HXX
#define MPD_AIFF_HXX
#include
<mutex>
#include
"thread/Mutex.hxx"
#include <stddef.h>
#include <stddef.h>
class
InputStream
;
class
InputStream
;
class
Mutex
;
/**
/**
* Seeks the AIFF file to the ID3 chunk.
* Seeks the AIFF file to the ID3 chunk.
...
...
src/tag/Riff.hxx
View file @
0a0cc66e
...
@@ -25,11 +25,10 @@
...
@@ -25,11 +25,10 @@
#ifndef MPD_RIFF_HXX
#ifndef MPD_RIFF_HXX
#define MPD_RIFF_HXX
#define MPD_RIFF_HXX
#include
<mutex>
#include
"thread/Mutex.hxx"
#include <stddef.h>
#include <stddef.h>
class
Mutex
;
class
InputStream
;
class
InputStream
;
/**
/**
...
...
src/thread/Mutex.hxx
View file @
0a0cc66e
...
@@ -35,12 +35,12 @@
...
@@ -35,12 +35,12 @@
#ifdef _WIN32
#ifdef _WIN32
#include "CriticalSection.hxx"
#include "CriticalSection.hxx"
class
Mutex
:
public
CriticalSection
{}
;
using
Mutex
=
CriticalSection
;
#else
#else
#include "PosixMutex.hxx"
#include "PosixMutex.hxx"
class
Mutex
:
public
PosixMutex
{}
;
using
Mutex
=
PosixMutex
;
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment