WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 12 of 22] xenpaging: remove srand call

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 12 of 22] xenpaging: remove srand call
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 10 Jun 2011 11:13:01 +0200
Delivery-date: Fri, 10 Jun 2011 02:21:32 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1307697183; l=832; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=Ino8E2NuheWdl21XTrrzrry2oQc=; b=w1m4+9OByXIOXSU11JEklZcdvt5ad1qjOry3iruZbmS7DewNwCvQjOEj3NPkTGNPhJI thKF/mBGWFf5c094nIMVRcjjv00svu+8mgp/ceWeSNm2YhRiMRdYmNEB47oKX9JxtaQ9Q o/xmjNGiF7DwIpbdu0LJKDPXKWcYwEIG/nU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1307697169@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1307697169@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1307695636 -7200
# Node ID ea8f764e530d66463ceb9e97af9756a2a8f96c7c
# Parent  17c9aa11b28a867864b104322e19d188dd4bc14e
xenpaging: remove srand call

The policy uses now a linear algorithm instead of a random one.
Remove the call to srand().

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 17c9aa11b28a -r ea8f764e530d tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:15 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:16 2011 +0200
@@ -581,9 +581,6 @@ int main(int argc, char *argv[])
     domain_id = atoi(argv[1]);
     num_pages = atoi(argv[2]);
 
-    /* Seed random-number generator */
-    srand(time(NULL));
-
     /* Initialise domain paging */
     paging = xenpaging_init(domain_id);
     if ( paging == NULL )

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>