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.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to