aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-03-27 09:24:39 +0100
committerDan Gudmundsson <[email protected]>2015-03-27 09:24:39 +0100
commit558923fcdd7f0ade12d23daf31c15dca802c1b8e (patch)
treeb2c20133d1d80206b61b9aeef568ad2f09910d94
parentf299a96c88eccbcfce1deed1bbf20d20f455805c (diff)
parent09db67d581e1e5858909aafec7d29226020cd227 (diff)
downloadotp-558923fcdd7f0ade12d23daf31c15dca802c1b8e.tar.gz
otp-558923fcdd7f0ade12d23daf31c15dca802c1b8e.tar.bz2
otp-558923fcdd7f0ade12d23daf31c15dca802c1b8e.zip
Merge branch 'dgud/erts/fix-driver-thread-name'
* dgud/erts/fix-driver-thread-name: Fix thread name from driver api
-rw-r--r--erts/emulator/beam/erl_drv_thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_drv_thread.c b/erts/emulator/beam/erl_drv_thread.c
index 31b05d22af..240faa823d 100644
--- a/erts/emulator/beam/erl_drv_thread.c
+++ b/erts/emulator/beam/erl_drv_thread.c
@@ -604,10 +604,12 @@ erl_drv_thread_create(char *name,
ethr_thr_opts ethr_opts = ETHR_THR_OPTS_DEFAULT_INITER;
ethr_thr_opts *use_opts;
- if (!opts)
+ if (!opts && !name)
use_opts = NULL;
else {
- ethr_opts.suggested_stack_size = opts->suggested_stack_size;
+ if(opts)
+ ethr_opts.suggested_stack_size = opts->suggested_stack_size;
+
ethr_opts.name = name;
use_opts = &ethr_opts;
}