Modified mdelay to msleep in apanic.c