| 63 | }; |
| 64 | |
| 65 | static int timerfd_close(struct dfs_file *file) |
| 66 | { |
| 67 | struct rt_timerfd *tfd; |
| 68 | |
| 69 | if (file->vnode->ref_count != 1) |
| 70 | return 0; |
| 71 | |
| 72 | tfd = file->vnode->data; |
| 73 | |
| 74 | if (tfd) |
| 75 | { |
| 76 | if (tfd->timer != RT_NULL) |
| 77 | { |
| 78 | rt_timer_stop(tfd->timer); |
| 79 | rt_timer_delete(tfd->timer); |
| 80 | tfd->timer = RT_NULL; |
| 81 | } |
| 82 | |
| 83 | if (tfd->wqn.wqueue) |
| 84 | { |
| 85 | rt_wqueue_remove(&tfd->wqn); |
| 86 | } |
| 87 | |
| 88 | rt_mutex_detach(&tfd->lock); |
| 89 | rt_free(tfd); |
| 90 | } |
| 91 | |
| 92 | return 0; |
| 93 | } |
| 94 | |
| 95 | static int timerfd_poll(struct dfs_file *file, struct rt_pollreq *req) |
| 96 | { |
nothing calls this directly
no test coverage detected