replace malloc lock to atomic spinlock
impl ltimer