[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] compat code lacks support for __attribute__
I would like to share code between the hypervisor and xenalyze, so that every definition comes from a single place and is not duplicated in xen and xenalyze. This works as long as simple constructs like struct x {}; are used. Depending on the data to be stored into the trace buffer, having support for __packed may reduce the amount of data that need to be copied. The tooling currently converts ___attribute__ into compat___attribute__. Was support for __attribute__ intentionally left out, or was there just no usecase for it? Olaf +++ b/xen/include/public/trace.h @@ -80,6 +80,14 @@ #define TRC_LOST_RECORDS (TRC_GEN + 1) #define TRC_TRACE_WRAP_BUFFER (TRC_GEN + 2) #define TRC_TRACE_CPU_CHANGE (TRC_GEN + 3) +#define TRC_a (TRC_GEN + 123) +struct __attribute__((__packed__)) trc_a { + unsigned a; +}; +#define TRC_b (TRC_GEN + 321) +typedef struct __attribute__((__packed__)) trc_b { + unsigned b; +} trc_b_t; #define TRC_SCHED_RUNSTATE_CHANGE (TRC_SCHED_MIN + 1) #define TRC_SCHED_CONTINUE_RUNNING (TRC_SCHED_MIN + 2) Attachment:
pgpmsQpgNcp4i.pgp
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |