[Linux-hls-cvs] hls/linux hls_ctl.c,1.10,1.11 init.c,1.10,1.11 sched.c,1.3,NONE
Status: Pre-Alpha
Brought to you by:
lucabe
|
From: Luca A. <lu...@us...> - 2004-07-18 18:39:43
|
Update of /cvsroot/linux-hls/hls/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2678/linux Modified Files: hls_ctl.c init.c Removed Files: sched.c Log Message: - Committed the new version of the gensched patch (I erroneously committed a wrong patch) - Port the hls module to the new gensched interface (setscheduler and getscheduler changed) - Some fixes... Index: init.c =================================================================== RCS file: /cvsroot/linux-hls/hls/linux/init.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** init.c 13 Dec 2003 12:27:15 -0000 1.10 --- init.c 18 Jul 2004 18:39:31 -0000 1.11 *************** *** 40,44 **** /* FIXME: These prototypes should be removed... */ ! int hls_setsched(pid_t pid, int policy, struct sched_param *param); extern void HLSInit(void); extern void HLSDeinit (void); --- 40,44 ---- /* FIXME: These prototypes should be removed... */ ! int hls_setsched(struct task *p, int policy, struct sched_param *param); extern void HLSInit(void); extern void HLSDeinit (void); --- sched.c DELETED --- Index: hls_ctl.c =================================================================== RCS file: /cvsroot/linux-hls/hls/linux/hls_ctl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** hls_ctl.c 14 Mar 2004 14:45:07 -0000 1.10 --- hls_ctl.c 18 Jul 2004 18:39:31 -0000 1.11 *************** *** 288,292 **** return -EINVAL; } ! return sched_p.sp.sched_priority; } --- 288,295 ---- return -EINVAL; } ! if ((sched_p.sp.sched_priority < 0) || (sched_p.sp.sched_priority > HLS_MAXIMUM_PRIORITY)){ ! return 0; ! } ! return sched_p.sp.sched_priority; } *************** *** 300,320 **** return -EFAULT; } - printk("Parse priority: %d\n", sched_p.sp.sched_priority); return sched_p.sp.sched_priority; } - static inline struct task_struct *find_process_by_pid(pid_t pid) - { - struct task_struct *tsk = current; - - if (pid) { - tsk = find_task_by_pid(pid); - } - - return tsk; - } - - /* Return value: * < 0 ---> Failure --- 303,310 ---- *************** *** 322,328 **** * > 0 ---> do the regular Linux thing... */ ! int hls_setsched(pid_t pid, int policy, struct sched_param *param) { - struct task_struct *p; unsigned long flags; char sp[HLS_PARMS_SIZE]; --- 312,317 ---- * > 0 ---> do the regular Linux thing... */ ! int hls_setsched(struct task_struct *p, int policy, struct sched_param *param) { unsigned long flags; char sp[HLS_PARMS_SIZE]; *************** *** 334,338 **** spin_lock_irqsave(&hls_lock, flags); - p = find_process_by_pid(pid); if (p == NULL) { spin_unlock_irqrestore(&hls_lock, flags); --- 323,326 ---- *************** *** 420,424 **** res = hls_ctl(p, s, sched_param, priority); - spin_unlock_irqrestore(&hls_lock, flags); --- 408,411 ---- |