finished variable def; selecting priority array
solved malloc problem in thread.c