From: Ben Gras Date: Thu, 11 Dec 2008 14:47:48 +0000 (+0000) Subject: no more HZ; less debugging statements X-Git-Tag: v3.1.4~188 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/rndc.conf.html?a=commitdiff_plain;h=7d674f4b8e2a9148fa471b5992bc23e7f580fc2d;p=minix.git no more HZ; less debugging statements --- diff --git a/servers/vfs/main.c b/servers/vfs/main.c index 9060a7257..dc1eb433c 100644 --- a/servers/vfs/main.c +++ b/servers/vfs/main.c @@ -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(); } /*===========================================================================* diff --git a/servers/vfs/open.c b/servers/vfs/open.c index 5eb7e3390..126b77513 100644 --- a/servers/vfs/open.c +++ b/servers/vfs/open.c @@ -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; } diff --git a/servers/vfs/select.c b/servers/vfs/select.c index 72ae72423..21d9802ea 100644 --- a/servers/vfs/select.c +++ b/servers/vfs/select.c @@ -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