-removed BECS imports from thread pool

-make JobUpdater selfcontaining (dependes only on BECS and ThreadPool)
This commit is contained in:
Mergul 2021-03-03 13:13:57 +01:00
parent a3b33a4935
commit 18b5942b99
2 changed files with 145 additions and 7 deletions

View file

@ -18,6 +18,27 @@ else
}
}
version(Android)
{
alias pthread_key_t = uint;
extern (C) int pthread_key_create(pthread_key_t *, void* function(void *)) @nogc nothrow;
extern (C) int pthread_key_delete(pthread_key_t) @nogc nothrow;
extern (C) void* pthread_getspecific(pthread_key_t) @nogc nothrow;
extern (C) int pthread_setspecific(pthread_key_t, const void *) @nogc nothrow;
}
else version(WebAssembly)
{
alias pthread_key_t = uint;
extern (C) int pthread_key_create(pthread_key_t *, void* function(void *)) @nogc nothrow;
extern (C) int pthread_key_delete(pthread_key_t) @nogc nothrow;
extern (C) void* pthread_getspecific(pthread_key_t) @nogc nothrow;
extern (C) int pthread_setspecific(pthread_key_t, const void *) @nogc nothrow;
extern (C) void emscripten_main_thread_process_queued_calls();
}
struct ECSJobUpdater
{