Port Unix/ossource.cpp to Fuchsia

Fuchsia has pthreads but doesn't have sys/resource.h and doesn't
implement pthread_cleanup_push().

ANGLE bug: 2475
This commit is contained in:
Michael Spang 2019-01-30 15:11:42 -05:00
parent c9e03360e2
commit d39c040df9

View File

@ -45,7 +45,10 @@
#include <stdint.h> #include <stdint.h>
#include <cstdio> #include <cstdio>
#include <sys/time.h> #include <sys/time.h>
#if !defined(__Fuchsia__)
#include <sys/resource.h> #include <sys/resource.h>
#endif
namespace glslang { namespace glslang {
@ -70,7 +73,7 @@ static void DetachThreadLinux(void *)
// //
void OS_CleanupThreadData(void) void OS_CleanupThreadData(void)
{ {
#ifdef __ANDROID__ #if defined(__ANDROID__) || defined(__Fuchsia__)
DetachThreadLinux(NULL); DetachThreadLinux(NULL);
#else #else
int old_cancel_state, old_cancel_type; int old_cancel_state, old_cancel_type;