[BACK]Return to patch-src_threading.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / parallel / lua-lanes / patches

File: [cvs.NetBSD.org] / pkgsrc / parallel / lua-lanes / patches / Attic / patch-src_threading.h (download)

Revision 1.1, Sat Jul 11 16:15:09 2020 UTC (3 years, 7 months ago) by nia
Branch: MAIN
CVS Tags: pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3

parallel: Add lua-lanes

Lua Lanes is a Lua extension library providing the possibility to run multiple
Lua states in parallel. It is intended to be used for optimizing performance
on multicore CPUs and to study ways to make Lua programs naturally parallel
to begin with.

$NetBSD: patch-src_threading.h,v 1.1 2020/07/11 16:15:09 nia Exp $

NetBSD support.

--- src/threading.h.orig	2018-11-30 12:28:50.000000000 +0000
+++ src/threading.h
@@ -143,7 +143,7 @@ enum e_status { PENDING, RUNNING, WAITIN
   //
   #if defined( PLATFORM_OSX)
     #define YIELD() pthread_yield_np()
-#elif defined( PLATFORM_WIN32) || defined( PLATFORM_POCKETPC) || defined(__ANDROID__) // no PTHREAD for PLATFORM_XBOX
+#elif defined( PLATFORM_WIN32) || defined( PLATFORM_POCKETPC) || defined(__ANDROID__) || defined(__NetBSD__) // no PTHREAD for PLATFORM_XBOX
     // for some reason win32-pthread doesn't have pthread_yield(), but sched_yield()
     #define YIELD() sched_yield()
   #else