File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 307957710c69f41519f5f22997c629fc5e077771
2
+ refs/heads/master: 5209b192558e4adf0baa0981c463dcff61ec0636
Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ void isaac(randctx *r);
43
43
44
44
/*
45
45
------------------------------------------------------------------------------
46
- Call rand (/o_ randctx *r _o/) to retrieve a single 32-bit random value
46
+ Call isaac_rand (/o_ randctx *r _o/) to retrieve a single 32-bit random value
47
47
------------------------------------------------------------------------------
48
48
*/
49
- #define rand (r ) \
49
+ #define isaac_rand (r ) \
50
50
(!(r)->randcnt-- ? \
51
51
(isaac(r), (r)->randcnt=RANDSIZ-1, (r)->randrsl[(r)->randcnt]) : \
52
52
(r)->randrsl[(r)->randcnt])
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ rand_new(rust_task *task)
151
151
extern " C" CDECL size_t
152
152
rand_next (rust_task *task, randctx *rctx)
153
153
{
154
- return rand (rctx);
154
+ return isaac_rand (rctx);
155
155
}
156
156
157
157
extern " C" CDECL void
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ rust_kernel::fail() {
150
150
151
151
rust_task_id
152
152
rust_kernel::create_task (rust_task *spawner, const char *name) {
153
- rust_scheduler *thread = threads[rand (&rctx) % num_threads];
153
+ rust_scheduler *thread = threads[isaac_rand (&rctx) % num_threads];
154
154
rust_task *t = thread->create_task (spawner, name);
155
155
{
156
156
scoped_lock with (_kernel_lock);
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ rust_scheduler::schedule_task(int id) {
179
179
// FIXME: in the face of failing tasks, this is not always right.
180
180
// I(this, n_live_tasks() > 0);
181
181
if (running_tasks.length () > 0 ) {
182
- size_t k = rand (&rctx);
182
+ size_t k = isaac_rand (&rctx);
183
183
// Look around for a runnable task, starting at k.
184
184
for (size_t j = 0 ; j < running_tasks.length (); ++j) {
185
185
size_t i = (j + k) % running_tasks.length ();
You can’t perform that action at this time.
0 commit comments