mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Tweak FreeBSD too.
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: osdep-freebsd.c,v 1.6 2009-02-07 19:24:50 nicm Exp $ */
 | 
			
		||||
/* $Id: osdep-freebsd.c,v 1.7 2009-02-07 19:27:11 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -22,6 +22,7 @@
 | 
			
		||||
#include <sys/proc.h>
 | 
			
		||||
#include <sys/stat.h>
 | 
			
		||||
#include <sys/sysctl.h>
 | 
			
		||||
#include <sys/time.h>
 | 
			
		||||
#include <sys/user.h>
 | 
			
		||||
 | 
			
		||||
#include <err.h>
 | 
			
		||||
@@ -87,11 +88,11 @@ retry:
 | 
			
		||||
			bestp = p;
 | 
			
		||||
		if (!is_stopped(p) && is_stopped(bestp))
 | 
			
		||||
			bestp = p;
 | 
			
		||||
 | 
			
		||||
		if (p->ki_estcpu < bestp->ki_estcpu)
 | 
			
		||||
			continue;
 | 
			
		||||
		if (p->ki_slptime > bestp->ki_slptime)
 | 
			
		||||
			continue;
 | 
			
		||||
		if (p->ki_estcpu > bestp->ki_estcpu)
 | 
			
		||||
			bestp = p;
 | 
			
		||||
		if (p->ki_slptime < bestp->ki_slptime)
 | 
			
		||||
			bestp = p;
 | 
			
		||||
		if (timercmp(&p->ki_rusage_ch, &bestp->ki_rusage_ch, <))
 | 
			
		||||
			bestp = p;
 | 
			
		||||
	}
 | 
			
		||||
	if (bestp != NULL) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user