Displaying 7 results from an estimated 7 matches for "callback2".
Did you mean:
callback
2008 Feb 04
8
AGI: Not getting answers from get_data in a call-file call
I have the following situation: I drop a call-file into the Asterisk
spool directory and I get called back. That all works.
And I have this script:
#!/usr/bin/perl -w
use Asterisk::AGI;
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$AGI->answer();
my $i;
$i = $AGI->channel_status();
$AGI->say_digits($i);
$i =
2009 Jan 08
1
Callbacks seems to get GCed.
...>
#define R_INTERFACE_PTRS 1
#include <Rversion.h>
#include <Rembedded.h>
#include <Rinternals.h>
#include <Rdefines.h>
#include <R_ext/Parse.h>
#include <R_ext/Rdynload.h>
#include <R_ext/RStartup.h>
#include <Rinterface.h>
SEXP callback1;
SEXP callback2;
void set_callback1(SEXP func) {
PROTECT(callback1 = func);
}
void set_callback2(SEXP func) {
PROTECT(callback2 = func);
}
R_CMethodDef cMethods[] = {
{NULL}
};
R_CallMethodDef callMethods[] = {
{"set_callback1", (DL_FUNC) &set_callback1, 1},
{"set_callback2&qu...
2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
...erestingly, when I had foo call UseCallback multiple times with
*only* callback1, it yanked the function pointer parameter out of
UseCallback and turned the thing into a direct call. (I'm guessing
dead argument elimination came into play here) But as soon as I added
a call to UseCallback with callback2 to the mix, it went back to not
making any indirect call elimination.
On Fri, Jun 4, 2010 at 11:11 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Kenneth,
>
>> By that I mean an optimization pass (or a combination of them) that turns:
> ...
>> With that transform in...
2010 Jun 04
0
[LLVMdev] Is there a "callback optimization"?
Hi Kenneth,
> By that I mean an optimization pass (or a combination of them) that turns:
...
> With that transform in place, lots of inlining becomes possible, and
> direct function calls replace indirect function calls if inlining
> isn't appropriate. If this transform is combined with argpromotion
> and scalarrepl, it can be used for devirtualization of C++ virtual
>
2013 Nov 01
4
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
...lt;< "Arg1 = " << Args->Arg1 << " Arg2 = " << Args->Arg2 << std::endl;
+ if(LLVM_arg){
+ std::string *str = (std::string *)LLVM_arg;
+ std::cout << "Arg = " << *str << std::endl;
+ }
+ return NULL;
+}
+
+void *Callback2(const void *Arg) {
+ std::cout << "In Callback2" << std::endl;
+ std::string *str = (std::string *)Arg;
+ std::cout << "Arg = " << *str << std::endl;
+ return NULL;
+}
+
//===-------------------------------------------------------------...
2010 Jun 04
0
[LLVMdev] Is there a "callback optimization"?
...ad foo call UseCallback multiple times with
> *only* callback1, it yanked the function pointer parameter out of
> UseCallback and turned the thing into a direct call. (I'm guessing
> dead argument elimination came into play here) But as soon as I added
> a call to UseCallback with callback2 to the mix, it went back to not
> making any indirect call elimination.
>
> On Fri, Jun 4, 2010 at 11:11 AM, Duncan Sands <baldrick at free.fr> wrote:
>> Hi Kenneth,
>>
>>> By that I mean an optimization pass (or a combination of them) that turns:
>> ...
&g...
2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
By that I mean an optimization pass (or a combination of them) that turns:
void useCallback(void (*callbackfn)())
{
// Do something
callbackfn();
// Do something else
}
void myCallback()
{
// Respond one way
}
void myOtherCallback()
{
// Respond another way
}
void foo()
{
useCallback(myCallback);
useCallback(myOtherCallback);
}
into:
// Keep the original; it'll get removed
// by other