RTEMS | iospace: Add iospace driver (!1243)
Gedare Bloom (@gedare)
gitlab at rtems.org
Tue Jun 2 17:07:09 UTC 2026
Gedare Bloom started a new discussion on cpukit/include/dev/io/iodev.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_151569
> + */
> + rtems_recursive_mutex mutex;
> +};
> +
> +/**
> + * @brief Allocate and initialize the iodev device.
> + *
> + * After a successful allocation and initialization of the iodev device
> + * it must be destroyed via rtems_iodev_destroy_and_free().
> + *
> + * @param[in] size The number of bytes to allocate.
> + *
> + * @retval NULL Failed to set up iodev device.
> + * @retval non-NULL The new iodev device.
> + */
> +rtems_iodev *rtems_iodev_alloc_and_init( size_t size );
What's the purpose of having these combined, while still allowing a separated `init` (but not `alloc`)?
In other RTEMS APIs we usually have `create` for allocation (and `construct` for user-supplied storage), although that might be for workspace allocated objects.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_151569
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260602/85a5514b/attachment-0001.htm>
More information about the bugs
mailing list