Fix non_upper_case_globals warnings

This commit is contained in:
Matthew Rasmus 2015-01-07 19:07:27 -08:00
parent 01d4739d16
commit dc72119998
6 changed files with 21 additions and 21 deletions

View file

@ -8,11 +8,11 @@ use std::cell::RefCell;
static mut next_tid: AtomicUint = INIT_ATOMIC_UINT;
thread_local!(static task_local_tid: Rc<RefCell<Option<uint>>> = Rc::new(RefCell::new(None)))
thread_local!(static TASK_LOCAL_TID: Rc<RefCell<Option<uint>>> = Rc::new(RefCell::new(None)))
/// Every task gets one, that's unique.
pub fn tid() -> uint {
task_local_tid.with(|ref k| {
TASK_LOCAL_TID.with(|ref k| {
let ret =
match *k.borrow() {
None => unsafe { next_tid.fetch_add(1, SeqCst) },