equal
deleted
inserted
replaced
214 /** Memory-map process data to user space. |
214 /** Memory-map process data to user space. |
215 * |
215 * |
216 */ |
216 */ |
217 int ec_rtdm_mmap(struct rtdm_fd *fd, struct vm_area_struct *vma) |
217 int ec_rtdm_mmap(struct rtdm_fd *fd, struct vm_area_struct *vma) |
218 { |
218 { |
219 ec_ioctl_context_t *ctx = (ec_ioctl_context_t *) rtdm_fd_to_private(fd); |
219 size_t len; |
220 return rtdm_mmap_vmem(vma, (void *)ctx->process_data); |
220 ec_ioctl_context_t *ctx = (ec_ioctl_context_t *) rtdm_fd_to_private(fd); |
221 } |
221 len = vma->vm_end - vma->vm_start; |
222 |
222 if (ctx->process_data_size != len) |
223 /****************************************************************************/ |
223 return -EINVAL; |
|
224 return rtdm_mmap_kmem(vma, (void *)ctx->process_data); |
|
225 } |
|
226 |
|
227 /****************************************************************************/ |