Utilities: Change return type for GetThreadId and SetThreadIOPriority to long
This commit is contained in:
@@ -658,7 +658,7 @@ QString DecodeHtmlEntities(const QString &text) {
|
||||
|
||||
}
|
||||
|
||||
int SetThreadIOPriority(const IoPriority priority) {
|
||||
long SetThreadIOPriority(const IoPriority priority) {
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
return syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, GetThreadId(), 4 | priority << IOPRIO_CLASS_SHIFT);
|
||||
@@ -671,7 +671,7 @@ int SetThreadIOPriority(const IoPriority priority) {
|
||||
|
||||
}
|
||||
|
||||
int GetThreadId() {
|
||||
long GetThreadId() {
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
return syscall(SYS_gettid);
|
||||
|
||||
@@ -122,8 +122,8 @@ enum IoPriority {
|
||||
};
|
||||
static const int IOPRIO_CLASS_SHIFT = 13;
|
||||
|
||||
int SetThreadIOPriority(const IoPriority priority);
|
||||
int GetThreadId();
|
||||
long SetThreadIOPriority(const IoPriority priority);
|
||||
long GetThreadId();
|
||||
|
||||
QString GetRandomStringWithChars(const int len);
|
||||
QString GetRandomStringWithCharsAndNumbers(const int len);
|
||||
|
||||
Reference in New Issue
Block a user