Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
azure-cloud-mining-script
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
azure-cloud-mining-script
Commits
31a6d3d0
There was an error fetching the commit references. Please try again later.
Commit
31a6d3d0
authored
7 years ago
by
Alejandro Domínguez
Browse files
Options
Downloads
Patches
Plain Diff
Deduplicate IO instructions in printer::print_msg
parent
3ab11077
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xmrstak/misc/console.cpp
+2
-10
2 additions, 10 deletions
xmrstak/misc/console.cpp
xmrstak/misc/console.hpp
+1
-1
1 addition, 1 deletion
xmrstak/misc/console.hpp
with
3 additions
and
11 deletions
xmrstak/misc/console.cpp
+
2
−
10
View file @
31a6d3d0
...
...
@@ -190,18 +190,10 @@ void printer::print_msg(verbosity verbose, const char* fmt, ...)
buf
[
bpos
]
=
'\n'
;
buf
[
bpos
+
1
]
=
'\0'
;
std
::
unique_lock
<
std
::
mutex
>
lck
(
print_mutex
);
fputs
(
buf
,
stdout
);
fflush
(
stdout
);
if
(
logfile
!=
nullptr
)
{
fputs
(
buf
,
logfile
);
fflush
(
logfile
);
}
print_str
(
buf
);
}
void
printer
::
print_str
(
const
char
*
str
)
inline
void
printer
::
print_str
(
const
char
*
str
)
{
std
::
unique_lock
<
std
::
mutex
>
lck
(
print_mutex
);
fputs
(
str
,
stdout
);
...
...
This diff is collapsed.
Click to expand it.
xmrstak/misc/console.hpp
+
1
−
1
View file @
31a6d3d0
...
...
@@ -36,7 +36,7 @@ public:
inline
void
set_verbose_level
(
size_t
level
)
{
verbose_level
=
(
verbosity
)
level
;
}
void
print_msg
(
verbosity
verbose
,
const
char
*
fmt
,
...);
void
print_str
(
const
char
*
str
);
inline
void
print_str
(
const
char
*
str
);
bool
open_logfile
(
const
char
*
file
);
private
:
...
...
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