RTEMS | libi2c: Use RTEMS thread API and support initialization at device driver level (!821)

Gedare Bloom (@gedare) gitlab at rtems.org
Mon Dec 8 20:15:18 UTC 2025




Gedare Bloom started a new discussion on cpukit/libi2c/libi2c.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/821#note_136984

 >     * op failed.
 > -   * Let 'init' handle 'is_initialized'...
 > +   * Let 'init' handle 'rtems_libi2c_is_initialized'...
 >     */
 >    sc = rtems_io_register_driver (0, &rtems_libi2c_io_ops, &rtems_libi2c_major);
 >    if (RTEMS_SUCCESSFUL != sc) {
 >      safe_printf(
 >               DRVNM "Claiming driver slot failed (rtems status code %i)\n",
 >               sc);
 > -    if (libmutex != RTEMS_ID_NONE) {
 > -      rtems_semaphore_delete (libmutex);
 > -    }
 > -    libmutex = RTEMS_ID_NONE;
 > -    is_initialized = false;
 > +    rtems_mutex_lock(&libmutex);
 > +    rtems_mutex_destroy(&libmutex);

you should not be destroying the lock here?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/821#note_136984
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/20251208/760287f0/attachment.htm>


More information about the bugs mailing list