summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/libkern/random.c12
-rw-r--r--sys/sys/libkern.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/libkern/random.c b/sys/libkern/random.c
index 08d316e..04cd0da 100644
--- a/sys/libkern/random.c
+++ b/sys/libkern/random.c
@@ -31,11 +31,20 @@
* SUCH DAMAGE.
*
* @(#)random.c 8.1 (Berkeley) 6/10/93
- * $Id: random.c,v 1.2 1994/08/02 07:44:23 davidg Exp $
+ * $Id: random.c,v 1.3 1995/03/17 06:15:39 phk Exp $
*/
#include <sys/libkern.h>
+static u_long randseed = 1;
+
+void
+srandom(seed)
+ u_long seed;
+{
+ randseed = seed;
+}
+
/*
* Pseudo-random number generator for randomizing the profiling clock,
* and whatever else we might use it for. The result is uniform on
@@ -44,7 +53,6 @@
u_long
random()
{
- static u_long randseed = 1;
register long x, hi, lo, t;
/*
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index c83165e..155cd01 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)libkern.h 8.1 (Berkeley) 6/10/93
- * $Id: libkern.h,v 1.12 1996/08/01 20:31:45 wollman Exp $
+ * $Id: libkern.h,v 1.13 1996/08/31 16:52:44 bde Exp $
*/
#ifndef _SYS_LIBKERN_H_
@@ -76,6 +76,7 @@ char *index __P((const char *, int));
char *rindex __P((const char *, int));
int scanc __P((u_int, const u_char *, const u_char *, int));
int skpc __P((int, int, char *));
+void srandom __P((u_long));
char *strcat __P((char *, const char *));
int strcmp __P((const char *, const char *));
char *strcpy __P((char *, const char *));
OpenPOWER on IntegriCloud