added menu.c and curthread.h