/* Functions defined by libchardriver. */
void chardriver_announce(void);
-int chardriver_get_minor(message *m, devminor_t *minor);
-void chardriver_process(struct chardriver *cdp, message *m_ptr,
+int chardriver_get_minor(const message *m, devminor_t *minor);
+void chardriver_process(const struct chardriver *cdp, message *m_ptr,
int ipc_status);
void chardriver_terminate(void);
-void chardriver_task(struct chardriver *cdp);
+void chardriver_task(const struct chardriver *cdp);
void chardriver_reply_task(endpoint_t endpt, cdev_id_t id, int r);
void chardriver_reply_select(endpoint_t endpt, devminor_t minor, int ops);
/*===========================================================================*
* do_open *
*===========================================================================*/
-static int do_open(struct chardriver *cdp, message *m_ptr)
+static int do_open(const struct chardriver *cdp, message *m_ptr)
{
/* Open a minor device. */
endpoint_t user_endpt;
/*===========================================================================*
* do_close *
*===========================================================================*/
-static int do_close(struct chardriver *cdp, message *m_ptr)
+static int do_close(const struct chardriver *cdp, message *m_ptr)
{
/* Close a minor device. */
devminor_t minor;
/*===========================================================================*
* do_trasnfer *
*===========================================================================*/
-static int do_transfer(struct chardriver *cdp, message *m_ptr, int do_write)
+static int do_transfer(const struct chardriver *cdp, message *m_ptr,
+ int do_write)
{
/* Carry out a read or write task request. */
devminor_t minor;
/*===========================================================================*
* do_ioctl *
*===========================================================================*/
-static int do_ioctl(struct chardriver *cdp, message *m_ptr)
+static int do_ioctl(const struct chardriver *cdp, message *m_ptr)
{
/* Carry out an I/O control task request. */
devminor_t minor;
/*===========================================================================*
* do_cancel *
*===========================================================================*/
-static int do_cancel(struct chardriver *cdp, message *m_ptr)
+static int do_cancel(const struct chardriver *cdp, message *m_ptr)
{
/* Cancel a suspended (read, write, ioctl) task request. The original request
* may already have finished, in which case no reply should be sent.
/*===========================================================================*
* do_select *
*===========================================================================*/
-static int do_select(struct chardriver *cdp, message *m_ptr)
+static int do_select(const struct chardriver *cdp, message *m_ptr)
{
/* Perform a select query on a minor device. */
devminor_t minor;
/*===========================================================================*
* chardriver_process *
*===========================================================================*/
-void chardriver_process(struct chardriver *cdp, message *m_ptr, int ipc_status)
+void chardriver_process(const struct chardriver *cdp, message *m_ptr,
+ int ipc_status)
{
/* Call the appropiate driver function, based on the type of request. Send a
* reply to the caller if necessary.
/*===========================================================================*
* chardriver_task *
*===========================================================================*/
-void chardriver_task(struct chardriver *cdp)
+void chardriver_task(const struct chardriver *cdp)
{
/* Main program of any character device driver task. */
int r, ipc_status;
/*===========================================================================*
* chardriver_get_minor *
*===========================================================================*/
-int chardriver_get_minor(message *m, devminor_t *minor)
+int chardriver_get_minor(const message *m, devminor_t *minor)
{
assert(NULL != m);
assert(NULL != minor);