mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
rename globals print_lock
This commit is contained in:
parent
7ce86a0de9
commit
b02fef5c70
2 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ double g_GridOffset = 0;
|
||||||
bool g_GridLocked = false;
|
bool g_GridLocked = false;
|
||||||
bool showDemod = true;
|
bool showDemod = true;
|
||||||
|
|
||||||
pthread_mutex_t print_lock = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t g_print_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
static void fPrintAndLog(FILE *stream, const char *fmt, ...);
|
static void fPrintAndLog(FILE *stream, const char *fmt, ...);
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ static void fPrintAndLog(FILE *stream, const char *fmt, ...) {
|
||||||
char buffer2[MAX_PRINT_BUFFER] = {0};
|
char buffer2[MAX_PRINT_BUFFER] = {0};
|
||||||
char buffer3[MAX_PRINT_BUFFER] = {0};
|
char buffer3[MAX_PRINT_BUFFER] = {0};
|
||||||
// lock this section to avoid interlacing prints from different threads
|
// lock this section to avoid interlacing prints from different threads
|
||||||
pthread_mutex_lock(&print_lock);
|
pthread_mutex_lock(&g_print_lock);
|
||||||
bool linefeed = true;
|
bool linefeed = true;
|
||||||
|
|
||||||
if (logging && session.incognito) {
|
if (logging && session.incognito) {
|
||||||
|
@ -405,7 +405,7 @@ static void fPrintAndLog(FILE *stream, const char *fmt, ...) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
//release lock
|
//release lock
|
||||||
pthread_mutex_unlock(&print_lock);
|
pthread_mutex_unlock(&g_print_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetFlushAfterWrite(bool value) {
|
void SetFlushAfterWrite(bool value) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ void memcpy_filter_emoji(void *dest, const void *src, size_t n, emojiMode_t mode
|
||||||
|
|
||||||
int searchHomeFilePath(char **foundpath, const char *subdir, const char *filename, bool create_home);
|
int searchHomeFilePath(char **foundpath, const char *subdir, const char *filename, bool create_home);
|
||||||
|
|
||||||
extern pthread_mutex_t print_lock;
|
extern pthread_mutex_t g_print_lock;
|
||||||
|
|
||||||
void print_progress(size_t count, uint64_t max, barMode_t style);
|
void print_progress(size_t count, uint64_t max, barMode_t style);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue