aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2015-07-13 15:38:41 +0200
committerLukas Larsson <[email protected]>2015-12-15 10:05:37 +0100
commit4b98e710b9c45481c1cdc7a4ee68f7ce7fca908a (patch)
tree85540d384eacdc9e15c6ffbbaacac9ff053c0ba1 /erts/doc
parent6f760fcaf2608cc25684e17660a95e51f080c7af (diff)
downloadotp-4b98e710b9c45481c1cdc7a4ee68f7ce7fca908a.tar.gz
otp-4b98e710b9c45481c1cdc7a4ee68f7ce7fca908a.tar.bz2
otp-4b98e710b9c45481c1cdc7a4ee68f7ce7fca908a.zip
erts: Add support for asynchronous open_port
OTP-13086
Diffstat (limited to 'erts/doc')
-rw-r--r--erts/doc/src/driver_entry.xml9
-rw-r--r--erts/doc/src/erl_driver.xml28
2 files changed, 36 insertions, 1 deletions
diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml
index c802693977..ae7f264d0c 100644
--- a/erts/doc/src/driver_entry.xml
+++ b/erts/doc/src/driver_entry.xml
@@ -437,7 +437,14 @@ typedef struct erl_drv_entry {
<seealso marker="erl_driver#erl_drv_busy_msgq_limits">erl_drv_busy_msgq_limits()</seealso>
function.
</item>
- </taglist>
+ <tag><c>ERL_DRV_FLAG_USE_INIT_ACK</c></tag>
+ <item>When this flag is given the linked-in driver has to manually
+ acknowledge that the port has been successfully started using
+ <seealso marker="erl_driver#erl_drv_init_ack">erl_drv_init_ack()</seealso>.
+ This allows the implementor to make the erlang:open_port exit with
+ badarg after some initial asynchronous initialization has been done.
+ </item>
+ </taglist>
</item>
<tag>void *handle2</tag>
<item>
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index f7b4187b80..a2a1df37e5 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -2131,6 +2131,34 @@ ERL_DRV_MAP int sz
</func>
<func>
+ <name><ret>void</ret><nametext>erl_drv_init_ack(ErlDrvPort port, ErlDrvData res)</nametext></name>
+ <fsummary>Acknowledge the start of the port</fsummary>
+ <desc>
+ <marker id="erl_drv_init_ack"></marker>
+ <p>Arguments:</p>
+ <taglist>
+ <tag><c>port</c></tag>
+ <item>The port handle of the port (driver instance) creating
+ doing the acknowledgment.
+ </item>
+ <tag><c>res</c></tag>
+ <item>The result of the port initialization. This can be the same values
+ as the return value of <seealso marker="driver_entry#start">start</seealso>,
+ i.e any of the error codes or the ErlDrvData that is to be used for this
+ port.
+ </item>
+ </taglist>
+ <p>
+ When this function is called the initiating erlang:open_port call is
+ returned as if the <seealso marker="driver_entry#start">start</seealso>
+ function had just been called. It can only be used when the
+ <seealso marker="driver_entry#driver_flags">ERL_DRV_FLAG_USE_INIT_ACK</seealso>
+ flag has been set on the linked-in driver.
+ </p>
+ </desc>
+ </func>
+
+ <func>
<name><ret>int</ret><nametext>erl_drv_thread_create(char *name,
ErlDrvTid *tid,
void * (*func)(void *),