no more HZ; less debugging statements
This commit is contained in:
		
							parent
							
								
									b9a0d46ea9
								
							
						
					
					
						commit
						7d674f4b8e
					
				@ -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. */
 | 
					/* Send a reply to a user process.  If the send fails, just ignore it. */
 | 
				
			||||||
  int s;
 | 
					  int s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
  if (call_nr == SYMLINK)
 | 
					  if (call_nr == SYMLINK)
 | 
				
			||||||
	printf("vfs:reply: replying %d for call %d\n", result, call_nr);
 | 
						printf("vfs:reply: replying %d for call %d\n", result, call_nr);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  m_out.reply_type = result;
 | 
					  m_out.reply_type = result;
 | 
				
			||||||
  s = sendnb(whom, &m_out);
 | 
					  s = sendnb(whom, &m_out);
 | 
				
			||||||
@ -396,6 +398,8 @@ PRIVATE void fs_init()
 | 
				
			|||||||
		
 | 
							
 | 
				
			||||||
  	} else  rfp->fp_endpoint = NONE;
 | 
					  	} else  rfp->fp_endpoint = NONE;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  system_hz = sys_hz();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*===========================================================================*
 | 
					/*===========================================================================*
 | 
				
			||||||
 | 
				
			|||||||
@ -331,9 +331,11 @@ int *created;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (r == EEXIST && excl)
 | 
							if (r == EEXIST && excl)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
			printf(
 | 
								printf(
 | 
				
			||||||
		"vfs:create_open: creating existing file with O_EXCL\n");
 | 
							"vfs:create_open: creating existing file with O_EXCL\n");
 | 
				
			||||||
			put_vnode(dir_vp);
 | 
								put_vnode(dir_vp);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
			return r;
 | 
								return r;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -469,12 +469,12 @@ PUBLIC int do_select(void)
 | 
				
			|||||||
		 */
 | 
							 */
 | 
				
			||||||
#define USECPERSEC 1000000
 | 
					#define USECPERSEC 1000000
 | 
				
			||||||
		while(timeout.tv_usec >= USECPERSEC) {
 | 
							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_usec -= USECPERSEC;
 | 
				
			||||||
			timeout.tv_sec++;
 | 
								timeout.tv_sec++;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ticks = timeout.tv_sec * HZ +
 | 
							ticks = timeout.tv_sec * system_hz +
 | 
				
			||||||
			(timeout.tv_usec * HZ + USECPERSEC-1) / USECPERSEC;
 | 
								(timeout.tv_usec * system_hz + USECPERSEC-1) / USECPERSEC;
 | 
				
			||||||
		selecttab[s].expiry = ticks;
 | 
							selecttab[s].expiry = ticks;
 | 
				
			||||||
		fs_set_timer(&selecttab[s].timer, ticks, select_timeout_check, s);
 | 
							fs_set_timer(&selecttab[s].timer, ticks, select_timeout_check, s);
 | 
				
			||||||
#if DEBUG_SELECT
 | 
					#if DEBUG_SELECT
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user