aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_message.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-06-06 21:49:48 +0200
committerRickard Green <[email protected]>2012-08-02 17:59:01 +0200
commit88126e785de24f5f41068c610bc13840dcab4a7d (patch)
tree8e72b687d4b5f12a678e12fd59977ecf783b6e77 /erts/emulator/beam/erl_message.h
parentda6ea485c20727fe63bb365f34e40ccb8570d413 (diff)
downloadotp-88126e785de24f5f41068c610bc13840dcab4a7d.tar.gz
otp-88126e785de24f5f41068c610bc13840dcab4a7d.tar.bz2
otp-88126e785de24f5f41068c610bc13840dcab4a7d.zip
Use thread progress instead of scheduling misc aux work were possible
Functionality for scheduling operations at thread progress later has been introduced. Deallocation of ETS table structures were previously done by scheduling misc aux work. Deallocation of process structures (not released yet) was also implemented this way. Instead of using the misc aux work functionality these implementation now use the newly introduced functionality for scheduling operations at thread progress later. By using this new functionaliy we reduce the amount of memory allocation/deallocation operations needed.
Diffstat (limited to 'erts/emulator/beam/erl_message.h')
-rw-r--r--erts/emulator/beam/erl_message.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h
index bb4dbf0ef3..2ae94965b1 100644
--- a/erts/emulator/beam/erl_message.h
+++ b/erts/emulator/beam/erl_message.h
@@ -125,23 +125,23 @@ typedef struct {
#ifdef ERTS_SMP
/* Move in message queue to end of private message queue */
-#define ERTS_SMP_MSGQ_MV_INQ2PRIVQ(P) \
-do { \
- if ((P)->msg_inq.first) { \
- *(P)->msg.last = (P)->msg_inq.first; \
- (P)->msg.last = (P)->msg_inq.last; \
- (P)->msg.len += (P)->msg_inq.len; \
- (P)->msg_inq.first = NULL; \
- (P)->msg_inq.last = &(P)->msg_inq.first; \
- (P)->msg_inq.len = 0; \
- } \
+#define ERTS_SMP_MSGQ_MV_INQ2PRIVQ(P) \
+do { \
+ if ((P)->u.alive.msg_inq.first) { \
+ *(P)->msg.last = (P)->u.alive.msg_inq.first; \
+ (P)->msg.last = (P)->u.alive.msg_inq.last; \
+ (P)->msg.len += (P)->u.alive.msg_inq.len; \
+ (P)->u.alive.msg_inq.first = NULL; \
+ (P)->u.alive.msg_inq.last = &(P)->u.alive.msg_inq.first; \
+ (P)->u.alive.msg_inq.len = 0; \
+ } \
} while (0)
/* Add message last in message queue */
#define LINK_MESSAGE(p, mp) do { \
- *(p)->msg_inq.last = (mp); \
- (p)->msg_inq.last = &(mp)->next; \
- (p)->msg_inq.len++; \
+ *(p)->u.alive.msg_inq.last = (mp); \
+ (p)->u.alive.msg_inq.last = &(mp)->next; \
+ (p)->u.alive.msg_inq.len++; \
} while(0)
#else