Skip to content

Commit

Permalink
remove conditional compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Jan 17, 2025
1 parent f5a7b60 commit e2d7eb6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/cosmotop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,19 +330,12 @@ void clean_quit(int sig) {
Runner::stop();

if (Global::_runner_started) {
#if defined __APPLE__ || defined __OpenBSD__ || defined __NetBSD__
if (pthread_join(Runner::runner_id, nullptr) != 0) {
Logger::warning("Failed to join _runner thread on exit!");
pthread_cancel(Runner::runner_id);
}
#else
struct timespec ts;
ts.tv_sec = 5;
if (pthread_timedjoin_np(Runner::runner_id, nullptr, &ts) != 0) {
Logger::warning("Failed to join _runner thread on exit!");
pthread_cancel(Runner::runner_id);
}
#endif
}

Gpu::Nvml::shutdown();
Expand Down
2 changes: 0 additions & 2 deletions src/cosmotop_tools_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ namespace Term {
current_tty = (ttyname(STDIN_FILENO) != nullptr ? static_cast<string>(ttyname(STDIN_FILENO)) : "unknown");

//? Disable stream sync - this does not seem to work on OpenBSD
#ifndef __OpenBSD__
cout.sync_with_stdio(false);
#endif

//? Disable stream ties
cout.tie(nullptr);
Expand Down

0 comments on commit e2d7eb6

Please sign in to comment.