/* * Close the keyboard. */ void MWKbd_Close (void) { uid_unregister_device (kbd_fd); uid_close_queue (); close (kbd_fd); }
/* * Close the mouse device. */ static void MWMou_Close (void) { uid_unregister_device (mou_fd); uid_close_queue (); #if RTEMS close (mou_fd); #endif }
void close_it(void) { int rc; printf( "uid_unregister_device() - OK\n" ); rc = uid_unregister_device( Test_fd ); rtems_test_assert( rc == 0 ); puts( "close(/dev/mouse) - OK " ); rc = close( Test_fd ); rtems_test_assert( rc == 0 ); }
/* close and unregister device */ static int close_queue_and_unregister_device( int fd ) { uid_unregister_device( fd ); return uid_close_queue(); }