[PATCH] Patch to patch for callbacks in core

I should have tested this better before submitting it.  This patch is to
Perl 11722 after applying my previous patch.

Now callbacks will actually work. :-)

- D

<dmlloyd@tds.net>

--- mg.c-old	Tue Aug 21 13:26:52 2001
+++ perl-devel/mg.c	Tue Aug 21 15:09:16 2001
@@ -1068,7 +1068,18 @@
 void
 Perl_despatch_signals(pTHX)
 {
-    PL_event_pending = 0;
+    if (PL_callback_head != NULL) {
+	CALLBACK *cur, *next;
+
+        for (cur = PL_callback_head; cur != NULL; cur = next) {
+            next = cur->next;
+            (*cur->callback)(cur->data);
+        }
+    } else {
+	MUTEX_LOCK(&PL_callback_mutex);
+    	PL_event_pending = (PL_callback_head != NULL);
+	MUTEX_UNLOCK(&PL_callback_mutex);
+    }
     if (PL_sig_pending) {
 	int sig;
 	PL_sig_pending = 0;
@@ -1079,14 +1090,6 @@
 	    }
 	}
     }
-    if (PL_callback_head != NULL) {
-	CALLBACK *cur, *next;
-
-        for (cur = PL_callback_head; cur != NULL; cur = next) {
-            next = cur->next;
-            (*cur->callback)(cur->data);
-        }
-    }
 }

 /*
@@ -1133,6 +1136,7 @@
 	cbptr->prev = NULL;
 	PL_callback_head = cbptr;
 	cbptr->enabled = 1;
+	PL_event_pending = 1;
     }

     MUTEX_UNLOCK(&PL_callback_mutex);

0
dmlloyd
8/21/2001 8:35:17 PM
perl.perl5.porters 48287 articles. 1 followers. Follow

1 Replies
1375 Views

Similar Articles

[PageSpeed] 50

David M . Lloyd <dmlloyd@tds.net> writes:
>I should have tested this better before submitting it.  This patch is to
>Perl 11722 after applying my previous patch.

For something like this I would rather have one patch.

-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/

0
nick
8/22/2001 7:22:35 AM
Reply:

Similar Artilces:

Patches, patches, patches...
To forestall potential incidents of Warnock's Dillemma... I'm about to apply a whole heap 'o patches to Parrot. (With appropriate [APPLIED] responses, I hope) If, at the end of the day, I have *not* applied or commented on a patch you've sent, it means I've Officially Missed It, so give another try. Sorry 'bout this. Too much mail in the mailbox, and going back in time is tricky, as it can miss subsequent discussions on patches 'n stuff. -- Dan --------------------------------------"it's like th...

Patches, patches, patches... #2
OK, this is advance warning that I'm about to be reposting a bunch of patches of mine which appear to have succumbed to Warnock's Dilemma. The first three should be uncontroversial: there's a documentation fix-up for core.ops, and new tests for strings and stacks. The last one is rather larger, and consists of a greatly expanded set of tests for PerlString's, plus a bunch of bug-fixes. I'd be grateful if Jeff or Dan could take a look at this, as I have the feeling that a lot of the scalar PMCs are going to need similar fixes. Simon ...

[PATCH] todo patch
--- perltodo.pod.old Wed May 16 17:51:45 2001 +++ perltodo.pod Mon May 28 16:56:29 2001 @@ -68,6 +68,10 @@ Artur Bergman's C<iThreads> module is a start on this, but needs to be more mature. +=head2 make perl_clone optionally clone ops + +So at pseduforking, mod_perl , iThreads and nvi will work properly (not as efficient) until regex engine is fixed + =head2 Work out exit/die semantics for threads =head2 Typed lexicals for compiler On Mon 28 May 2001 17:03, Artur Bergman <artur@contiller.se> wrote: > --- perltodo.pod.old Wed May 16 17:5...

[PATCH] More Build patches
Two patches inline... A small change to Makefile.in so that 'make test' doesn't try to run without an interpreter or missing assembler libraries. Index: Makefile.in =================================================================== RCS file: /home/perlcvs/parrot/Makefile.in,v retrieving revision 1.24 diff -u -r1.24 Makefile.in --- Makefile.in 2001/10/14 10:58:19 1.24 +++ Makefile.in 2001/10/15 14:42:12 @@ -106,7 +106,7 @@ cd t; make clean cd docs; make clean -test: .test_dummy +test: $(TEST_PROG) assemble.pl .test_dummy .test_dummy: ...

[PATCH] cygwin070patches_4.patch
--------------030804070801060907040802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit My latest patch against the cygwin070patches branch r30596. * Finished implementation of the makefile expansion - "perl-style" * Changed all relevant makefile templates. make fulltest and make codetest has the same few mt-thread and resume errors as always. A new idea: =========== #IF(darwin): #ALSO:# MACOSX_DEPLOYMENT_TARGET must be defined for OS X #ALSO:export MACOSX_DEPLOYMENT_TARGET := @osx_version@ The POD for this change: ...

[PATCH] Debian patches
--qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Attached are the patches to Debian's 5.8.4 package not currently covered by my latest rsync of perl-5.8.x. The patches have been re-worked to apply cleanly to that branch, but all should be applicable to perl-current as well. 10_fix_file_path Rewrite of File::Path::rmtree. This is the most important patch, it replaces rmtree with a recursive function to remove a race condition which potentially allows an attacker to make files suid or to remove arbitrary files (CAN-2...

PATCH: clarify where to patch against
--envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Talking about Perl 5 git repo tonight, some questions came up about where development really happens. This patch is a bit of clarification about where/why patches go to blead/maint. -- rjbs --envbJBWh7q8WU6mo Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-very-minor-tweaks-to-description-of-maint-blead.patch" From 1b7ad6bc0c93abd2d9fad847e8449824e529ba24 Mon Sep 17 00:00:00 2001 From: Ricardo SIGNES <rjbs@cpan.org> Date:...

[PATCH] installperl patch
------=_Part_72778_11907270.1186149310146 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The attached patch modifies installperl as follows: 1. Don't install lib/CGI/eg/*. (These files aren't installed by the CPAN version of CGI either.) 2. Don't install lib/ExtUtils/NOTES, and lib/ExtUtils/PATCHING. (These files aren't installed by the CPAN version of ExtUtils::MakeMaker either.) ------=_Part_72778_11907270.1186149310146 Content-Type: application/octet-stream; name=installperl.patch Content-Transf...

[PATCH] more pod patches
Yet more pod linting, this time on .pm files. I've touched things without fear or favour mostly - I think probably a few of these changes affect things that are also maintained outside the core. diff -urN perl-current.orig/configpm perl-current/configpm --- perl-current.orig/configpm Thu Mar 15 20:33:42 2001 +++ perl-current/configpm Thu Mar 15 21:10:59 2001 @@ -418,7 +418,7 @@ print CONFIG <<EOF; =head2 $c -=over +=over 4 EOF $text = 1; diff -urN perl-current.orig/ext/B/B/Bytecode.pm perl-current/ext/B/B/Bytecode.pm --- perl-current.orig/ext/B/B/B...

[PATCH] patching for sunos
Hi coders, greetings from the stone age: This is perl, v5.9.4 built for sun4-sunos-stdio SunOS Release 4.1.3 (GENERIC) #3: Mon Jul 27 16:44:16 PDT 1992 $ uname -a SunOS xxx 4.1.3 3 sun4m If anyone is interested in patches for SunOS yet, I have some. Some are harmless, some may not be optimal. Help/hints/tips are always nice and appreciated. 1. SunOS realloc() does not like NULL pointers as parameters. (buf?realloc((buf), (size)):malloc((size))) 2. There is no strtoul(), alas. Some older code correctly uses the Strtoul() macro (capital S). Newer additions don't...

Microsoft patching its patches
While we're on the topic of zombies, security and patches..... George. ------------------------------------------------------------------------ "Exchange security patch needs patching" The patch needs a patch. The security update Microsoft rolled out last week to caulk a hole in Exchange 2000 server actually needs a patch itself. MS is also broadening its original Exchange 2000 security bulletin to include Exchange 5.5 Server deployments for the first time. Microsoft says if you've deployed Outlook Web Access, you need to patch ASAP. SOURCE: ENT Magazine http...

BlackIce Patched or Not Patched?
ISS recently released a patch for the much published denial of server venerability in BlackIce Defender. Yet, eEye referred to the venerability as a buffer overflow. My question is ... does the newly released patch cover both? The ISS site does not refer to a buffer overflow. Does that mean that even after installing the patch BlackIce Defender is open to a buffer overflow? (not good if so) I've taken BlackIce offline until I am certain that it is fully patched. Thanks in advance. Tom Correction: Denial of service venerability as opposed to denial of server. (grin) ...

[PATCH] perlhack on what to patch
--- pod/perlhack.pod.orig 2006-07-12 22:52:14.000000000 +0300 +++ pod/perlhack.pod 2006-07-12 23:05:40.000000000 +0300 @@ -598,14 +598,22 @@ =head2 Submitting patches but context diffs are accepted. Do not send RCS-style diffs or diffs without context lines. More information is given in the I<Porting/patching.pod> file in the Perl source distribution. Please -patch against the latest B<development> version (e.g., if you're -fixing a bug in the 5.005 track, patch against the latest 5.005_5x -version). Only patches that survive the heat of the development ...

[PATCH] Core.ops documentation patch
The enclosed patch expands (and hopefully clarifies) the documentation for rotate_up, plus fixes one or two other niggles in the docs. Simon --- core.ops.old Sat Apr 6 19:12:43 2002 +++ core.ops Sat Apr 6 21:12:42 2002 @@ -229,8 +229,13 @@ =item B<print>(in INT, in NUM) +=item B<print>(in INT, in STR) + =item B<print>(in INT, in PMC) +Print $2 to the file specified by file descriptor $1; for $1 equal to +0, 1 or 2, we use stdin, stdout or stderr respectively. + =cut inline op print(in INT) { @@ -2543,8 +2548,13 @@ =item B<rotate_up...

Web resources about - [PATCH] Patch to patch for callbacks in core - perl.perl5.porters

Callback (computer programming) - Wikipedia, the free encyclopedia
In computer programming , a callback is a piece of executable code that is passed as an argument to other code, which is expected to call back ...

jQuery callback on image load (even when the image is cached)
I want to do: $("img").bind('load', function() { // do stuff }); But the load event doesn't fire when the image is loaded from cache. The jQuery ...

Callback Dialer - cheap calls/VoIP without WiFi/3G on the App Store on iTunes
Get Callback Dialer - cheap calls/VoIP without WiFi/3G on the App Store. See screenshots and ratings, and read customer reviews.

Uh-Oh! Hackers Screw Up Biglaw Callbacks At T14 Law School
Which law school experienced a hack that could've put students' careers in jeopardy?

Android Device Manager adds message and callback number options for lost phones
Android Device Manager, the service that helps you locate and lock lost devices, is picking up an update on the web and for Android that gives ...

Fantastical For iPhone Updated With New Event List View, Callback URL And More
... in the event list. This serves as an alternative to the default infinite event list, which can be quite confusing at times. Another is x-callback-url ...

'So You Think You Can Dance' recap, callbacks in L.A. - Baltimore Sun
Callbacks in Los Angeles (actually Pasadena), where 157 hopefuls will be winnowed down to 20 finalists. There will be tears, injuries and mental ...

18 Fun Easter Eggs, Callbacks, And Moments Of Really Cool Symmetry From The “Breaking Bad” Finale
18 Fun Easter Eggs, Callbacks, And Moments Of Really Cool Symmetry From The “Breaking Bad” Finale

The Jurassic World Trailer Teaser Is A Perfect Callback To The Franchise's Greatest Moment
Jurassic World 's first teaser is coming, and we have the announcement that proves it. Something big is coming, this Thanksgiving.

Toyota joins recall spree with 380,000-vehicle callback
... Lexus GS 350 sedans. FORTUNE Another day, another automotive recall. This time it's Toyota (TM) that's joining the string of recent car callbacks. The ...

Resources last updated: 12/17/2015 6:39:23 AM