Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
fd2d2615
Commit
fd2d2615
authored
11 years ago
by
Eric Cano
Browse files
Options
Downloads
Plain Diff
Caught up with master branch.
parents
68b6c046
604a07d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/log/Log.cpp
+21
-1
21 additions, 1 deletion
castor/log/Log.cpp
with
21 additions
and
1 deletion
castor/log/Log.cpp
+
21
−
1
View file @
fd2d2615
...
...
@@ -138,12 +138,32 @@ void castor::log::Log::checkProgramNameLen(const std::string &programName)
// initMutex
//------------------------------------------------------------------------------
void
castor
::
log
::
Log
::
initMutex
()
throw
(
castor
::
exception
::
Internal
)
{
const
int
rc
=
pthread_mutex_init
(
&
m_mutex
,
NULL
);
pthread_mutexattr_t
attr
;
int
rc
=
pthread_mutexattr_init
(
&
attr
);
if
(
0
!=
rc
)
{
castor
::
exception
::
Internal
ex
;
ex
.
getMessage
()
<<
"Failed to initialize mutex attribute: "
<<
sstrerror
(
rc
);
throw
ex
;
}
rc
=
pthread_mutexattr_settype
(
&
attr
,
PTHREAD_MUTEX_ERRORCHECK
);
if
(
0
!=
rc
)
{
castor
::
exception
::
Internal
ex
;
ex
.
getMessage
()
<<
"Failed to set mutex type: "
<<
sstrerror
(
rc
);
throw
ex
;
}
rc
=
pthread_mutex_init
(
&
m_mutex
,
NULL
);
if
(
0
!=
rc
)
{
castor
::
exception
::
Internal
ex
;
ex
.
getMessage
()
<<
"Failed to initialize m_mutex: "
<<
sstrerror
(
rc
);
throw
ex
;
}
rc
=
pthread_mutexattr_destroy
(
&
attr
);
if
(
0
!=
rc
)
{
pthread_mutex_destroy
(
&
m_mutex
);
castor
::
exception
::
Internal
ex
;
ex
.
getMessage
()
<<
"Failed to destroy mutex attribute: "
<<
sstrerror
(
rc
);
throw
ex
;
}
}
//------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment