aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-03-18 15:47:47 +0100
committerDan Gudmundsson <[email protected]>2015-03-18 15:53:35 +0100
commit09db67d581e1e5858909aafec7d29226020cd227 (patch)
treeeb294143ae606b618b4807c4b126efae3089f955 /erts
parent23579ef1581b3a928ca37d3f74f076dfdd748d3d (diff)
downloadotp-09db67d581e1e5858909aafec7d29226020cd227.tar.gz
otp-09db67d581e1e5858909aafec7d29226020cd227.tar.bz2
otp-09db67d581e1e5858909aafec7d29226020cd227.zip
Fix thread name from driver api
if opts was null the name was not set
Diffstat (limited to 'erts')
-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;
}