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
51a8c109
Commit
51a8c109
authored
Jan 10, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
thread/PosixMutex: fix indent
parent
ea25e0ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
PosixMutex.hxx
src/thread/PosixMutex.hxx
+13
-13
No files found.
src/thread/PosixMutex.hxx
View file @
51a8c109
...
...
@@ -36,25 +36,25 @@
* Low-level wrapper for a pthread_mutex_t.
*/
class
PosixMutex
{
pthread_mutex_t
mutex
;
pthread_mutex_t
mutex
;
public
:
constexpr
PosixMutex
()
:
mutex
(
PTHREAD_MUTEX_INITIALIZER
)
{}
constexpr
PosixMutex
()
:
mutex
(
PTHREAD_MUTEX_INITIALIZER
)
{}
PosixMutex
(
const
PosixMutex
&
other
)
=
delete
;
PosixMutex
&
operator
=
(
const
PosixMutex
&
other
)
=
delete
;
PosixMutex
(
const
PosixMutex
&
other
)
=
delete
;
PosixMutex
&
operator
=
(
const
PosixMutex
&
other
)
=
delete
;
void
lock
()
{
pthread_mutex_lock
(
&
mutex
);
}
void
lock
()
{
pthread_mutex_lock
(
&
mutex
);
}
bool
try_lock
()
{
return
pthread_mutex_trylock
(
&
mutex
)
==
0
;
}
bool
try_lock
()
{
return
pthread_mutex_trylock
(
&
mutex
)
==
0
;
}
void
unlock
()
{
pthread_mutex_unlock
(
&
mutex
);
}
void
unlock
()
{
pthread_mutex_unlock
(
&
mutex
);
}
};
#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