fix prototypes & spls; added get idle-time ioctl