aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_drv_thread.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-12-04 11:00:22 +0100
committerLukas Larsson <[email protected]>2014-12-19 10:39:51 +0100
commitf03bce6a77ff5c7885a3b200fe879210299194bb (patch)
treeb21678eeee5a033a708792e3c657f76c45f09086 /erts/emulator/beam/erl_drv_thread.c
parent3aa7023f2e4f5454faddd663f00ee4c935f9b8f6 (diff)
downloadotp-f03bce6a77ff5c7885a3b200fe879210299194bb.tar.gz
otp-f03bce6a77ff5c7885a3b200fe879210299194bb.tar.bz2
otp-f03bce6a77ff5c7885a3b200fe879210299194bb.zip
erts: Add support for thread names
Diffstat (limited to 'erts/emulator/beam/erl_drv_thread.c')
-rw-r--r--erts/emulator/beam/erl_drv_thread.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_drv_thread.c b/erts/emulator/beam/erl_drv_thread.c
index 147249f751..31b05d22af 100644
--- a/erts/emulator/beam/erl_drv_thread.c
+++ b/erts/emulator/beam/erl_drv_thread.c
@@ -601,17 +601,14 @@ erl_drv_thread_create(char *name,
#ifdef USE_THREADS
int res;
struct ErlDrvTid_ *dtid;
- ethr_thr_opts ethr_opts;
+ ethr_thr_opts ethr_opts = ETHR_THR_OPTS_DEFAULT_INITER;
ethr_thr_opts *use_opts;
- ethr_thr_opts def_ethr_opts = ETHR_THR_OPTS_DEFAULT_INITER;
if (!opts)
use_opts = NULL;
else {
- sys_memcpy((void *) &ethr_opts,
- (void *) &def_ethr_opts,
- sizeof(ethr_thr_opts));
ethr_opts.suggested_stack_size = opts->suggested_stack_size;
+ ethr_opts.name = name;
use_opts = &ethr_opts;
}