开发者

Erlang port driver communicating with C program

开发者 https://www.devze.com 2023-01-17 23:09 出处:网络
If I want my Erlang process connect with a C shared lib I use Erlang linked in port driver. As I want my C program sto开发者_运维问答res some data structures to respond to erlang calls, I must use gl

If I want my Erlang process connect with a C shared lib I use Erlang linked in port driver.

As I want my C program sto开发者_运维问答res some data structures to respond to erlang calls, I must use global variables.

Is there any problem?

Thanks!


You are running a c-programme in its own process and talking to it over a pipe - Erlang can't see the memory space of your C programme and doesn't care how you write it. You Erlang VM is not dependant on your port driver - that's what the architecture is for.

0

精彩评论

暂无评论...
验证码 换一张
取 消