175 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
24 lines
741 B
C
24 lines
741 B
C
#ifndef GW_DIRECT_NEAR_RELAYS_H
|
|
#define GW_DIRECT_NEAR_RELAYS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
struct GwDirectRelays {
|
|
void *page;
|
|
uintptr_t site[2];
|
|
uintptr_t relay[2];
|
|
};
|
|
|
|
/* Allocate one executable relay page that is rel32-reachable from both
|
|
* original sites. Each relay is an absolute jump to a caller-owned, pinned
|
|
* thunk. No original client bytes are written here. */
|
|
int gw_direct_relays_prepare(const uintptr_t sites[2],
|
|
const uintptr_t thunks[2],
|
|
struct GwDirectRelays *out);
|
|
|
|
/* Call only after both original site patches have been transactionally
|
|
* restored and all thunk calls have drained. */
|
|
int gw_direct_relays_release(struct GwDirectRelays *relays);
|
|
|
|
#endif
|