File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
9
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10
- refs/heads/dist-snap: f59fcd5d5f7ba94f7c705eb2c081760dd2213067
10
+ refs/heads/dist-snap: 86ba4573498ef251933fcc784d513c7586dfaae1
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
13
13
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -23,6 +23,16 @@ use unstable::finally::Finally;
23
23
24
24
#[ cfg( test) ] use rt:: uv:: uvio:: UvEventLoop ;
25
25
26
+ /// Initialize the TLS key. Other ops will fail if this isn't executed first.
27
+ pub fn init_tls_key ( ) {
28
+ unsafe {
29
+ rust_initialize_rt_tls_key ( ) ;
30
+ extern {
31
+ fn rust_initialize_rt_tls_key ( ) ;
32
+ }
33
+ }
34
+ }
35
+
26
36
/// Give the Scheduler to thread-local storage
27
37
pub fn put ( sched : ~Scheduler ) {
28
38
unsafe {
Original file line number Diff line number Diff line change @@ -64,11 +64,8 @@ pub impl Scheduler {
64
64
65
65
fn new ( event_loop : ~EventLoopObject ) -> Scheduler {
66
66
67
- // Lazily initialize the global state, currently the scheduler TLS key
68
- unsafe { rust_initialize_global_state ( ) ; }
69
- extern {
70
- fn rust_initialize_global_state ( ) ;
71
- }
67
+ // Lazily initialize the scheduler TLS key
68
+ local_sched:: init_tls_key ( ) ;
72
69
73
70
Scheduler {
74
71
event_loop : event_loop,
Original file line number Diff line number Diff line change @@ -840,9 +840,9 @@ rust_get_rt_tls_key() {
840
840
return &rt_key;
841
841
}
842
842
843
- // Initialize the global state required by the new scheduler
843
+ // Initialize the TLS key used by the new scheduler
844
844
extern " C" CDECL void
845
- rust_initialize_global_state () {
845
+ rust_initialize_rt_tls_key () {
846
846
847
847
static lock_and_signal init_lock;
848
848
static bool initialized = false ;
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ rust_uv_ip4_addrp
222
222
rust_uv_ip6_addrp
223
223
rust_uv_free_ip4_addr
224
224
rust_uv_free_ip6_addr
225
- rust_initialize_global_state
225
+ rust_initialize_rt_tls_key
226
226
rust_dbg_next_port
227
227
rust_new_memory_region
228
228
rust_delete_memory_region
You can’t perform that action at this time.
0 commit comments