implement thread callback function for posix threads, implement memory heap apis for posix mmap/munmap