[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] win32 priority



Tim,

Reading  thread_priority_win32.hpp

SetPriorityClass is for the whole process (supernova is one process with several threads)
GetCurrentProcess() gives the supernova process
usually process priority is never touched and is left as NORMAL_PRIORITY_CLASS
thread priorities are based on the process priority
SetThreadPriority is for threads in the process
THREAD_PRIORITY_IDLE is veeeery low (-15)
THREAD_PRIORITY_NORMAL (0)
THREAD_PRIORITY_TIME_CRITICAL (15)

for the combined effect in base priority here is the reference
http://msdn.microsoft.com/en-us/library/windows/desktop/ms685100%28v=vs.85%29.aspx

I am not sure about the intentions of thread_set_priority and thread_set_priority_rt

I also dont understand:

int min, max;
boost::tie(min, max) = thread_priority_interval_rt();
int priority = max - 3;
priority = std::max(min, priority);

Best
victor

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/