Skip to content

Commit

Permalink
annotate structs in mcb.h process.h [#95]
Browse files Browse the repository at this point in the history
  • Loading branch information
stsp committed Jul 27, 2019
1 parent 8404677 commit 7928f02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions hdr/mcb.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ typedef struct _mcb {
// AR_MEMB(_mcb, BYTE, m_name, 8); /* owner name limited to 8 bytes */
BYTE m_name[8]; /* owner name limited to 8 bytes */
} PACKED mcb;
ANNOTATE_SIZE(mcb, 16);
1 change: 1 addition & 0 deletions hdr/portab.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ void PurgeHook(void *ptr, UDWORD len);
#define BSSZ(t, n) CTORZ(t, n)
#define DATA(t, n, i) CTOR(t, n, i)
#define DATAAIS(t, n, ...) CTORAI(static, t, n, __VA_ARGS__)
#define ANNOTATE_SIZE(n, s) static_assert(sizeof(n) == s, "wrong size of " #n)

#define FAR /* linear architecture */
#define REG
Expand Down
2 changes: 2 additions & 0 deletions hdr/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ typedef struct {
} _exec;
} ldata;
} exec_blk;
ANNOTATE_SIZE(exec_blk, 22);

#define exec ldata._exec
#define load ldata._load
Expand Down Expand Up @@ -107,6 +108,7 @@ typedef struct _psp {
} _u3;
} _u;
} psp;
ANNOTATE_SIZE(psp, 0x100);

#define ps_fcb1 _u._u1._ps_fcb1
#define ps_fcb2 _u._u2._ps_fcb2
Expand Down

0 comments on commit 7928f02

Please sign in to comment.