sc/thread
Tezc e6c0c88dff
clang-tidy (#55)
* clang-tidy
2021-02-24 18:37:21 +03:00
..
2021-02-24 18:37:21 +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
2021-02-07 22:31:04 +03:00
2021-02-07 22:31:04 +03:00

Thread

Overview

  • Thread wrapper for Posix and Windows

Usage


#include "sc_thread.h"

#include <stdio.h>

void* fn(void* arg)
{
    printf("%s \n", (char*) arg);
    return arg;
}

int main(int argc, char *argv[])
{
    struct sc_thread thread;

    sc_thread_init(&thread);
    sc_thread_start(&thread, fn, "first");
    sc_thread_term(&thread);
    return 0;
}