From 23c6f9e07a3cae7c05e55abd01ff798384241538 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sun, 16 Sep 2012 02:45:32 +0200 Subject: Add erl_drv_[send|output]_term --- system/doc/efficiency_guide/drivers.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'system/doc/efficiency_guide/drivers.xml') diff --git a/system/doc/efficiency_guide/drivers.xml b/system/doc/efficiency_guide/drivers.xml index fec68ca059..b10595ea4d 100644 --- a/system/doc/efficiency_guide/drivers.xml +++ b/system/doc/efficiency_guide/drivers.xml @@ -105,9 +105,9 @@ client_port() ->

If you know that the binaries you return are always small, you should use driver API calls that do not require a pre-allocated binary, for instance - driver_output() + driver_output() or - driver_output_term() + erl_drv_output_term() using the ERL_DRV_BUF2BINARY format, to allow the run-time to construct a heap binary.

@@ -120,7 +120,7 @@ client_port() -> the driver to an Erlang process, the driver must first allocate the binary and then send it to an Erlang process in some way.

-

Use driver_alloc_binary() to allocate a binary.

+

Use driver_alloc_binary() to allocate a binary.

There are several ways to send a binary created with driver_alloc_binary().

@@ -128,17 +128,17 @@ client_port() ->

From the control callback, a binary can be returned provided that - set_port_control() + set_port_control_flags() has been called with the flag value PORT_CONTROL_FLAG_BINARY.

A single binary can be sent with - driver_output_binary().

+ driver_output_binary().

Using - driver_output_term() + erl_drv_output_term() or - driver_send_term(), + erl_drv_send_term(), a binary can be included in an Erlang term.

-- cgit v1.2.3