ali-iotkit icon indicating copy to clipboard operation
ali-iotkit copied to clipboard

IOT_Linkkit_Close 返回 unlock mutex failed,err num: -1

Open GlideLeo opened this issue 5 years ago • 0 comments

运行linkkit_example.c下的linkkit_solo_main(void)

    while (1) {
        IOT_Linkkit_Yield(EXAMPLE_YIELD_TIMEOUT_MS);

        /* Post Proprety Example */
        if ((cnt % 2) == 0) {
            user_post_property();
        }

        /* Post Event Example */
        if ((cnt % 10) == 0) {
            user_post_event();
        }

        if (++cnt > 180) {  //示例是3600s
            break;
        }

        HAL_SleepMs(1000);
    }
    IOT_Linkkit_Close(g_user_example_ctx.master_devid);

    ... ...

while(1)达到break条件,会执行IOT_Linkkit_Close(g_user_example_ctx.master_devid);,但是每次都会出错image 实际调用的是HAL_MutexUnlock(void *mutex),即RTT的接口rt_mutex_release((rt_mutex_t)mutex)))

GlideLeo avatar Mar 25 '20 22:03 GlideLeo