3f11f87382
For libgreen, bookeeping should not be global but rather on a per-pool basis. Inside libnative, it's known that there must be a global counter with a mutex/cvar. The benefit of taking this strategy is to remove this functionality from libstd to allow fine-grained control of it through libnative/libgreen. Notably, helper threads in libnative can manually decrement the global count so they don't count towards the global count of threads. Also, the shutdown process of *all* sched pools is now dependent on the number of tasks in the pool being 0 rather than this only being a hardcoded solution for the initial sched pool in libgreen. This involved adding a Local::try_take() method on the Local trait in order for the channel wakeup to work inside of libgreen. The channel send was happening from a SchedTask when there is no Task available in TLS, and now this is possible to work (remote wakeups are always possible, just a little slower). |
||
---|---|---|
.. | ||
args.rs | ||
borrowck.rs | ||
crate_map.rs | ||
env.rs | ||
global_heap.rs | ||
local_heap.rs | ||
local_ptr.rs | ||
local.rs | ||
logging.rs | ||
macros.rs | ||
mod.rs | ||
rtio.rs | ||
task.rs | ||
thread_local_storage.rs | ||
thread.rs | ||
unwind.rs | ||
util.rs |