Skip to content

Commit

Permalink
Share rseq definitions between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Aug 1, 2024
1 parent ce3d9e4 commit 75b9ed3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
15 changes: 0 additions & 15 deletions src/test/rseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

#include "util.h"

struct rseq {
uint32_t cpu_id_start;
uint32_t cpu_id;
uint64_t rseq_cs;
uint32_t flags;
} __attribute__((aligned(32)));

struct rseq_cs {
uint32_t version;
uint32_t flags;
uint64_t start_ip;
uint64_t post_commit_offset;
uint64_t abort_ip;
} __attribute__((aligned(32)));

static struct rseq* rs_ptr;
static struct rseq_cs rs_cs;

Expand Down
15 changes: 0 additions & 15 deletions src/test/rseq_syscallbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

#include "util.h"

struct rseq {
uint32_t cpu_id_start;
uint32_t cpu_id;
uint64_t rseq_cs;
uint32_t flags;
} __attribute__((aligned(32)));

struct rseq_cs {
uint32_t version;
uint32_t flags;
uint64_t start_ip;
uint64_t post_commit_offset;
uint64_t abort_ip;
} __attribute__((aligned(32)));

static struct rseq* rs_ptr;
static struct rseq_cs rs_cs;

Expand Down
15 changes: 15 additions & 0 deletions src/test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,4 +585,19 @@ struct open_how {
#define MREMAP_DONTUNMAP 4
#endif

struct rseq {
uint32_t cpu_id_start;
uint32_t cpu_id;
uint64_t rseq_cs;
uint32_t flags;
} __attribute__((aligned(32)));

struct rseq_cs {
uint32_t version;
uint32_t flags;
uint64_t start_ip;
uint64_t post_commit_offset;
uint64_t abort_ip;
} __attribute__((aligned(32)));

#endif /* RRUTIL_H */

0 comments on commit 75b9ed3

Please sign in to comment.