19 lines
327 B
C
19 lines
327 B
C
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
#include "runtime.h"
|
||
|
|
||
|
uint32
|
||
|
runtime_fastrand1(void)
|
||
|
{
|
||
|
uint32 x;
|
||
|
|
||
|
x = m->fastrand;
|
||
|
x += x;
|
||
|
if(x & 0x80000000L)
|
||
|
x ^= 0x88888eefUL;
|
||
|
m->fastrand = x;
|
||
|
return x;
|
||
|
}
|