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.2 by root, Sat Jun 27 19:36:39 2015 UTC vs.
Revision 1.3 by root, Sat Jun 27 19:38:59 2015 UTC

1TODO: if () acquire example
2/* 1/*
3 * Author: Marc A. Lehmann <xsthreadpool@schmorp.de> 2 * Author: Marc A. Lehmann <xsthreadpool@schmorp.de>
4 * License: public domain, or where this is not possible/at your option, 3 * License: public domain, or where this is not possible/at your option,
5 * CC0 (https://creativecommons.org/publicdomain/zero/1.0/) 4 * CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
6 */ 5 */
7 6
8#ifndef PERL_MULTICORE_H 7#ifndef PERL_MULTICORE_H
9#define PERL_MULTICORE_H 8#define PERL_MULTICORE_H
10 9
11#if 0 10/*
12
13=head1 NAME 11=head1 NAME
14 12
15perlmulticore.h - release the perl interpreter for other uses while doing hard work 13perlmulticore.h - release the perl interpreter for other uses while doing hard work
16 14
17=head1 SYNOPSIS 15=head1 SYNOPSIS
59perl's built-in C<flock>, it allows other threads (for example, those 57perl's built-in C<flock>, it allows other threads (for example, those
60provided by L<Coro>) to execute, instead of blocking the whole perl 58provided by L<Coro>) to execute, instead of blocking the whole perl
61interpreter. For the sake of this example, it requires a file descriptor 59interpreter. For the sake of this example, it requires a file descriptor
62instead of a handle. 60instead of a handle.
63 61
64 #include "perlmulticore.h" /* this header file */ 62 #include "perlmulticore.h" // this header file
65 63
66 // and in the XS portion 64 // and in the XS portion
67 int flock (int fd, int operation) 65 int flock (int fd, int operation)
68 CODE: 66 CODE:
69 perlinterp_release (); 67 perlinterp_release ();
306The F<perlmulticore.h> is put into the public domain. Where this is legally 304The F<perlmulticore.h> is put into the public domain. Where this is legally
307not possible, or at your option, it can be licensed under creativecommons 305not possible, or at your option, it can be licensed under creativecommons
308CC0 license: L<https://creativecommons.org/publicdomain/zero/1.0/>. 306CC0 license: L<https://creativecommons.org/publicdomain/zero/1.0/>.
309 307
310=cut 308=cut
311 309*/
312#endif
313 310
314struct perl_multicore_api 311struct perl_multicore_api
315{ 312{
316 void (*pmapi_release)(void); 313 void (*pmapi_release)(void);
317 void (*pmapi_acquire)(void); 314 void (*pmapi_acquire)(void);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines