public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/mysql-extras:master commit in: pbxt/
@ 2013-01-28  0:59 Robin H. Johnson
  0 siblings, 0 replies; only message in thread
From: Robin H. Johnson @ 2013-01-28  0:59 UTC (permalink / raw
  To: gentoo-commits

commit:     61eb939f552d0a789d85c0dc36349f6fd7fa97d1
Author:     Brian Evans <grknight <AT> lavabit <DOT> com>
AuthorDate: Tue Jan 22 03:44:08 2013 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Jan 22 04:00:39 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/mysql-extras.git;a=commit;h=61eb939f

Add PBXT low priority patch for bug 374349

---
 pbxt/fix-low-priority.patch |   54 +++++++++++++++++++++++++++++++++++++++++++
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-28  0:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28  0:59 [gentoo-commits] proj/mysql-extras:master commit in: pbxt/ Robin H. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox