I don’t think coroutines can be implemented with POSIX threads, and definitely not by simple pth<->pthread function replacement. Difference is fundamental - from OS side coroutine is nothing special while POSIX thread is “everything special”, almost a process.
But, if I understand correctly, John is not asking for that, he maybe missinterpreted what libpth and libpthread are…?
john o goyo <address@hidden> writes:Gaius:
On 24/12/2016 10:22, Gaius Mulley wrote:
Hi,
just to report that the gm2 graft onto gcc-5.2.0 now completely builds on an LP64 debian system with the following results.
The gm2-5.2.0 build fails (with the latest tarball) on Solaris 10/sparc. On Solaris, POSIX threads are in libpthread, not libpth. Is there a simple way to switch from -lpth to -lpthread in the gm2 portion?
john
Hi John,there isn't yet a simple way, it could be implemented if requiredthough. Gm2 uses libpth for the create context (NEWPROCESS), switchcontext (TRANSFER) and pth_select for (IOTRANSFER). Do these low level(create context/switch context) primitives exist in libpthread ?Here are the actual symbols used:pth_uctx_create, pth_uctx_make,pth_uctx_save, pth_uctx_switch,and typepth_uctx_tIf these symbols exist then we could certainly change the driver to pickup -lpthread at link time in the gm2 driver. ./configure could also bechanged to override the choice at build time as well.I wonder if it might be easier to build libpth and install it locallyto work around the problem for now?regards,Gaius_______________________________________________gm2 mailing listaddress@hiddenhttps://lists.nongnu.org/mailman/listinfo/gm2
|