Tezc 950d6f191b
Build test on debug only (#45)
* Build tests in debug mode only, fix gcc warnings
* strncpy fix in thread err
2021-02-16 04:23:08 +03:00
..
2021-02-07 22:31:04 +03:00
2021-02-07 22:31:04 +03:00
2021-02-07 22:31:04 +03:00
2021-02-16 04:23:08 +03:00
2021-02-14 16:19:26 +03:00

Mutex

Mutex wrapper

  • Basic mutex wrapper for Posix and Windows.

#include "sc_mutex.h"

int main(int argc, char *argv[])
{
    struct sc_mutex mutex;

    sc_mutex_init(&mutex); // Init mutex

    sc_mutex_lock(&mutex);
    sc_mutex_unlock(&mutex);

    sc_mutex_term(&mutex); // destroy mutex

    return 0;
}