14dfl6.txt ;************************************************************************************************** ; LISTING 6 - ENABLING ASYNCHRONOUS NOTIFICATION ; ; "Get those boards talking under Linux," EDN, July 6, 2000, pg 130 ; ; http://www.ednmag.com/ednmag/reg/2000/070600/14df.htm ;************************************************************************************************** // setting ownership of device file if (fcntl(ain_fd[board], F_SETOWN, getpid()) != 0) { // report error, free allocated memory and resources and return } // getting flags of device file flags = fcntl(ain_fd[board], F_GETFL); if (flags == -1) { // report error, free allocated stuff and return } // setting flags of device file if (fcntl(ain_fd[board], F_SETFL, flags | FASYNC) == -1) { // report error, free allocated resources and return }