]> Zhao Yanbai Git Server - minix.git/commitdiff
no more HZ; less debugging statements
authorBen Gras <ben@minix3.org>
Thu, 11 Dec 2008 14:47:48 +0000 (14:47 +0000)
committerBen Gras <ben@minix3.org>
Thu, 11 Dec 2008 14:47:48 +0000 (14:47 +0000)
servers/vfs/main.c
servers/vfs/open.c
servers/vfs/select.c

index 9060a7257174d7bfb249102e15898025c43b596c..dc1eb433c96fd094a64364efdccbfb9b9c84d132 100644 (file)
@@ -315,8 +315,10 @@ int result;                        /* result of the call (usually OK or error #) */
 /* Send a reply to a user process.  If the send fails, just ignore it. */
   int s;
 
+#if 0
   if (call_nr == SYMLINK)
        printf("vfs:reply: replying %d for call %d\n", result, call_nr);
+#endif
 
   m_out.reply_type = result;
   s = sendnb(whom, &m_out);
@@ -396,6 +398,8 @@ PRIVATE void fs_init()
                
        } else  rfp->fp_endpoint = NONE;
   }
+
+  system_hz = sys_hz();
 }
 
 /*===========================================================================*
index 5eb7e3390831120827e69f72ac8113654d155753..126b7751344499c2b3616cdb59d5fb85cf96e38f 100644 (file)
@@ -331,9 +331,11 @@ int *created;
 
                if (r == EEXIST && excl)
                {
+#if 0
                        printf(
                "vfs:create_open: creating existing file with O_EXCL\n");
                        put_vnode(dir_vp);
+#endif
                        return r;
                }
 
index 72ae7242391ae819be955cdafdb539ab2723f13b..21d9802ea803f2c301ce87d4f118cd153d0b84b8 100644 (file)
@@ -469,12 +469,12 @@ PUBLIC int do_select(void)
                 */
 #define USECPERSEC 1000000
                while(timeout.tv_usec >= USECPERSEC) {
-                       /* this is to avoid overflow with *HZ below */
+                       /* this is to avoid overflow with *system_hz below */
                        timeout.tv_usec -= USECPERSEC;
                        timeout.tv_sec++;
                }
-               ticks = timeout.tv_sec * HZ +
-                       (timeout.tv_usec * HZ + USECPERSEC-1) / USECPERSEC;
+               ticks = timeout.tv_sec * system_hz +
+                       (timeout.tv_usec * system_hz + USECPERSEC-1) / USECPERSEC;
                selecttab[s].expiry = ticks;
                fs_set_timer(&selecttab[s].timer, ticks, select_timeout_check, s);
 #if DEBUG_SELECT