deloxide 1.1.0

Deloxide scrubs your threads clean by detecting deadlocks in real time—keeping your system smooth, safe, and corrosion-free. 🦀🧼🔒
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "deloxide.h"

int main(void) {
    int initialized = deloxide_init(NULL, NULL);
    if (initialized != 0 && initialized != 1) {
        return 1;
    }

    void *mutex = deloxide_create_mutex();
    if (mutex == NULL || deloxide_lock_mutex(mutex) != 0) {
        return 2;
    }
    if (deloxide_unlock_mutex(mutex) != 0) {
        return 3;
    }
    deloxide_destroy_mutex(mutex);
    return 0;
}