Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threads: move thread priority defines out of PlatformDefs.h #16175

Merged
merged 1 commit into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions xbmc/platform/linux/PlatformDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,6 @@ typedef struct _TIME_ZONE_INFORMATION {
#define TIME_ZONE_ID_STANDARD 1
#define TIME_ZONE_ID_DAYLIGHT 2

// Thread
#define THREAD_BASE_PRIORITY_LOWRT 15
#define THREAD_BASE_PRIORITY_MAX 2
#define THREAD_BASE_PRIORITY_MIN -2
#define THREAD_BASE_PRIORITY_IDLE -15
#define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
#define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
#define THREAD_PRIORITY_NORMAL 0
#define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
#define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)

// Network
#define SOCKET_ERROR (-1)
#define INVALID_SOCKET (~0)
Expand Down
10 changes: 10 additions & 0 deletions xbmc/threads/platform/pthreads/ThreadImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
#include <pthread.h>
#include <unistd.h>

const int THREAD_BASE_PRIORITY_LOWRT{15};
const int THREAD_BASE_PRIORITY_MAX{2};
const int THREAD_BASE_PRIORITY_MIN{-2};
const int THREAD_BASE_PRIORITY_IDLE{-15};
const int THREAD_PRIORITY_LOWEST{THREAD_BASE_PRIORITY_MIN};
const int THREAD_PRIORITY_BELOW_NORMAL{THREAD_PRIORITY_LOWEST + 1};
const int THREAD_PRIORITY_NORMAL{0};
const int THREAD_PRIORITY_HIGHEST{THREAD_BASE_PRIORITY_MAX};
const int THREAD_PRIORITY_ABOVE_NORMAL{THREAD_PRIORITY_HIGHEST - 1};

struct threadOpaque
{
pid_t LwpId;
Expand Down