Files
praxisandClaude Fable 5.2 8e02dccb86 In-client stack: transport, session lifecycle and engine bridge
175 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

30 lines
1.7 KiB
C++

/* Private Source-only Wire export. Included in wine_pipe_host.c so it shares
* the existing pipe lock, descriptor and generation; never opens a transport. */
#if defined(GW_SOURCE_UI_CREATE_EXPERIMENT) && defined(GW_SOURCE_ONLY_PROFILE) && (GW_SOURCE_ONLY_PROFILE == 2 || GW_SOURCE_ONLY_PROFILE == 3 || GW_SOURCE_ONLY_PROFILE == 5)
#include "pipe_snapshot.private.h"
#ifdef _WIN32
#define GW_CREATE_EXPORT __declspec(dllexport)
#else
#define GW_CREATE_EXPORT
#endif
/* Protected by the existing pipe lock; no separate lifecycle system. */
static uint32_t gw_source_create_retirement_flag;
int gw_source_create_retirement_armed(void){return __atomic_load_n(&gw_source_create_retirement_flag,__ATOMIC_ACQUIRE)!=0;}
int gw_source_create_retirement_armed_locked(void){return gw_source_create_retirement_flag!=0;}
void gw_source_create_retirement_disarm_locked(void){__atomic_store_n(&gw_source_create_retirement_flag,0,__ATOMIC_RELEASE);}
GW_CREATE_EXPORT int gw_source_create_queue_owner_snapshot(void *context,struct gw_source_create_pipe_snapshot *out){
struct gw_pipe_control*d=&gw_wire_pipe_data;uint32_t pipe_epoch,account;int ok=0;
if(context!=(void*)d||!out)return 0;
*out=(struct gw_source_create_pipe_snapshot){0};
if(!TryAcquireSRWLockExclusive(&lock))return 0;
pipe_epoch=(uint32_t)pipe_generation;account=gw_wire_account_generation();
if(d->abi==1&&d->size==sizeof(*d)&&d->stage==1&&!d->error&&!d->closed&&d->world_auth&&
d->owner&&d->pipe&&d->connection&&d->queue&&pipe_epoch&&account){
*out=(struct gw_source_create_pipe_snapshot){1,sizeof(*out),pipe_epoch,account,d->owner,d->pipe,d->connection,d->queue};
__atomic_store_n(&gw_source_create_retirement_flag,1,__ATOMIC_RELEASE);ok=1;
}
ReleaseSRWLockExclusive(&lock);return ok;
}
#undef GW_CREATE_EXPORT
#endif