[Linux-hls-cvs] hls/linux Makefile,1.8,1.9 export.c,1.2,1.3 init.c,1.9,1.10 procfs.c,1.8,1.9
Status: Pre-Alpha
Brought to you by:
lucabe
|
From: <lu...@us...> - 2003-12-13 12:27:18
|
Update of /cvsroot/linux-hls/hls/linux
In directory sc8-pr-cvs1:/tmp/cvs-serv15989/linux
Modified Files:
Makefile export.c init.c procfs.c
Log Message:
- Misc cleanups
- Unbreak modular compilation
- Provide a way to move all the tasks away from HLS (echo null > /proc/HLS/default)
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-hls/hls/linux/Makefile,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Makefile 29 Nov 2003 11:59:01 -0000 1.8
--- Makefile 13 Dec 2003 12:27:15 -0000 1.9
***************
*** 25,30 ****
OBJS = hls_sched_th.o hls_hooks.o hls_sched_root.o hls_sched_join.o \
! hls_utils.o hls_names.o hls_ctl.o hls_timers.o hls_debug.o \
init.o bottom.o misc.o procfs.o
ifdef DEBUG
--- 25,32 ----
OBJS = hls_sched_th.o hls_hooks.o hls_sched_root.o hls_sched_join.o \
! hls_names.o hls_ctl.o hls_timers.o hls_debug.o \
! hls_init.o hls_instances.o hls_params.o \
init.o bottom.o misc.o procfs.o
+ # hls_utils.o
ifdef DEBUG
Index: export.c
===================================================================
RCS file: /cvsroot/linux-hls/hls/linux/export.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** export.c 25 Feb 2003 09:18:55 -0000 1.2
--- export.c 13 Dec 2003 12:27:15 -0000 1.3
***************
*** 28,30 ****
--- 28,31 ----
#ifdef HLS_DEBUG
EXPORT_SYMBOL(VPStateName);
+ EXPORT_SYMBOL(HLS_DBG_PRINT_LEVEL);
#endif /* HLS_DEBUG */
Index: init.c
===================================================================
RCS file: /cvsroot/linux-hls/hls/linux/init.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** init.c 29 Nov 2003 11:59:01 -0000 1.9
--- init.c 13 Dec 2003 12:27:15 -0000 1.10
***************
*** 116,119 ****
--- 116,139 ----
}
+ void hls_release_tasks(void)
+ {
+ struct task_struct *t;
+
+ t = current;
+ for_each_task(t) {
+ if (t->private_data != NULL) {
+ #ifdef VERBOSE
+ printk("Removing task %d from HLS\n", t->pid);
+ #endif
+
+ if (t->state == TASK_RUNNING) {
+ hls_block_other_thread(t);
+ }
+ HLSExitThreadHook(t);
+ t->private_data = 0;
+ t->policy = SCHED_OTHER;
+ }
+ }
+ }
int init_module(void)
***************
*** 152,156 ****
cleanup_hook = hls_bottom_vp_unregister;
setsched_hook = hls_setsched;
!
HLSInit();
/*
--- 172,176 ----
cleanup_hook = hls_bottom_vp_unregister;
setsched_hook = hls_setsched;
!
HLSInit();
/*
***************
*** 169,173 ****
void cleanup_module(void)
{
- struct task_struct *t;
unsigned long flags;
--- 189,192 ----
***************
*** 176,195 ****
#endif
! t = current;
!
! for_each_task(t) {
! if (t->private_data != NULL) {
! #ifdef VERBOSE
! printk("Removing task %d from HLS\n", t->pid);
! #endif
!
! if (t->state == TASK_RUNNING) {
! hls_block_other_thread(t);
! }
! HLSExitThreadHook(t);
! t->private_data = 0;
! t->policy = SCHED_OTHER;
! }
! }
HLSDeinit();
--- 195,199 ----
#endif
! hls_release_tasks();
HLSDeinit();
Index: procfs.c
===================================================================
RCS file: /cvsroot/linux-hls/hls/linux/procfs.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** procfs.c 29 Nov 2003 09:11:35 -0000 1.8
--- procfs.c 13 Dec 2003 12:27:15 -0000 1.9
***************
*** 104,113 ****
schedname[c - 1] = 0;
! sched = HLSFindInstByName(schedname);
! if (sched == NULL) {
! printk("Cannot find %s\n", schedname);
! return c;
}
--- 104,119 ----
schedname[c - 1] = 0;
! if (memcmp(schedname, "null", 4)) {
! printk("Searching for %s\n", schedname);
! sched = HLSFindInstByName(schedname);
! if (sched == NULL) {
! printk("Cannot find %s\n", schedname);
! return c;
! }
! } else {
! printk("Schedname = NULL\n");
! sched = NULL;
}
|