Skip to content

Commit dd7e29d

Browse files
committed
---
yaml --- r: 52086 b: refs/heads/dist-snap c: 84a37a3 h: refs/heads/master v: v3
1 parent 9492912 commit dd7e29d

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 16797fd525c0b603280dc8608f18af1c308cf901
10+
refs/heads/dist-snap: 84a37a38593f3ee51adf2b1d064819ee399941cc
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,12 +3258,12 @@ crate name the crate is given a default name that matches the source file,
32583258
with the extension removed. In that case, to turn on logging for a program
32593259
compiled from, e.g. `helloworld.rs`, `RUST_LOG` should be set to `helloworld`.
32603260

3261-
As a convenience, the logging spec can also be set to a special pseudo-crate,
3261+
As a convenience, the logging spec can also be set to a special psuedo-crate,
32623262
`::help`. In this case, when the application starts, the runtime will
32633263
simply output a list of loaded modules containing log expressions, then exit.
32643264

32653265
The Rust runtime itself generates logging information. The runtime's logs are
3266-
generated for a number of artificial modules in the `::rt` pseudo-crate,
3266+
generated for a number of artificial modules in the `::rt` psuedo-crate,
32673267
and can be enabled just like the logs for any standard module. The full list
32683268
of runtime logging modules follows.
32693269

@@ -3341,7 +3341,7 @@ have come and gone during the course of Rust's development:
33413341

33423342
* The Newsqueak (1988), Alef (1995), and Limbo (1996) family. These
33433343
languages were developed by Rob Pike, Phil Winterbottom, Sean Dorward and
3344-
others in their group at Bell Labs Computing Sciences Research Center
3344+
others in their group at Bell labs Computing Sciences Research Center
33453345
(Murray Hill, NJ, USA).
33463346

33473347
* The Napier (1985) and Napier88 (1988) family. These languages were

branches/dist-snap/doc/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type system and memory model, generics, and modules. [Additional
3636
tutorials](#what-next) cover specific language features in greater
3737
depth.
3838

39-
This tutorial assumes that the reader is already familiar with one or
39+
This tutorial assumes that the reader is already familiar with one or more
4040
more languages in the C family. Understanding of pointers and general
4141
memory management techniques will help.
4242

@@ -1284,7 +1284,7 @@ distinct type. They support most of the same allocation options as
12841284
vectors, though the string literal without a storage sigil (for
12851285
example, `"foo"`) is treated differently than a comparable vector
12861286
(`[foo]`). Whereas plain vectors are stack-allocated fixed-length
1287-
vectors, plain strings are borrowed pointers to read-only (static)
1287+
vectors, plain strings are region pointers to read-only
12881288
memory. All strings are immutable.
12891289

12901290
~~~
@@ -1947,7 +1947,7 @@ trait Printable {
19471947
Traits may be implemented for specific types with [impls]. An impl
19481948
that implements a trait includes the name of the trait at the start of
19491949
the definition, as in the following impls of `Printable` for `int`
1950-
and `&str`.
1950+
and `~str`.
19511951

19521952
[impls]: #functions-and-methods
19531953

branches/dist-snap/src/rt/rust_sched_loop.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ rust_sched_loop::kill_all_tasks() {
100100

101101
size_t
102102
rust_sched_loop::number_of_live_tasks() {
103+
lock.must_have_lock();
103104
return running_tasks.length() + blocked_tasks.length();
104105
}
105106

@@ -148,14 +149,10 @@ rust_sched_loop::release_task(rust_task *task) {
148149
rust_task *
149150
rust_sched_loop::schedule_task() {
150151
lock.must_have_lock();
151-
assert(this);
152152
if (running_tasks.length() > 0) {
153153
size_t k = isaac_rand(&rctx);
154-
// Look around for a runnable task, starting at k.
155-
for(size_t j = 0; j < running_tasks.length(); ++j) {
156-
size_t i = (j + k) % running_tasks.length();
157-
return (rust_task *)running_tasks[i];
158-
}
154+
size_t i = k % running_tasks.length();
155+
return (rust_task *)running_tasks[i];
159156
}
160157
return NULL;
161158
}

0 commit comments

Comments
 (0)