Skip to content

Commit e41925b

Browse files
committed
---
yaml --- r: 36983 b: refs/heads/try2 c: 84a37a3 h: refs/heads/master i: 36981: 6ef9d39 36979: e70e1fd 36975: f5cd45f v: v3
1 parent 04ca7c9 commit e41925b

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 16797fd525c0b603280dc8608f18af1c308cf901
8+
refs/heads/try2: 84a37a38593f3ee51adf2b1d064819ee399941cc
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/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/try2/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/try2/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)