Module: xenomai-jki Branch: queues/proc Commit: 6831023baa18ccecc285e9d24509881d7d059ccb URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=6831023baa18ccecc285e9d24509881d7d059ccb
Author: Jan Kiszka <jan.kis...@siemens.com> Date: Sat Apr 17 19:05:36 2010 +0200 RTDM: Document device close procedure Interating over the close handler when it returns -EAGAIN or in case a pending reference to the device context exists is RTDM practice since day one. Documenting this is seriously overdue. Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- include/rtdm/rtdm_driver.h | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/rtdm/rtdm_driver.h b/include/rtdm/rtdm_driver.h index 3f79abc..bd8a9d0 100644 --- a/include/rtdm/rtdm_driver.h +++ b/include/rtdm/rtdm_driver.h @@ -193,11 +193,18 @@ typedef int (*rtdm_socket_handler_t)(struct rtdm_dev_context *context, * * @param[in] context Context structure associated with opened device instance * @param[in] user_info Opaque pointer to information about user mode caller, - * NULL if kernel mode call + * NULL if kernel mode or deferred user mode call * * @return 0 on success. On failure return either -ENOSYS, to request that * this handler be called again from the opposite realtime/non-realtime - * context, or another negative error code. + * context, -EAGAIN to request a recall after a grace period, or a valid + * negative error code according to IEEE Std 1003.1. + * + * @note Drivers must be prepared for that case that the close handler is + * invoked more than once per open context (even if the handler already + * completed an earlier run successfully). The driver has to avoid releasing + * resources twice as well as returning false errors on successive close + * invocations. * * @see @c close() in IEEE Std 1003.1, * http://www.opengroup.org/onlinepubs/009695399 */ _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git