/* Using poll(2) to wait for and dispatch ASTs */ static int poll_for_ast(void) { struct pollfd pfd; pfd.fd = dlm_get_fd(); pfd.events = POLLIN; while (!ast_called) { if (poll(&pfd, 1, 0) < 0) { perror("poll"); return -1; } dlm_dispatch(pfd.fd); } ast_called = 0; return 0; }
static void process_libdlm(void) { dlm_dispatch(libdlm_fd); if (bast_cb && !ignore_bast) do_bast_unlocks(); }