mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-21 17:24:37 -05:00
26 lines
462 B
C++
26 lines
462 B
C++
#include <switch.h>
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
|
|
#include "type.h"
|
|
|
|
void threadStatus::setStatus(const char *fmt, ...)
|
|
{
|
|
char tmp[1024];
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
vsprintf(tmp, fmt, args);
|
|
va_end(args);
|
|
|
|
mutexLock(&statusLock);
|
|
status = tmp;
|
|
mutexUnlock(&statusLock);
|
|
}
|
|
|
|
void threadStatus::getStatus(std::string& statusOut)
|
|
{
|
|
mutexLock(&statusLock);
|
|
statusOut = status;
|
|
mutexUnlock(&statusLock);
|
|
}
|