Jan Jancar on Sun, 16 Apr 2017 15:01:52 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
libpari: threads and argument passing |
Hello PARI developers, looking at the "PARI and threads" part of the libpari manual suggests that the only way to pass an argument to a PARI thread is if it is a GEN. However it could be quite useful to be able to pass an arbitrary void* as the pthread API allows. A void* is guaranteed to be able to hold a pointer to any type, so passing a GEN is still possible, while a long* (what a GEN really is) is not guaranteed to be able to hold a pointer to any type. This generally makes passing a pointer to a custom structure and casting it to a GEN risky business on architectures where it doesn't fit (are there any?). Is there some reason I'm not seeing as to why the argument is restricted to a GEN type? Cheers, -- Jan ______________________________________________________ /\ # PGP: 362056ADA8F2F4E421565EF87F4A448FE68F329D /__\ # https://neuromancer.sk /\ /\ # Eastern Seaboard Phishing Authority /__\/__\ #
Attachment:
signature.asc
Description: OpenPGP digital signature