aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-10-31 14:40:33 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:16:00 +0100
commit8103fed4090e9f1457fb1705e9a4df0821f5db9b (patch)
tree8ed606e8774851fee2645012b1e948dc1bb88de0 /erts/lib_src
parentfd3aa9d63649084b345d0977fa121805f13c9d33 (diff)
downloadotp-8103fed4090e9f1457fb1705e9a4df0821f5db9b.tar.gz
otp-8103fed4090e9f1457fb1705e9a4df0821f5db9b.tar.bz2
otp-8103fed4090e9f1457fb1705e9a4df0821f5db9b.zip
ose,erts: Specify name for tsd keys
This simplified debugging on OSE and also limits the number of ppdata keys that are created when beam is restarted.
Diffstat (limited to 'erts/lib_src')
-rw-r--r--erts/lib_src/ose/ethread.c9
-rw-r--r--erts/lib_src/pthread/ethread.c2
-rw-r--r--erts/lib_src/win/ethread.c2
3 files changed, 3 insertions, 10 deletions
diff --git a/erts/lib_src/ose/ethread.c b/erts/lib_src/ose/ethread.c
index 01d58e65b2..41c3392677 100644
--- a/erts/lib_src/ose/ethread.c
+++ b/erts/lib_src/ose/ethread.c
@@ -527,10 +527,8 @@ ethr_leave_ts_event(ethr_ts_event *tsep)
*/
int
-ethr_tsd_key_create(ethr_tsd_key *keyp)
+ethr_tsd_key_create(ethr_tsd_key *keyp, char *keyname)
{
- ethr_tid *tid = ETHR_GET_OWN_TID__;
- char keyname[31];
#if ETHR_XCHK
if (ethr_not_inited__) {
@@ -542,11 +540,6 @@ ethr_tsd_key_create(ethr_tsd_key *keyp)
return EINVAL;
}
#endif
- if (tid->tsd_key_index > 999)
- return EAGAIN;
-
- /* What do we do it tds_key_index happens to wrap? Slot search? */
- sprintf(keyname,"ethread_tsd_key_0x%x_%d",tid->id,tid->tsd_key_index++);
ose_create_ppdata(keyname,keyp);
diff --git a/erts/lib_src/pthread/ethread.c b/erts/lib_src/pthread/ethread.c
index fb7d135418..7f27b5f29c 100644
--- a/erts/lib_src/pthread/ethread.c
+++ b/erts/lib_src/pthread/ethread.c
@@ -472,7 +472,7 @@ ethr_leave_ts_event(ethr_ts_event *tsep)
*/
int
-ethr_tsd_key_create(ethr_tsd_key *keyp)
+ethr_tsd_key_create(ethr_tsd_key *keyp, char *keyname)
{
#if ETHR_XCHK
if (ethr_not_inited__) {
diff --git a/erts/lib_src/win/ethread.c b/erts/lib_src/win/ethread.c
index 3abda6de4c..14d0b6deff 100644
--- a/erts/lib_src/win/ethread.c
+++ b/erts/lib_src/win/ethread.c
@@ -520,7 +520,7 @@ ethr_equal_tids(ethr_tid tid1, ethr_tid tid2)
*/
int
-ethr_tsd_key_create(ethr_tsd_key *keyp)
+ethr_tsd_key_create(ethr_tsd_key *keyp, char *keyname)
{
DWORD key;
#if ETHR_XCHK