- remove mlockall in timerloop
authorgreg
Wed, 07 May 2008 14:46:06 +0200
changeset 459 ddd1a31b7960
parent 458 a3906286b09b
child 460 48cd190df6f7
- remove mlockall in timerloop
- move rt_task_delete from timerloop to TimerCleanup
drivers/timers_xeno/timers_xeno.c
--- a/drivers/timers_xeno/timers_xeno.c	Tue May 06 15:31:33 2008 +0200
+++ b/drivers/timers_xeno/timers_xeno.c	Wed May 07 14:46:06 2008 +0200
@@ -37,6 +37,7 @@
   	int ret = 0;
   	char taskname[32];
 
+	// lock process in to RAM
   	mlockall(MCL_CURRENT | MCL_FUTURE);
 
   	snprintf(taskname, sizeof(taskname), "S1-%d", getpid());
@@ -77,6 +78,7 @@
 	rt_mutex_delete(&condition_mutex);
 	rt_cond_delete(&timer_set);
 	rt_sem_delete(&control_task);
+	rt_task_delete(&timerloop_task);
 }
 
 /**
@@ -103,8 +105,6 @@
 void timerloop_task_proc(void *arg)
 {
 	int ret = 0;
-  	// lock process in to RAM
-  	mlockall(MCL_CURRENT | MCL_FUTURE);
 
 	getElapsedTime();
 	last_timeout_set = 0;
@@ -149,8 +149,6 @@
 		exitall(NULL,0);
 		LeaveMutex();
 	}
-	
-	rt_task_delete(&timerloop_task);
 }
 
 /**