1 /**
2  * \file
3  * \brief  Simple Pseudo-Random Number Generator
4  * \ingroup l4util_api
5  *
6  * \date   1998
7  * \author Lars Reuther <reuther@os.inf.tu-dresden.de> */
8 /*
9  * (c) 2008-2009 Author(s)
10  *     economic rights: Technische Universität Dresden (Germany)
11  * This file is part of TUD:OS and distributed under the terms of the
12  * GNU Lesser General Public License 2.1.
13  * Please see the COPYING-LGPL-2.1 file for details.
14  */
15 
16 #ifndef __L4UTIL_RAND_H
17 #define __L4UTIL_RAND_H
18 
19 #define L4_RAND_MAX 65535
20 
21 #include <l4/sys/compiler.h>
22 #include <l4/sys/l4int.h>
23 
24 EXTERN_C_BEGIN
25 
26 /**
27  * \defgroup l4util_random Random number support
28  * \ingroup l4util_api
29  */
30 
31 /**
32  * \brief Deliver next random number
33  * \ingroup l4util_random
34  *
35  * \return A new random number
36  */
37 L4_CV l4_uint32_t
38 l4util_rand(void);
39 
40 /**
41  * \brief Initialize random number generator
42  * \ingroup l4util_random
43  *
44  * \param seed Value to initialize
45  */
46 L4_CV void
47 l4util_srand (l4_uint32_t seed);
48 
49 EXTERN_C_END
50 
51 #endif /* __L4UTIL_RAND_H */
52