tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

hashx_thread.h (619B)


      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>
     11 typedef HANDLE hashx_thread;
     12 typedef DWORD hashx_thread_retval;
     13 #define HASHX_THREAD_SUCCESS 0
     14 #else
     15 #include <pthread.h>
     16 typedef pthread_t hashx_thread;
     17 typedef void* hashx_thread_retval;
     18 #define HASHX_THREAD_SUCCESS NULL
     19 #endif
     20 
     21 typedef hashx_thread_retval hashx_thread_func(void* args);
     22 
     23 hashx_thread hashx_thread_create(hashx_thread_func* func, void* args);
     24 
     25 void hashx_thread_join(hashx_thread thread);
     26 
     27 #endif