[CCC DEV] FFI
Mathias Spiessens
mathias.spiessens at student.kuleuven.be
Tue Mar 13 09:35:02 GMT 2012
Hi Carl,
I had indeed forgotten to add the table to the ECTX.
Thanks,
Mathias
On 03/13/2012 09:39 AM, Carl Ritson wrote:
> Hi Mathias,
>
>> I have problems calling a function form the foreign function interface.
>>
>> <snip>
> At a quick look your code seems fine.
>
>> I've followed the example of the nxt wrapper. In a paper about the FFI
>> another naming convention was mentioned, without the "tvmspecial.0" yet in
>> another paper a leading "__" is mentioned.
> There are two schemes: the 'C.tvmspecial.' for FFI functions that are
> built in to the TVM binary and the 'C.' scheme for FFI functions in
> dynamic linked libraries.
>
>> Anyway none of these naming conventions seem to work.
>> Am I overlooking something?
> What is your observed behaviour?
> Have you linked your FFI functions in to the TVM binary and put your
> sffi_table in to the ECTX?
>
> See tvm/posix/sffi.c line 82:
> void install_sffi (ECTX ectx)
> {
> ectx->sffi_table = sffi_table;
> ectx->sffi_table_length = sizeof(sffi_table) / sizeof(SFFI_FUNCTION);
> }
>
> Cheers,
>
> Carl
>
> _______________________________________________
> developers mailing list
> developers at concurrency.cc
> http://www.concurrency.cc/mailman/listinfo/developers
More information about the developers
mailing list