summaryrefslogtreecommitdiff
path: root/pbxt
diff options
context:
space:
mode:
authorBrian Evans <grknight@lavabit.com>2013-01-21 22:44:08 -0500
committerBrian Evans <grknight@lavabit.com>2013-01-21 23:00:39 -0500
commit61eb939f552d0a789d85c0dc36349f6fd7fa97d1 (patch)
tree68e401289c863ac4d61c8eb0976a9c2aa79c17c7 /pbxt
parentPatch for bug 442000. Use empty va_list across all arches. (diff)
downloadmysql-extras-61eb939f552d0a789d85c0dc36349f6fd7fa97d1.tar.gz
mysql-extras-61eb939f552d0a789d85c0dc36349f6fd7fa97d1.tar.bz2
mysql-extras-61eb939f552d0a789d85c0dc36349f6fd7fa97d1.zip
Add PBXT low priority patch for bug 374349mysql-extras-20130128-0054Z
Diffstat (limited to 'pbxt')
-rw-r--r--pbxt/fix-low-priority.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/pbxt/fix-low-priority.patch b/pbxt/fix-low-priority.patch
new file mode 100644
index 0000000..20bb8ea
--- /dev/null
+++ b/pbxt/fix-low-priority.patch
@@ -0,0 +1,54 @@
+--- pbxt/src/pthread_xt.old.cc 2010-04-29 06:14:56.000000000 -0400
++++ pbxt/src/pthread_xt.cc 2013-01-20 00:12:58.000000000 -0500
+@@ -547,42 +547,23 @@
+
+ xtPublic int xt_p_set_low_priority(pthread_t thr)
+ {
+- if (pth_min_priority == pth_max_priority) {
+- /* Under Linux the priority of normal (non-runtime)
+- * threads are set using the standard methods
+- * for setting process priority.
+- */
+-
+- /* We could set who == 0 because it should have the same affect
+- * as using the PID.
+- */
+-
+- /* -20 = highest, 20 = lowest */
+- if (setpriority(PRIO_PROCESS, getpid(), 20) == -1)
+- return errno;
+- return 0;
+- }
+- return pth_set_priority(thr, pth_min_priority);
++ if (pth_min_priority != pth_max_priority)
++ return pth_set_priority(thr, pth_min_priority);
++ return 0;
+ }
+
+ xtPublic int xt_p_set_normal_priority(pthread_t thr)
+ {
+- if (pth_min_priority == pth_max_priority) {
+- if (setpriority(PRIO_PROCESS, getpid(), 0) == -1)
+- return errno;
+- return 0;
+- }
+- return pth_set_priority(thr, pth_normal_priority);
++ if (pth_min_priority != pth_max_priority)
++ return pth_set_priority(thr, pth_normal_priority);
++ return 0;
+ }
+
+ xtPublic int xt_p_set_high_priority(pthread_t thr)
+ {
+- if (pth_min_priority == pth_max_priority) {
+- if (setpriority(PRIO_PROCESS, getpid(), -20) == -1)
+- return errno;
+- return 0;
+- }
+- return pth_set_priority(thr, pth_max_priority);
++ if (pth_min_priority != pth_max_priority)
++ return pth_set_priority(thr, pth_max_priority);
++ return 0;
+ }
+
+ #ifdef DEBUG_LOCKING