175 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
58 lines
2.0 KiB
C
58 lines
2.0 KiB
C
#ifndef GW_PIPE_ADMISSION_SNAPSHOT_H
|
|
#define GW_PIPE_ADMISSION_SNAPSHOT_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "pipe_atomic.h"
|
|
|
|
typedef int (*gw_pipe_admission_read)(void *context, uintptr_t address,
|
|
void *destination, size_t bytes);
|
|
typedef int (*gw_pipe_admission_executable)(void *context, uintptr_t address);
|
|
typedef int (*gw_pipe_admission_writable)(void *context, uintptr_t address,
|
|
size_t bytes);
|
|
|
|
struct gw_pipe_admission_input {
|
|
void *read_context;
|
|
gw_pipe_admission_read read;
|
|
gw_pipe_admission_executable executable;
|
|
gw_pipe_admission_writable writable;
|
|
uintptr_t expected_owner;
|
|
uint64_t expected_bound_owner_vtable;
|
|
uint32_t current_thread;
|
|
uint32_t primary_thread;
|
|
uint32_t auth_state;
|
|
uint32_t server_proof_verified;
|
|
uint32_t transport_prepared;
|
|
uint32_t credentials_generation;
|
|
uint32_t pipe_generation;
|
|
uintptr_t callback_module_begin;
|
|
uintptr_t callback_module_end;
|
|
const struct gw_pipe_control *current_control;
|
|
const struct gw_private_pipe_tables *current_tables;
|
|
const uint64_t (*epoch_callbacks)[2];
|
|
uint32_t epoch_callbacks_abi;
|
|
uint32_t epoch_callbacks_size;
|
|
uint32_t epoch_callbacks_count;
|
|
uint32_t epoch_callbacks_reserved;
|
|
const uint64_t *retired_receivers;
|
|
uint32_t retired_receivers_abi;
|
|
uint32_t retired_receivers_size;
|
|
uint32_t retired_receivers_count;
|
|
uint32_t retired_receivers_reserved;
|
|
};
|
|
|
|
struct gw_pipe_admission_output {
|
|
struct gw_private_pipe_prevalidated prevalidated;
|
|
struct gw_pipe_control control_template;
|
|
uint64_t epoch_row[10];
|
|
uint64_t holder;
|
|
};
|
|
|
|
/* Reads one original owner/connection/pipe snapshot at the constructor return.
|
|
* Caller must hold the original owner/poll lease and publish the templates
|
|
* transactionally before resuming the original next helper. */
|
|
int gw_pipe_admission_snapshot(const struct gw_pipe_admission_input *input,
|
|
struct gw_pipe_admission_output *output);
|
|
|
|
#endif
|