X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fthread.h;h=79f3e713c34bf99d293e96a12f1ae3f32113a78b;hb=1db0dacec8f9d7f5687e582bd282d9bf83bd58f0;hp=7ad81b233b68ac5df1dac76582cf9ef8cc466f02;hpb=a1ec01f78c69ac89b70269884acc212a23e49622;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h index 7ad81b23..79f3e713 100644 --- a/cinelerra-5.1/guicast/thread.h +++ b/cinelerra-5.1/guicast/thread.h @@ -25,12 +25,17 @@ #include #include #include + +#ifndef NO_TID #include // glibc >= 2.30 provides gettid() in unistd #if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 30) static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); } #endif +#else +static inline long gettid() { return (long)pthread_self(); } +#endif // The thread does not autodelete by default. // If autodelete is 1 the thread autodeletes.