File tree Expand file tree Collapse file tree 4 files changed +3
-8
lines changed Expand file tree Collapse file tree 4 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 066bcc6c79cb464b5a91ab30293d98e3ec2dbcca
2
+ refs/heads/master: 111989a6265af86b180932a9c1dd70d48910f83a
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ void sync::sleep(size_t timeout_in_ms) {
19
19
#endif
20
20
}
21
21
22
- void sync::random_sleep (size_t max_timeout_in_ms) {
23
- sleep (rand () % max_timeout_in_ms);
24
- }
25
-
26
22
rust_thread::rust_thread () : _is_running(false ), thread(0 ) {
27
23
// Nop.
28
24
}
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ class sync {
5
5
public:
6
6
static void yield ();
7
7
static void sleep (size_t timeout_in_ms);
8
- static void random_sleep (size_t max_timeout_in_ms);
9
8
template <class T >
10
9
static bool compare_and_swap (T *address,
11
10
T oldValue, T newValue) {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ rust_domain_test::worker::run() {
15
15
for (int i = 0 ; i < TASKS; i++) {
16
16
handle->create_task (NULL , " child" );
17
17
}
18
- sync::random_sleep ( 1000 );
18
+ sync::sleep ( rand (&handle-> rctx ) % 1000 );
19
19
}
20
20
21
21
bool
@@ -62,6 +62,6 @@ rust_task_test::run() {
62
62
worker->start ();
63
63
}
64
64
65
- sync::random_sleep ( 1000 );
65
+ sync::sleep ( rand (&kernel. sched -> rctx ) % 1000 );
66
66
return true ;
67
67
}
You can’t perform that action at this time.
0 commit comments