From 8ff33cff02d01b2b4f20769cbd77c5ef23b01631 Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Wed, 15 Jan 2014 10:13:11 -0500 Subject: remove deprecated driver_async_cancel function Some time ago the driver_async_cancel function was deprecated and slated for removal in R17. This commit removes the function along with its associated tests and documentation, sets the ERL_DRV_EXTENDED_MAJOR_VERSION to 3 and ERL_DRV_EXTENDED_MINOR_VERSION to 0, and modifies the sys_info_base_drv and sys_info_prev_drv tests in the driver test suite to check version 3.0 instead of 2.0. --- erts/doc/src/erl_driver.xml | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'erts/doc/src') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index b453a4861e..c2f7fa4588 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -745,7 +745,7 @@ typedef struct ErlIOVec { created and decrement it once when the port associated with the lock terminates. The emulator will also increment the reference count when an async job is enqueued and decrement - it after an async job has been invoked, or canceled. Besides + it after an async job has been invoked. Besides this, it is the responsibility of the driver to ensure that the reference count does not reach zero before the last use of the lock by the driver has been made. The reference count @@ -1995,14 +1995,12 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len async_invoke and async_free. It's typically a pointer to a structure that contains a pipe or event that can be used to signal that the async operation completed. - The data should be freed in async_free, because it's - called if driver_async_cancel is called.

+ The data should be freed in async_free.

When the async operation is done, ready_async driver entry function is called. If ready_async is null in the driver entry, the async_free function is called instead.

-

The return value is a handle to the asynchronous task, which - can be used as argument to driver_async_cancel.

+

The return value is a handle to the asynchronous task.

As of erts version 5.5.4.3 the default stack size for threads in the async-thread pool is 16 kilowords, @@ -2039,26 +2037,6 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len - - intdriver_async_cancel(long id) - Cancel an asynchronous call - - -

This function used to cancel a scheduled asynchronous operation, - if it was still in the queue. It returned 1 if it succeeded, and - 0 if it failed.

-

Since it could not guarantee success, it was more or less useless. - The user had to implement synchronization of cancellation anyway. - It also unnecessarily complicated the implementation. Therefore, - as of OTP-R15B driver_async_cancel() is deprecated, and - scheduled for removal in OTP-R17. It will currently always fail, - and return 0.

-

driver_async_cancel() is deprecated and will - be removed in the OTP-R17 release.

-
- - - intdriver_lock_driver(ErlDrvPort port) Make sure the driver is never unloaded -- cgit v1.2.3