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

Comparing perlmulticore/perlmulticore.h (file contents):
Revision 1.1 by root, Thu Jul 2 22:39:56 2015 UTC vs.
Revision 1.2 by root, Thu Jul 2 23:45:01 2015 UTC

13 13
14/* 14/*
15 15
16=head1 NAME 16=head1 NAME
17 17
18perlmulticore.h - the Perl Multicore Specification and Implementation 18perlmulticore.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
149START_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 */
151struct perl_multicore_api 153struct perl_multicore_api
152{ 154{
154 void (*pmapi_acquire)(void); 156 void (*pmapi_acquire)(void);
155}; 157};
156 158
157static void perl_multicore_init (void); 159static void perl_multicore_init (void);
158 160
159const struct perl_multicore_api perl_multicore_api_init = { perl_multicore_init, 0 }; 161static const struct perl_multicore_api perl_multicore_api_init
162 = { perl_multicore_init, 0 };
160 163
161static struct perl_multicore_api *perl_multicore_api 164static 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
204END_EXTERN_C
205
201#endif 206#endif
202 207
203#endif 208#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines