Skip to content

Commit e8e450a

Browse files
committed
---
yaml --- r: 653 b: refs/heads/master c: 13d6f87 h: refs/heads/master i: 651: 8ff234c v: v3
1 parent 37a5057 commit e8e450a

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
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: 2172a3bcf44bbecfe9469451cdaed96b5beee71e
2+
refs/heads/master: 13d6f874316c9f69ab3a29f120ce410da2290a64

trunk/src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ TASK_XFAILS := test/run-pass/task-comm-8.rs \
384384
test/run-pass/task-comm-10.rs \
385385
test/run-pass/task-comm-15.rs \
386386
test/run-pass/task-life-0.rs \
387-
test/run-pass/alt-type-simple.rs
387+
test/run-pass/alt-type-simple.rs \
388+
test/run-pass/many.rs
388389

389390
TEST_XFAILS_X86 := $(TASK_XFAILS) \
390391
test/run-pass/child-outlives-parent.rs \

trunk/src/rt/rust_kernel.cpp

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,19 @@ void
144144
rust_kernel::start_kernel_loop() {
145145
while (_interrupt_kernel_loop == false) {
146146
pump_message_queues();
147-
sync::yield();
147+
148+
// FIXME: this is a complete hack to make the testsuite finish in a
149+
// sane time when executing under valgrind. The whole message-loop
150+
// system here needs replacement with an OS-level event-queue such
151+
// that actually wait on inter-thread notices, rather than
152+
// busy-waiting.
153+
154+
size_t ms = TIME_SLICE_IN_MS;
155+
#if defined(__WIN32__)
156+
Sleep(ms);
157+
#else
158+
usleep(ms * 1000);
159+
#endif
148160
}
149161
}
150162

@@ -208,3 +220,14 @@ rust_kernel::free_handles(hash_map<T*, rust_handle<T>* > &map) {
208220
delete value;
209221
}
210222
}
223+
224+
//
225+
// Local Variables:
226+
// mode: C++
227+
// fill-column: 78;
228+
// indent-tabs-mode: nil
229+
// c-basic-offset: 4
230+
// buffer-file-coding-system: utf-8-unix
231+
// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
232+
// End:
233+
//

0 commit comments

Comments
 (0)