pthread 线程通信

5-21 1,064 views

pthread

thread 1

    pthread_mutex_lock(&android_app->mutex);
    while (!android_app->running) {
        pthread_cond_wait(&android_app->cond, &android_app->mutex);
    }
    pthread_mutex_unlock(&android_app->mutex);

thread2

    pthread_mutex_lock(&android_app->mutex);
    android_app->running = 1;
    pthread_cond_broadcast(&android_app->cond);
    pthread_mutex_unlock(&android_app->mutex);

COM in plain C

https://www.codeproject.com/Articles/13601/COM-in-plain-C

阅读全文

A Brief Intro to Input Method Framework, Linux IME, and XIM

https://tedyin.com/posts/a-brief-intro-to-linux-input-method-framework/ There are chances one need an input method editor (IME). For CJK users, su...

阅读全文

使用Visual studio查看exe或DLL文件的依赖项

事先准备:只要 Visual Studio 任何版本即可。 点击开始 -> 程序 -> Visual Studio对应的版本,打开Visual Studio Tools -> 选择 命令提示 进入命...

阅读全文

欢迎留言