diff options
author | Sverker Eriksson <[email protected]> | 2017-04-20 17:53:31 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-09-15 10:04:42 +0200 |
commit | 5c7a869b8d0e4aeec9902a1316d672860790076c (patch) | |
tree | b6cb06f84df228c7c7c494d8bd6e0bca18e90c7b /erts | |
parent | 6c1bb4bcfce103b3ef95e43fa5376b7d611ccc79 (diff) | |
download | otp-5c7a869b8d0e4aeec9902a1316d672860790076c.tar.gz otp-5c7a869b8d0e4aeec9902a1316d672860790076c.tar.bz2 otp-5c7a869b8d0e4aeec9902a1316d672860790076c.zip |
erts: Rename ErtsPollSet_ structS to not confuse gdb
by having different structs with same name.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/sys/common/erl_poll.c | 10 | ||||
-rw-r--r-- | erts/emulator/sys/common/erl_poll.h | 2 | ||||
-rw-r--r-- | erts/emulator/sys/win32/erl_poll.c | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c index 7d26839b0f..341370ca14 100644 --- a/erts/emulator/sys/common/erl_poll.c +++ b/erts/emulator/sys/common/erl_poll.c @@ -228,7 +228,11 @@ typedef struct { #endif -struct ErtsPollSet_ { +/* + * This struct is not really exported, but it's nice to + * get unique names in debugger for kp/nkp + */ +struct ERTS_POLL_EXPORT(erts_pollset) { ErtsPollSet next; int internal_fd_limit; ErtsFdStatus *fds_status; @@ -2472,7 +2476,7 @@ ERTS_POLL_EXPORT(erts_poll_create_pollset)(void) int kp_fd; #endif ErtsPollSet ps = erts_alloc(ERTS_ALC_T_POLLSET, - sizeof(struct ErtsPollSet_)); + sizeof(struct ERTS_POLL_EXPORT(erts_pollset))); ps->internal_fd_limit = 0; ps->fds_status = NULL; ps->fds_status_len = 0; @@ -2660,7 +2664,7 @@ ERTS_POLL_EXPORT(erts_poll_info)(ErtsPollSet ps, ErtsPollInfo *pip) ERTS_POLLSET_LOCK(ps); - size += sizeof(struct ErtsPollSet_); + size += sizeof(struct ERTS_POLL_EXPORT(erts_pollset)); size += ps->fds_status_len*sizeof(ErtsFdStatus); #if ERTS_POLL_USE_EPOLL diff --git a/erts/emulator/sys/common/erl_poll.h b/erts/emulator/sys/common/erl_poll.h index a57dc51e5b..12dfc66e51 100644 --- a/erts/emulator/sys/common/erl_poll.h +++ b/erts/emulator/sys/common/erl_poll.h @@ -195,7 +195,7 @@ typedef Uint32 ErtsPollEvents; #endif -typedef struct ErtsPollSet_ *ErtsPollSet; +typedef struct ERTS_POLL_EXPORT(erts_pollset) *ErtsPollSet; typedef struct { ErtsSysFdType fd; diff --git a/erts/emulator/sys/win32/erl_poll.c b/erts/emulator/sys/win32/erl_poll.c index 0bd43bb4fb..7a87e81141 100644 --- a/erts/emulator/sys/win32/erl_poll.c +++ b/erts/emulator/sys/win32/erl_poll.c @@ -274,7 +274,7 @@ typedef struct _Waiter { /* * The structure for a pollset. There can currently be only one... */ -struct ErtsPollSet_ { +struct erts_pollset { Waiter** waiter; int allocated_waiters; /* Size ow waiter array */ int num_waiters; /* Number of waiter threads. */ @@ -1284,7 +1284,7 @@ void erts_poll_info(ErtsPollSet ps, HARDTRACEF(("In erts_poll_info")); ERTS_POLLSET_LOCK(ps); - size += sizeof(struct ErtsPollSet_); + size += sizeof(struct erts_pollset); size += sizeof(Waiter *) * ps->allocated_waiters; for (i = 0; i < ps->num_waiters; ++i) { Waiter *w = ps->waiter[i]; @@ -1326,7 +1326,7 @@ void erts_poll_info(ErtsPollSet ps, ErtsPollSet erts_poll_create_pollset(void) { ErtsPollSet ps = SEL_ALLOC(ERTS_ALC_T_POLLSET, - sizeof(struct ErtsPollSet_)); + sizeof(struct erts_pollset)); HARDTRACEF(("In erts_poll_create_pollset")); ps->num_waiters = 0; |