mirror of
https://github.com/aristocratos/btop.git
synced 2026-02-07 04:42:28 -05:00
refactor: get rid of extern runner thread id
This commit is contained in:
@@ -124,6 +124,10 @@ namespace Global {
|
||||
atomic<bool> reload_conf (false);
|
||||
}
|
||||
|
||||
namespace Runner {
|
||||
static pthread_t runner_id;
|
||||
} // namespace Runner
|
||||
|
||||
//* Handler for SIGWINCH and general resizing events, does nothing if terminal hasn't been resized unless force=true
|
||||
void term_resize(bool force) {
|
||||
static atomic<bool> resizing (false);
|
||||
@@ -355,7 +359,7 @@ namespace Runner {
|
||||
atomic<bool> waiting (false);
|
||||
atomic<bool> redraw (false);
|
||||
atomic<bool> coreNum_reset (false);
|
||||
|
||||
|
||||
static inline auto set_active(bool value) noexcept {
|
||||
active.store(value, std::memory_order_relaxed);
|
||||
active.notify_all();
|
||||
@@ -408,7 +412,6 @@ namespace Runner {
|
||||
string empty_bg;
|
||||
bool pause_output{};
|
||||
sigset_t mask;
|
||||
pthread_t runner_id;
|
||||
pthread_mutex_t mtx;
|
||||
|
||||
enum debug_actions {
|
||||
|
||||
@@ -76,13 +76,11 @@ namespace Runner {
|
||||
extern atomic<bool> stopping;
|
||||
extern atomic<bool> redraw;
|
||||
extern atomic<bool> coreNum_reset;
|
||||
extern pthread_t runner_id;
|
||||
extern bool pause_output;
|
||||
extern string debug_bg;
|
||||
|
||||
void run(const string& box="", bool no_update = false, bool force_redraw = false);
|
||||
void run(const string& box = "", bool no_update = false, bool force_redraw = false);
|
||||
void stop();
|
||||
|
||||
}
|
||||
|
||||
namespace Tools {
|
||||
|
||||
@@ -29,7 +29,6 @@ tab-size = 4
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <limits.h>
|
||||
#include <pthread.h>
|
||||
#include <ranges>
|
||||
#include <regex>
|
||||
#include <string>
|
||||
|
||||
Reference in New Issue
Block a user