浏览代码

Complete module documentation

Simply add missed doc comments.
ticki 8 年之前
父节点
当前提交
c837a458b6
共有 4 个文件被更改,包括 13 次插入0 次删除
  1. 3 0
      src/bookkeeper.rs
  2. 4 0
      src/brk.rs
  3. 2 0
      src/cell.rs
  4. 4 0
      src/tls.rs

+ 3 - 0
src/bookkeeper.rs

@@ -792,6 +792,9 @@ pub trait Allocator: ops::DerefMut<Target = Bookkeeper> {
 
         // We will only extend the length if we were unable to fit it into the current length.
         if ind + n == self.pool.len() {
+            // Loooooooging...
+            log!(self;ind, "Block pool not long enough for shift. Extending.");
+
             // Reserve space. This does not break order, due to the assumption that
             // `reserve` never breaks order.
             old_buf = unborrow!(self.reserve(self.pool.len() + 1));

+ 4 - 0
src/brk.rs

@@ -1,3 +1,7 @@
+//! BRK abstractions.
+//!
+//! This module provides safe abstractions over BRk.
+
 use prelude::*;
 
 use core::cmp;

+ 2 - 0
src/cell.rs

@@ -1,3 +1,5 @@
+//! Cell primitives.
+
 use core::cell::UnsafeCell;
 use core::mem;
 

+ 4 - 0
src/tls.rs

@@ -1,3 +1,7 @@
+//! Safe implementation of thread-local storage.
+//!
+//! This module provides lightweight abstractions for TLS similar to the ones provided by libstd.
+
 use core::{marker, mem};
 
 use sys;