Tor 0.4.9.2-alpha-dev
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hashx_thread.h
1/* Copyright (c) 2020 tevador <tevador@gmail.com> */
2/* See LICENSE for licensing information */
3
4#ifndef HASHX_THREAD_H
5#define HASHX_THREAD_H
6
7#include <hashx.h>
8
9#ifdef HASHX_WIN
10#include <Windows.h>
11typedef HANDLE hashx_thread;
12typedef DWORD hashx_thread_retval;
13#define HASHX_THREAD_SUCCESS 0
14#else
15#include <pthread.h>
16typedef pthread_t hashx_thread;
17typedef void* hashx_thread_retval;
18#define HASHX_THREAD_SUCCESS NULL
19#endif
20
21typedef hashx_thread_retval hashx_thread_func(void* args);
22
23hashx_thread hashx_thread_create(hashx_thread_func* func, void* args);
24
25void hashx_thread_join(hashx_thread thread);
26
27#endif