View | Details | Raw Unified | Return to bug 258381
Collapse All | Expand All

(-)common/osdep.h (+5 lines)
Lines 568-575 Link Here
568
#define x264_lower_thread_priority(p)\
568
#define x264_lower_thread_priority(p)\
569
    { UNUSED status_t nice_ret = set_thread_priority( find_thread( NULL ), B_LOW_PRIORITY ); }
569
    { UNUSED status_t nice_ret = set_thread_priority( find_thread( NULL ), B_LOW_PRIORITY ); }
570
#else
570
#else
571
#if 0
572
// BUG: Don't use nice(3), it will affect the whole process, not only the calling thread!
571
#include <unistd.h>
573
#include <unistd.h>
572
#define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); }
574
#define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); }
575
#else
576
#define x264_lower_thread_priority(p)
577
#endif
573
#endif /* SYS_WINDOWS */
578
#endif /* SYS_WINDOWS */
574
#elif HAVE_WIN32THREAD
579
#elif HAVE_WIN32THREAD
575
#define x264_lower_thread_priority(p) SetThreadPriority( GetCurrentThread(), X264_MAX( -2, -p ) )
580
#define x264_lower_thread_priority(p) SetThreadPriority( GetCurrentThread(), X264_MAX( -2, -p ) )

Return to bug 258381