summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_internal.h
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2017-04-20 19:05:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-25 20:43:42 +0200
commit255364f7b8a0fee3fb642b3e1521e943dd67bfb3 (patch)
tree9b67464441cc98d69eece7d42852637ee3dd89ca /drivers/staging/comedi/comedi_internal.h
parente44adf05b85e5a9d1d224f5ecde1c1c5e5371e36 (diff)
downloadop-kernel-dev-255364f7b8a0fee3fb642b3e1521e943dd67bfb3.zip
op-kernel-dev-255364f7b8a0fee3fb642b3e1521e943dd67bfb3.tar.gz
staging: comedi: support vm_access_process for mmap'd buffer
If a process that has mmap'd a COMEDI buffer is being run under a debugger such as GDB, the buffer contents are inaccessible from the debugger. Support the `access()` VM operation to allow the buffer contents to be accessed by another process. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_internal.h')
-rw-r--r--drivers/staging/comedi/comedi_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedi_internal.h b/drivers/staging/comedi/comedi_internal.h
index 534415e..6246f4a 100644
--- a/drivers/staging/comedi/comedi_internal.h
+++ b/drivers/staging/comedi/comedi_internal.h
@@ -29,6 +29,8 @@ void comedi_buf_reset(struct comedi_subdevice *s);
bool comedi_buf_is_mmapped(struct comedi_subdevice *s);
void comedi_buf_map_get(struct comedi_buf_map *bm);
int comedi_buf_map_put(struct comedi_buf_map *bm);
+int comedi_buf_map_access(struct comedi_buf_map *bm, unsigned long offset,
+ void *buf, int len, int write);
struct comedi_buf_map *comedi_buf_map_from_subdev_get(
struct comedi_subdevice *s);
unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s);
OpenPOWER on IntegriCloud