diff options
author | Rickard Green <[email protected]> | 2011-10-09 00:03:14 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2011-11-13 20:40:58 +0100 |
commit | dcc7ecbf6af5420af2d5dbd0e97fc7a2e0e894a6 (patch) | |
tree | 36335364e0e2ece36709ae73bf57f1d1d1b4b211 /erts/emulator/beam/erl_driver.h | |
parent | 933790021e5fa95e4e6242e3f2eb2fcf64666a57 (diff) | |
download | otp-dcc7ecbf6af5420af2d5dbd0e97fc7a2e0e894a6.tar.gz otp-dcc7ecbf6af5420af2d5dbd0e97fc7a2e0e894a6.tar.bz2 otp-dcc7ecbf6af5420af2d5dbd0e97fc7a2e0e894a6.zip |
Use generic lock-free queue for async threads
Queues used for communication between async threads and scheduler threads
have been replaced with lock-free queues.
Drivers using the driver_async functionality are not automatically locked
to the system anymore, and can be unloaded as any dynamically linked in
driver.
Scheduling of ready async jobs is now also interleaved in between other
jobs. Previously all ready async jobs was performed at once.
Diffstat (limited to 'erts/emulator/beam/erl_driver.h')
-rw-r--r-- | erts/emulator/beam/erl_driver.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h index 401967a8de..ae0c9def90 100644 --- a/erts/emulator/beam/erl_driver.h +++ b/erts/emulator/beam/erl_driver.h @@ -28,6 +28,14 @@ # include "config.h" #endif +#define ERL_DRV_DEPRECATED_FUNC +#ifdef __GNUC__ +# if __GNUC__ >= 3 +# undef ERL_DRV_DEPRECATED_FUNC +# define ERL_DRV_DEPRECATED_FUNC __attribute__((deprecated)) +# endif +#endif + #ifdef SIZEOF_CHAR # define SIZEOF_CHAR_SAVED__ SIZEOF_CHAR # undef SIZEOF_CHAR @@ -582,8 +590,11 @@ EXTERN long driver_async(ErlDrvPort ix, void* async_data, void (*async_free)(void*)); - -EXTERN int driver_async_cancel(unsigned int key); +/* + * driver_async_cancel() is deprecated. It is scheduled for removal + * in OTP-R16. For more information see the erl_driver(3) documentation. + */ +EXTERN int driver_async_cancel(unsigned int key) ERL_DRV_DEPRECATED_FUNC; /* Locks the driver in the machine "forever", there is no unlock function. Note that this is almost never useful, as an open |