Changeset 53634f9 in mainline
- Timestamp:
- 2009-01-31T13:24:32Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1e241723
- Parents:
- 896ad9f
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/boot/boot.S
r896ad9f r53634f9 1 1 # 2 2 # Copyright (c) 2005 Ondrej Palkovsky 3 3 # Copyright (c) 2006 Martin Decky -
kernel/arch/ppc32/src/mm/tlb.c
r896ad9f r53634f9 41 41 #include <print.h> 42 42 #include <symtab.h> 43 #include <macros.h> 43 44 44 45 … … 130 131 131 132 132 /** Pseudorandom generator133 *134 * A pretty standard linear congruential pseudorandom135 * number generator (m = 2^32).136 *137 */138 #define RANDI(seed) \139 ({ \140 (seed) = 1103515245 * (seed) + 12345; \141 (seed); \142 })143 144 145 133 static void pht_insert(const uintptr_t vaddr, const pte_t *pte) 146 134 { -
kernel/generic/include/macros.h
r896ad9f r53634f9 77 77 #define STRING_ARG(arg) #arg 78 78 79 /** Pseudorandom generator 80 * 81 * A pretty standard linear congruential pseudorandom 82 * number generator (m = 2^32 or 2^64 depending on architecture). 83 * 84 */ 85 #define RANDI(seed) \ 86 ({ \ 87 (seed) = 1103515245 * (seed) + 12345; \ 88 (seed); \ 89 }) 90 79 91 #endif 80 92 -
kernel/test/synch/rwlock4.c
r896ad9f r53634f9 61 61 spinlock_lock(&rw_lock); 62 62 rc = seed % max; 63 seed = (((seed <<2) ^ (seed>>2)) * 487) + rc;63 seed = (((seed << 2) ^ (seed >> 2)) * 487) + rc; 64 64 spinlock_unlock(&rw_lock); 65 65 return rc; -
kernel/test/synch/semaphore2.c
r896ad9f r53634f9 54 54 spinlock_lock(&sem_lock); 55 55 rc = seed % max; 56 seed = (((seed <<2) ^ (seed>>2)) * 487) + rc;56 seed = (((seed << 2) ^ (seed >> 2)) * 487) + rc; 57 57 spinlock_unlock(&sem_lock); 58 58 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.