diff options
author | Lukas Larsson <[email protected]> | 2014-12-04 11:00:22 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-12-19 10:39:51 +0100 |
commit | f03bce6a77ff5c7885a3b200fe879210299194bb (patch) | |
tree | b21678eeee5a033a708792e3c657f76c45f09086 /erts/include/internal/ethread.h | |
parent | 3aa7023f2e4f5454faddd663f00ee4c935f9b8f6 (diff) | |
download | otp-f03bce6a77ff5c7885a3b200fe879210299194bb.tar.gz otp-f03bce6a77ff5c7885a3b200fe879210299194bb.tar.bz2 otp-f03bce6a77ff5c7885a3b200fe879210299194bb.zip |
erts: Add support for thread names
Diffstat (limited to 'erts/include/internal/ethread.h')
-rw-r--r-- | erts/include/internal/ethread.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h index ad5d05704c..0f466dbb00 100644 --- a/erts/include/internal/ethread.h +++ b/erts/include/internal/ethread.h @@ -214,8 +214,6 @@ typedef OSPPDKEY ethr_tsd_key; /* Out own RW mutexes are probably faster, but use OSEs mutexes */ #define ETHR_USE_OWN_RWMTX_IMPL__ -#define ETHR_HAVE_THREAD_NAMES - #else /* No supported thread lib found */ #ifdef ETHR_NO_SUPP_THR_LIB_NOT_FATAL @@ -501,21 +499,18 @@ typedef struct { typedef struct { int detached; /* boolean (default false) */ int suggested_stack_size; /* kilo words (default sys dependent) */ + char *name; /* max 14 char long (default no-name) */ #ifdef ETHR_OSE_THREADS - char *name; U32 coreNo; #endif } ethr_thr_opts; #if defined(ETHR_OSE_THREADS) -/* Default ethr name is big as we want to be able to sprint stuff in there */ -#define ETHR_THR_OPTS_DEFAULT_INITER \ - {0, -1, "ethread", 0} +#define ETHR_THR_OPTS_DEFAULT_INITER {0, -1, NULL, 0} #else -#define ETHR_THR_OPTS_DEFAULT_INITER {0, -1} +#define ETHR_THR_OPTS_DEFAULT_INITER {0, -1, NULL} #endif - #if !defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_AUX_IMPL__) # define ETHR_NEED_SPINLOCK_PROTOTYPES__ # define ETHR_NEED_RWSPINLOCK_PROTOTYPES__ @@ -529,6 +524,8 @@ int ethr_thr_join(ethr_tid, void **); int ethr_thr_detach(ethr_tid); void ethr_thr_exit(void *); ethr_tid ethr_self(void); +int ethr_getname(ethr_tid, char *, size_t); +void ethr_setname(char *); int ethr_equal_tids(ethr_tid, ethr_tid); int ethr_tsd_key_create(ethr_tsd_key *,char *); |