mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-26 16:51:46 -07:00
Event alignment doesn't need to be mps_pf_align (that's wasteful on windows).
Copied from Perforce Change: 194091
This commit is contained in:
parent
c3a7104eff
commit
bb5034594d
3 changed files with 8 additions and 5 deletions
|
|
@ -53,7 +53,7 @@ static Res eventClockSync(void)
|
|||
Res res;
|
||||
size_t size;
|
||||
|
||||
size= size_tAlignUp(sizeof(eventClockSyncStruct), MPS_PF_ALIGN);
|
||||
size= size_tAlignUp(sizeof(eventClockSyncStruct), EVENT_ALIGN);
|
||||
eventClockSyncStruct.code = EventEventClockSyncCode;
|
||||
eventClockSyncStruct.size = (EventSize)size;
|
||||
EVENT_CLOCK(eventClockSyncStruct.clock);
|
||||
|
|
@ -182,7 +182,7 @@ void EventInit(void)
|
|||
EVENT_PARAM_CHECK_##sort(name, index, ident)
|
||||
|
||||
#define EVENT_CHECK(X, name, code, always, kind) \
|
||||
AVER(size_tAlignUp(sizeof(Event##name##Struct), MPS_PF_ALIGN) \
|
||||
AVER(size_tAlignUp(sizeof(Event##name##Struct), EVENT_ALIGN) \
|
||||
<= EventSizeMAX); \
|
||||
AVER(Event##name##Code == code); \
|
||||
AVER(0 <= code); \
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ extern char *EventLogged[EventKindLIMIT];
|
|||
extern Word EventKindControl;
|
||||
|
||||
|
||||
/* Write event into buffer and maybe flush the buffer. */
|
||||
/* EVENT_BEGIN -- flush buffer if necessary and write event header */
|
||||
|
||||
#define EVENT_BEGIN(name, structSize) \
|
||||
BEGIN { \
|
||||
if(EVENT_ALL || Event##name##Always) { /* see config.h */ \
|
||||
Event##name##Struct *_event; \
|
||||
size_t _size = size_tAlignUp(structSize, MPS_PF_ALIGN); \
|
||||
size_t _size = size_tAlignUp(structSize, EVENT_ALIGN); \
|
||||
if (_size > (size_t)(EventBuffer[Event##name##Kind] \
|
||||
+ EventBufferSIZE \
|
||||
- EventLogged[Event##name##Kind])) \
|
||||
|
|
@ -62,7 +62,7 @@ extern Word EventKindControl;
|
|||
AVER(_size <= (size_t)(EventBuffer[Event##name##Kind] \
|
||||
+ EventBufferSIZE \
|
||||
- EventLogged[Event##name##Kind])); \
|
||||
_event = (void *)(EventLogged[Event##name##Kind]); \
|
||||
_event = (void *)EventLogged[Event##name##Kind]; \
|
||||
_event->code = Event##name##Code; \
|
||||
_event->size = (EventSize)_size; \
|
||||
EVENT_CLOCK(_event->clock);
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ typedef unsigned char EventFB; /* Boolean */
|
|||
|
||||
EVENT_LIST(EVENT_STRUCT, X)
|
||||
|
||||
/* Maximum alignment requirement of any event type. */
|
||||
#define EVENT_ALIGN (sizeof(EventFP))
|
||||
|
||||
|
||||
/* Event -- event union type
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue