ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro-Multicore/perlmulticore.h
(Generate patch)

Comparing Coro-Multicore/perlmulticore.h (file contents):
Revision 1.6 by root, Sun Jun 28 18:30:48 2015 UTC vs.
Revision 1.8 by root, Sun Jun 28 18:37:52 2015 UTC

300efficient when not needed, low code and data size overhead and broad 300efficient when not needed, low code and data size overhead and broad
301applicability. 301applicability.
302 302
303=back 303=back
304 304
305
306=head1 DISABLING PERL MULTICORE AT COMPILE TIME
307
308You can disable the complete perl multicore API by defining the
309symbol C<PERL_MULTICORE_DISABLE> to C<1> (e.g. by specifying
310F<-DPERL_MULTICORE_DISABLE> as compiler argument).
311
312This will leave no traces of the API in the compiled code, suitable
313"empty" C<perl_release> and C<perl_acquire> definitions will be provided.
314
315This could be added to perl's C<CPPFLAGS> when configuring perl on
316platforms that do not support threading at all for example.
317
318
305=head1 AUTHOR 319=head1 AUTHOR
306 320
307 Marc A. Lehmann <perlmulticore@schmorp.de> 321 Marc A. Lehmann <perlmulticore@schmorp.de>
308 http://perlmulticore.schmorp.de/ 322 http://perlmulticore.schmorp.de/
309 323
315license: L<https://creativecommons.org/publicdomain/zero/1.0/>. 329license: L<https://creativecommons.org/publicdomain/zero/1.0/>.
316 330
317=cut 331=cut
318 332
319*/ 333*/
334
335#if PERL_MULTICORE_DISABLE
336
337#define perlinterp_release() do { } while (0)
338#define perlinterp_acquire() do { } while (0)
339
340#else
320 341
321/* this struct is shared between all modules, and currently */ 342/* this struct is shared between all modules, and currently */
322/* contain only the two function pointers for release/acquire */ 343/* contain only the two function pointers for release/acquire */
323struct perl_multicore_api 344struct perl_multicore_api
324{ 345{
369 /* call the real (or dummy) implementation now */ 390 /* call the real (or dummy) implementation now */
370 perlinterp_release (); 391 perlinterp_release ();
371} 392}
372 393
373#endif 394#endif
395
396#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines