summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/common/rand
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Runtime/common/rand
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Runtime/common/rand')
-rw-r--r--src/VBox/Runtime/common/rand/rand.cpp28
-rw-r--r--src/VBox/Runtime/common/rand/randadv.cpp2
-rw-r--r--src/VBox/Runtime/common/rand/randparkmiller.cpp2
3 files changed, 15 insertions, 17 deletions
diff --git a/src/VBox/Runtime/common/rand/rand.cpp b/src/VBox/Runtime/common/rand/rand.cpp
index beb195e4..75637eb7 100644
--- a/src/VBox/Runtime/common/rand/rand.cpp
+++ b/src/VBox/Runtime/common/rand/rand.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2006-2008 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -55,10 +55,9 @@ static RTRAND g_hRand = NIL_RTRAND;
* Perform lazy initialization.
*
* @returns IPRT status code.
- * @param pvUser1 Ignored.
- * @param pvUser2 Ignored.
+ * @param pvUser Ignored.
*/
-static DECLCALLBACK(int) rtRandInitOnce(void *pvUser1, void *pvUser2)
+static DECLCALLBACK(int) rtRandInitOnce(void *pvUser)
{
RTRAND hRand;
int rc = RTRandAdvCreateSystemFaster(&hRand);
@@ -76,15 +75,14 @@ static DECLCALLBACK(int) rtRandInitOnce(void *pvUser1, void *pvUser2)
else
AssertRC(rc);
- NOREF(pvUser1);
- NOREF(pvUser2);
+ NOREF(pvUser);
return rc;
}
RTDECL(void) RTRandBytes(void *pv, size_t cb) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
RTRandAdvBytes(g_hRand, pv, cb);
}
RT_EXPORT_SYMBOL(RTRandBytes);
@@ -92,7 +90,7 @@ RT_EXPORT_SYMBOL(RTRandBytes);
RTDECL(uint32_t) RTRandU32Ex(uint32_t u32First, uint32_t u32Last) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvU32Ex(g_hRand, u32First, u32Last);
}
RT_EXPORT_SYMBOL(RTRandU32Ex);
@@ -100,7 +98,7 @@ RT_EXPORT_SYMBOL(RTRandU32Ex);
RTDECL(uint32_t) RTRandU32(void) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvU32(g_hRand);
}
RT_EXPORT_SYMBOL(RTRandU32);
@@ -108,7 +106,7 @@ RT_EXPORT_SYMBOL(RTRandU32);
RTDECL(int32_t) RTRandS32Ex(int32_t i32First, int32_t i32Last) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvS32Ex(g_hRand, i32First, i32Last);
}
RT_EXPORT_SYMBOL(RTRandS32Ex);
@@ -116,7 +114,7 @@ RT_EXPORT_SYMBOL(RTRandS32Ex);
RTDECL(int32_t) RTRandS32(void) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvS32(g_hRand);
}
RT_EXPORT_SYMBOL(RTRandS32);
@@ -124,7 +122,7 @@ RT_EXPORT_SYMBOL(RTRandS32);
RTDECL(uint64_t) RTRandU64Ex(uint64_t u64First, uint64_t u64Last) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvU64Ex(g_hRand, u64First, u64Last);
}
RT_EXPORT_SYMBOL(RTRandU64Ex);
@@ -132,7 +130,7 @@ RT_EXPORT_SYMBOL(RTRandU64Ex);
RTDECL(uint64_t) RTRandU64(void) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvU64(g_hRand);
}
RT_EXPORT_SYMBOL(RTRandU64);
@@ -140,7 +138,7 @@ RT_EXPORT_SYMBOL(RTRandU64);
RTDECL(int64_t) RTRandS64Ex(int64_t i64First, int64_t i64Last) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvS64Ex(g_hRand, i64First, i64Last);
}
RT_EXPORT_SYMBOL(RTRandS64Ex);
@@ -148,7 +146,7 @@ RT_EXPORT_SYMBOL(RTRandS64Ex);
RTDECL(int64_t) RTRandS64(void) RT_NO_THROW
{
- RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL, NULL);
+ RTOnce(&g_rtRandOnce, rtRandInitOnce, NULL);
return RTRandAdvS32(g_hRand);
}
RT_EXPORT_SYMBOL(RTRandS64);
diff --git a/src/VBox/Runtime/common/rand/randadv.cpp b/src/VBox/Runtime/common/rand/randadv.cpp
index e4506c0a..feff3356 100644
--- a/src/VBox/Runtime/common/rand/randadv.cpp
+++ b/src/VBox/Runtime/common/rand/randadv.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2008 Oracle Corporation
+ * Copyright (C) 2008-2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/Runtime/common/rand/randparkmiller.cpp b/src/VBox/Runtime/common/rand/randparkmiller.cpp
index 4c0f3fd1..4a429045 100644
--- a/src/VBox/Runtime/common/rand/randparkmiller.cpp
+++ b/src/VBox/Runtime/common/rand/randparkmiller.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2008 Oracle Corporation
+ * Copyright (C) 2008-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;