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.9 by root, Sun Jun 28 18:43:17 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#define PERL_MULTICORE_MAJOR 1 /* bumped on incompatible changes */
336#define PERL_MULTICORE_MINOR 0 /* bumped on every change */
337
338#if PERL_MULTICORE_DISABLE
339
340#define perlinterp_release() do { } while (0)
341#define perlinterp_acquire() do { } while (0)
342
343#else
320 344
321/* this struct is shared between all modules, and currently */ 345/* this struct is shared between all modules, and currently */
322/* contain only the two function pointers for release/acquire */ 346/* contain only the two function pointers for release/acquire */
323struct perl_multicore_api 347struct perl_multicore_api
324{ 348{
369 /* call the real (or dummy) implementation now */ 393 /* call the real (or dummy) implementation now */
370 perlinterp_release (); 394 perlinterp_release ();
371} 395}
372 396
373#endif 397#endif
398
399#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines