… | |
… | |
13 | |
13 | |
14 | /* |
14 | /* |
15 | |
15 | |
16 | =head1 NAME |
16 | =head1 NAME |
17 | |
17 | |
18 | perlmulticore.h - the Perl Multicore Specification and Implementation |
18 | perlmulticore.h - implements the Perl Multicore Specification |
19 | |
19 | |
20 | =head1 SYNOPSIS |
20 | =head1 SYNOPSIS |
21 | |
21 | |
22 | #include "perlmultiore.h" |
22 | #include "perlmultiore.h" |
23 | |
23 | |
… | |
… | |
143 | |
143 | |
144 | #define perlinterp_release() do { } while (0) |
144 | #define perlinterp_release() do { } while (0) |
145 | #define perlinterp_acquire() do { } while (0) |
145 | #define perlinterp_acquire() do { } while (0) |
146 | |
146 | |
147 | #else |
147 | #else |
|
|
148 | |
|
|
149 | START_EXTERN_C |
148 | |
150 | |
149 | /* this struct is shared between all modules, and currently */ |
151 | /* this struct is shared between all modules, and currently */ |
150 | /* contain only the two function pointers for release/acquire */ |
152 | /* contain only the two function pointers for release/acquire */ |
151 | struct perl_multicore_api |
153 | struct perl_multicore_api |
152 | { |
154 | { |
… | |
… | |
154 | void (*pmapi_acquire)(void); |
156 | void (*pmapi_acquire)(void); |
155 | }; |
157 | }; |
156 | |
158 | |
157 | static void perl_multicore_init (void); |
159 | static void perl_multicore_init (void); |
158 | |
160 | |
159 | const struct perl_multicore_api perl_multicore_api_init = { perl_multicore_init, 0 }; |
161 | static const struct perl_multicore_api perl_multicore_api_init |
|
|
162 | = { perl_multicore_init, 0 }; |
160 | |
163 | |
161 | static struct perl_multicore_api *perl_multicore_api |
164 | static struct perl_multicore_api *perl_multicore_api |
162 | = (struct perl_multicore_api *)&perl_multicore_api_init; |
165 | = (struct perl_multicore_api *)&perl_multicore_api_init; |
163 | |
166 | |
164 | #define perlinterp_release() perl_multicore_api->pmapi_release () |
167 | #define perlinterp_release() perl_multicore_api->pmapi_release () |
… | |
… | |
196 | |
199 | |
197 | /* call the real (or dummy) implementation now */ |
200 | /* call the real (or dummy) implementation now */ |
198 | perlinterp_release (); |
201 | perlinterp_release (); |
199 | } |
202 | } |
200 | |
203 | |
|
|
204 | END_EXTERN_C |
|
|
205 | |
201 | #endif |
206 | #endif |
202 | |
207 | |
203 | #endif |
208 | #endif |