[PATCH 3/3] os: simplify smart scheduler init process

Tiago Vignatti tiago.vignatti at nokia.com
Tue Sep 7 05:39:19 PDT 2010


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 include/dixstruct.h |    2 +-
 os/osinit.c         |    4 +---
 os/utils.c          |    9 ++++-----
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/include/dixstruct.h b/include/dixstruct.h
index efa2577..8547b16 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -136,7 +136,7 @@ extern _X_EXPORT void SmartScheduleStopTimer(void);
 #define SMART_MAX_PRIORITY  (20)
 #define SMART_MIN_PRIORITY  (-20)
 
-extern _X_EXPORT Bool SmartScheduleInit(void);
+extern _X_EXPORT void SmartScheduleInit(void);
 
 
 /* This prototype is used pervasively in Xext, dix */
diff --git a/os/osinit.c b/os/osinit.c
index 98c27cc..1cdc299 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -294,9 +294,7 @@ OsInit(void)
      * log file name if logging to a file is desired.
      */
     LogInit(NULL, NULL);
-    if (!SmartScheduleDisable)
-	if (!SmartScheduleInit ())
-	    SmartScheduleDisable = TRUE;
+    SmartScheduleInit ();
 }
 
 void
diff --git a/os/utils.c b/os/utils.c
index bf3d615..6f411ef 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1150,14 +1150,14 @@ SmartScheduleTimer (int sig)
     SmartScheduleTime += SmartScheduleInterval;
 }
 
-Bool
+void
 SmartScheduleInit (void)
 {
     struct sigaction	act;
 
     if (SmartScheduleDisable)
-	return TRUE;
-    
+	return;
+
     memset((char *) &act, 0, sizeof(struct sigaction));
 
     /* Set up the timer signal function */
@@ -1167,9 +1167,8 @@ SmartScheduleInit (void)
     if (sigaction (SIGALRM, &act, 0) < 0)
     {
 	perror ("sigaction for smart scheduler");
-	return FALSE;
+	SmartScheduleDisable = TRUE;
     }
-    return TRUE;
 }
 
 #ifdef SIG_BLOCK
-- 
1.7.1.226.g770c5



More information about the xorg-devel mailing list