File tree Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ native mod rustrt {
17
17
fn rust_uv_get_kernel_global_chan_ptr ( ) -> * libc:: uintptr_t ;
18
18
fn rust_uv_get_kernel_global_async_handle ( ) -> * * libc:: c_void ;
19
19
fn rust_uv_set_kernel_global_async_handle ( handle : * ll:: uv_async_t ) ;
20
- fn rust_uv_free_kernel_global_async_handle ( ) ;
21
20
}
22
21
23
22
#[ doc = "
Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ rust_kernel::rust_kernel(rust_env *env) :
27
27
// set up storage of pointers needed to
28
28
// access the global loop.
29
29
global_loop_chan = 0 ;
30
- global_async_handle = (void **)::malloc ( // FIXME--can't use this->malloc()
31
- sizeof (void *)); // .. what do?
30
+ int foo = 0 ;
31
+ async_handle_stub = (void *)&foo;
32
+ global_async_handle = &async_handle_stub;
32
33
*global_async_handle = (void *)0 ;
33
34
34
35
// Create the single threaded scheduler that will run on the platform's
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ class rust_kernel {
75
75
76
76
// Used to communicate with the process-side, global libuv loop
77
77
uintptr_t global_loop_chan;
78
+ void * async_handle_stub;
78
79
void ** global_async_handle;
79
80
80
81
public:
Original file line number Diff line number Diff line change @@ -454,7 +454,3 @@ extern "C" void
454
454
rust_uv_set_kernel_global_async_handle (uv_async_t * handle) {
455
455
rust_get_current_task ()->kernel ->set_global_async_handle ((void *)handle);
456
456
}
457
- extern " C" void
458
- rust_uv_free_kernel_global_async_handle () {
459
- free ((void *)rust_get_current_task ()->kernel ->get_global_async_handle ());
460
- }
You can’t perform that action at this time.
0 commit comments