From: Hugo van der Sanden Date: Tue, 17 Dec 2002 00:51:46 +0000 (+0000) Subject: regen-headers to get new API docs from #18306 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c78c2b74b534960cba26d1362c8930e3a6dfd4cb;p=p5sagit%2Fp5-mst-13.2.git regen-headers to get new API docs from #18306 p4raw-id: //depot/perl@18310 --- diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 65b2878..41068c8 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -512,6 +512,35 @@ Found in file handy.h Create and return a new interpreter by cloning the current one. +perl_clone takes these flags as paramters: + +CLONEf_COPY_STACKS - is used to, well, copy the stacks also, +without it we only clone the data and zero the stacks, +with it we copy the stacks and the new perl interpreter is +ready to run at the exact same point as the previous one. +The pseudo-fork code uses COPY_STACKS while the +threads->new doesn't. + +CLONEf_KEEP_PTR_TABLE +perl_clone keeps a ptr_table with the pointer of the old +variable as a key and the new variable as a value, +this allows it to check if something has been cloned and not +clone it again but rather just use the value and increase the +refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill +the ptr_table using the function +C, +reason to keep it around is if you want to dup some of your own +variable who are outside the graph perl scans, example of this +code is in threads.xs create + +CLONEf_CLONE_HOST +This is a win32 thing, it is ignored on unix, it tells perls +win32host code (which is c++) to clone itself, this is needed on +win32 if you want to run two threads at the same time, +if you just want to do some stuff in a separate perl interpreter +and then throw it away and return to the original one, +you don't need to do anything. + PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags) =for hackers