DragonFly commits List (threaded) for 2007-05
DragonFly BSD
DragonFly commits List (threaded) for 2007-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[patch] Re: cvs commit: src/lib/libthread_xu/thread thr_attr.c thr_getschedparam.c thr_kern.c thr_private.h thr_setschedparam.c


From: Aggelos Economopoulos <aoiko@xxxxxxxxxxxxxx>
Date: Fri, 4 May 2007 12:22:48 +0300

On Friday 04 May 2007 02:08, Matthew Dillon wrote:

>   1.6       +35 -37    src/lib/libthread_xu/thread/thr_setschedparam.c

Can anyone spot the copy-paste error in this file? Hint attached :)

(unfortunately the code below was correct so userland still kept track of the 
prio values (so that my test prog didn't notice anything) but it changed the 
kernel priority for the current thread only)

Aggelos
Index: thread/thr_setschedparam.c
===================================================================
RCS file: /home/aggelos/imports/vcs/dcvs/src/lib/libthread_xu/thread/thr_setschedparam.c,v
retrieving revision 1.6
diff -u -u -r1.6 thr_setschedparam.c
--- thread/thr_setschedparam.c	3 May 2007 23:08:34 -0000	1.6
+++ thread/thr_setschedparam.c	4 May 2007 09:11:09 -0000
@@ -78,10 +78,10 @@
 			return (0);
 		}
 		if (policy == SCHED_OTHER) {
-			ret = _thr_set_sched_other_prio(curthread,
+			ret = _thr_set_sched_other_prio(pthread,
 						param->sched_priority);
 		} else {
-			ret = _thr_setscheduler(curthread->tid, policy, param);
+			ret = _thr_setscheduler(pthread->tid, policy, param);
 		}
 		if (ret == -1)
 			ret = errno;


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