diff options
author | Sverker Eriksson <[email protected]> | 2010-10-06 10:53:49 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2010-10-06 10:53:49 +0200 |
commit | 24524dbd7867a27ba0550dbfd2c3fafed5ae0ca5 (patch) | |
tree | 578c55bd648d3f9e8c417a2c4f07b09874589bf9 /erts/doc/src/driver_entry.xml | |
parent | 3cfec17ff7aff97c5ec862a8b9e97d245849f9c3 (diff) | |
download | otp-24524dbd7867a27ba0550dbfd2c3fafed5ae0ca5.tar.gz otp-24524dbd7867a27ba0550dbfd2c3fafed5ae0ca5.tar.bz2 otp-24524dbd7867a27ba0550dbfd2c3fafed5ae0ca5.zip |
Documentation update to ETS and drivers
State more clearly that ETS functions will throw badarg if calling
process lacks access right. And that driver stop callback should free
memory allocted by start.
Diffstat (limited to 'erts/doc/src/driver_entry.xml')
-rw-r--r-- | erts/doc/src/driver_entry.xml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index e71b48bd92..dd949d4048 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -172,7 +172,7 @@ typedef struct erl_drv_entry { added to the driver list.) The driver should return 0, or if the driver can't initialize, -1.</p> </item> - <tag><marker id="start"/>int (*start)(ErlDrvPort port, char* command)</tag> + <tag><marker id="start"/>ErlDrvData (*start)(ErlDrvPort port, char* command)</tag> <item> <p>This is called when the driver is instantiated, when <c>open_port/2</c> is called. The driver should return a @@ -188,7 +188,9 @@ typedef struct erl_drv_entry { <p>This is called when the port is closed, with <c>port_close/1</c> or <c>Port ! {self(), close}</c>. Note that terminating the port owner process also closes the - port.</p> + port. If <c>drv_data</c> is a pointer to memory allocated in + <c>start</c>, then <c>stop</c> is the place to deallocate that + memory.</p> </item> <tag><marker id="output"/>void (*output)(ErlDrvData drv_data, char *buf, int len)</tag> <item> |