Skip to content

Commit bebf546

Browse files
author
Eric Holk
committed
---
yaml --- r: 3636 b: refs/heads/master c: 111989a h: refs/heads/master v: v3
1 parent 222f8ce commit bebf546

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 066bcc6c79cb464b5a91ab30293d98e3ec2dbcca
2+
refs/heads/master: 111989a6265af86b180932a9c1dd70d48910f83a

trunk/src/rt/sync/sync.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ void sync::sleep(size_t timeout_in_ms) {
1919
#endif
2020
}
2121

22-
void sync::random_sleep(size_t max_timeout_in_ms) {
23-
sleep(rand() % max_timeout_in_ms);
24-
}
25-
2622
rust_thread::rust_thread() : _is_running(false), thread(0) {
2723
// Nop.
2824
}

trunk/src/rt/sync/sync.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ class sync {
55
public:
66
static void yield();
77
static void sleep(size_t timeout_in_ms);
8-
static void random_sleep(size_t max_timeout_in_ms);
98
template <class T>
109
static bool compare_and_swap(T *address,
1110
T oldValue, T newValue) {

trunk/src/rt/test/rust_test_runtime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rust_domain_test::worker::run() {
1515
for (int i = 0; i < TASKS; i++) {
1616
handle->create_task(NULL, "child");
1717
}
18-
sync::random_sleep(1000);
18+
sync::sleep(rand(&handle->rctx) % 1000);
1919
}
2020

2121
bool
@@ -62,6 +62,6 @@ rust_task_test::run() {
6262
worker->start();
6363
}
6464

65-
sync::random_sleep(1000);
65+
sync::sleep(rand(&kernel.sched->rctx) % 1000);
6666
return true;
6767
}

0 commit comments

Comments
 (0)