add rbtree.c and fix smp.c