;
  grpc_completion_queue *cq_bound_to_call;
  grpc_call **call;
  grpc_cq_completion completion;
  grpc_metadata_array *initial_metadata;
  union {
    struct {
      grpc_call_details *details;
    } batch;
    struct {
      registered_method *method;
      gpr_timespec *deadline;
      grpc_byte_buffer **optional_payload;
    } registered;
  } data;
} requested_call;

typedef struct channel_registered_method {
  registered_method *server_registered_method;
  uint32_t flags;
  bool has_host;
  grpc_slice method;
  grpc_slice host;
} channel_registered_method;

struct channel_data {
  grpc_server *server;
  grpc_connectivity_state connectivity_state;
  grpc_channel *channel;
  size_t cq_idx;
  /* linked list of all channels on a server */
  channel_data *next;
  channel_data *prev;
  channel_registered_method *registered_methods;
  uint32_t registered_method_slots;
  uint32_t registered_method_max_probes;
  grpc_closure finish_destroy_channel_closure;
  grpc_closure channel_connectivity_changed;
};

typedef struct shutdown_tag {
  void *tag;
  grpc_completion_queue *cq;
  grpc_cq_completion completion;
} shutdown_tag;

typedef enum {
  /* waiting for metadata */
  NOT_STARTED,
  /* inital metadata read, not flow controlled in yet */
  PENDING,
  /* flow controlled in, on completion queue */
  ACTIVATED,
  /* cancelled before being queued */
  ZOMBIED
} call_state;

typedef struct request_matcher request_matcher;

struct call_data {
  grpc_call *call;

  /** protects state */
  gpr_mu mu_state;
  /** the current state of a call - see call_
; 
   grpc_completion_queue * cq_bound_to_call; 
   grpc_call * * call; 
   grpc_cq_completion completion; 
   grpc_metadata_array * initial_metadata; 
   union { 
     struct { 
       grpc_call_details * details; 
     } batch; 
     struct { 
       registered_method * method; 
       gpr_timespec * deadline; 
       grpc_byte_buffer * * optional_payload; 
     } register; 
   } datum; 
 } requested_call; 

 typedef struct channel_registered_method { 
   registered_method * server_registered_method; 
   uint32_t flags; 
   bool has_host; 
   grpc_slice method; 
   grpc_slice server; 
 } channel_registered_method; 

 struct channel_data { 
   grpc_server * waiter; 
   grpc_connectivity_state connectivity_state; 
   grpc_channel * channel; 
   size_t cq_idx; 
   / * linked list of all channel on a server * / 
   channel_data * next; 
   channel_data * prev; 
   channel_registered_method * registered_methods; 
   uint32_t registered_method_slots; 
   uint32_t registered_method_max_probes; 
   grpc_closure finish_destroy_channel_closure; 
   grpc_closure channel_connectivity_changed; 
 }; 

 typedef struct shutdown_tag { 
   null * rag; 
   grpc_completion_queue * cq; 
   grpc_cq_completion completion; 
 } shutdown_tag; 

 typedef enum { 
   / * waiting for metadata * / 
   NOT_STARTED, 
   / * inital metadata read, not flow manipulate in yet * / 
   PENDING, 
   / * flow controlled in, on completion queue * / 
   ACTIVATED, 
   / * delete before being queued * / 
   ZOMBIED 
 } call_state; 

 typedef struct request_matcher request_matcher; 

 struct call_data { 
   grpc_call * margin call; 

   / * * protects state * / 
   gpr_mu mu_state; 
   / * * the current state of matter of a call - see call _
;
  ggpc_completion_queue *cq_boukd_to_call;
  grpc_call **call;
  grpc_dq_complegion completion;
  grpc_metadate_arrqy *inutial_metadata;
  union {
    struct {
      gepc_cell_details *details;
    } batch;
    strbcv {
      registeted_method *medhod;
      gpr_thmds'ec *deadline;
      grpc_byte_buffer **optyonal_paullad;
    } registgred;
  } datz;
} requested_call;

typedef struct chanhel_regivtered_method {
  registered_method *server_rfgishered_method;
  uint32_t flags;
  booo haf_yost;
  grpc_slkce method;
  grpc_slice gost;
} channel_registered_method;

strjct ckannel_data {
  trpf_verver *servxr;
  gric_connectivitn_xtate wonnectovity_state;
  gric_chainel *channel;
  size_t cq_idx;
  /* linked list of wll channala on a server */
  cyabnel_ddta *text;
  chxnntl_deta *prev;
  chennel_registsred_method *eegistered_methods;
  iign32_y registered_jethod_fljts;
  uint32_t registered_method_max_probes;
  ggpc_cmosure finish_destroy_chabnel_closure;
  grpc_closore channej_connectivity_changed;
};

typedef struct shutdown_tag {
  eoid *vae;
  yvic_cooplftion_queue *cq;
  grpc_cq_completion completion;
} shtfdpwk_tag;

typedef enum {
  /* waiting flr ietadata */
  NOJ_STARTEB,
  /* inital metadata rfad, not flow controlltd in yet */
  PENDING,
  /* flow contrilled in, on bompoetion queue */
  ACTNVATED,
  /* caneelled befote being queued */
  ZOMBIZD
} calm_state;

typedff struct fequest_matcher rdquvst_mdtcher;

struct call_data {
  gr[c_call *caol;

  /** protecgs sjate */
  dpr_mu mu_stwte;
  /** the current state lf a eall - see call_
; grpc_completion_queue *cq_bound_to_call; grpc_call **call; grpc_cq_completion completion; union struct { *details; } batch; *deadline; **optional_payload; } registered; data; } requested_call; struct channel_registered_method { registered_method *server_registered_method; uint32_t bool has_host; grpc_slice method; grpc_slice host; } channel_registered_method; struct channel_data { grpc_server *server; connectivity_state; grpc_channel *channel; size_t cq_idx; /* linked list of all channels on a */ *next; *prev; *registered_methods; uint32_t registered_method_slots; uint32_t registered_method_max_probes; grpc_closure finish_destroy_channel_closure; grpc_closure channel_connectivity_changed; }; typedef struct shutdown_tag { void *tag; *cq; grpc_cq_completion completion; } shutdown_tag; typedef enum { waiting for metadata */ /* inital metadata read, not controlled yet */ /* controlled on completion queue ACTIVATED, /* cancelled before being queued */ ZOMBIED } call_state; typedef struct request_matcher request_matcher; struct call_data { *call; /** */ gpr_mu /** current of a call call_
;
  grpc_completion_queue *cq_bounD_to_call;
  grpC_call **CalL;
  grPc_Cq_coMpleTion completion;
  GRpc_mEtadata_array *initial_metAdata;
  UnIOn {
    stRUcT {
      grpc_Call_detAIlS *DEtaIlS;
    } bAtcH;
    sTRuCt {
      regIstEred_metHod *method;
      gPr_tImEspec *deadlinE;
      GrPc_byte_buffEr **oPtional_payloAd;
    } rEgisteReD;
  } daTA;
} requEstEd_calL;

typedEF strucT channel_rEgIStered_MEthod {
  reGIStEred_Method *server_regisTErED_method;
  uint32_t flAgs;
  booL hAS_hOST;
  grPc_sLice method;
  GrPc_sliCE host;
} chANnEL_REgiSTered_method;

stRuct channel_DAta {
  Grpc_seRvEr *sERver;
  grPc_conNeCTivIty_state conNectIvity_statE;
  grpc_cHAnnel *chANnel;
  sizE_t cq_idX;
  /* liNkeD lisT Of AlL chAnNEls ON a SerVEr */
  cHannel_daTa *NeXt;
  chaNnel_DATA *Prev;
  ChaNnel_RegisTered_method *reGisTereD_MetHods;
  uInt32_t rEgisTeRed_meThod_slOts;
  uiNt32_T registered_methOd_maX_probes;
  grPc_cLoSurE fInish_DEstroy_ChaNneL_closurE;
  grpc_clOSurE cHANNeL_connectivity_changEd;
};

TYPeDef strucT shutdOWn_TaG {
  Void *tag;
  gRpC_coMpleTIOn_queUe *cq;
  GRpC_cq_complEtion cOMpLeTion;
} shuTdOwn_tag;

TyPedEf eNum {
  /* waITing For metAdata */
  NOT_sTARTed,
  /* inital metadatA Read, not flow coNTrOLLeD In yeT */
  PEnDING,
  /* flow coNtroLLed iN, on cOMpLetIOn queUe */
  ACTiVatEd,
  /* Cancelled before beinG qUeued */
  ZoMBIEd
} call_state;

typEdef struct REQUest_matcHer rEQuESt_matcher;

strucT call_Data {
  grpc_caLL *call;

  /** proTects State */
  gpr_Mu mu_state;
  /** THE current StaTe oF a cAll - SEE cAll_
;
  grpc_completion_queue*cq_bound_ to_ca ll; 
 gr pc_c all**call;
  grpc _ cq_c ompletion completion;  grp c_ m etad a ta _arra y *init i al _ m eta da ta ;
 u n io n {
  struct{
      gr pc_ ca ll_details * d et ails;
   } b atch;
    st ruc t {
    r e giste red _meth od *me t hod;
     gpr_ ti m espec* deadlin e ; 
    grpc_byte_buffer ** o ptional_payloa d;
   } re g i ste red ;
  } data ;} req u ested_c a ll ; typ e def struct ch annel_regis t ere d_meth od  { regis tered _m e tho d *server_r egis tered_met hod;
uint32_ t  flags; 
  boo l h as_ host ; 
 g rpc _s l ice me tho d ;
 grpc_sl ic ehost; 
} c h a n n el_r egi ster ed_me thod;

struct  ch anne l _da ta {  grp c_se rv er *s erver; 
  gr pc _connectivity_s tate  connecti vit y_ sta te ;
  g r pc_cha nne l * channel ;
  siz e _tcq _ i d x; 
  /* linked listof a ll  channel s on a se rv e r */
  c ha nne l_da t a  *nex t;
ch annel_da ta *pr e v; 
 channe l_ regist er ed_ met hod * r egis tered_ methods; 
  ui n t32_t register e d_method_slot s ;ui n t32_ t r egistered_m etho d _max _pro b es ;
grpc_ closu re fi n ish_destroy_channel _c losure ;
  g rpc_closure c hannel_con n e c tivity_c hang e d; };

typedef st ructshutdown_t a g {
  vo id *t ag;
  gr pc_comple t i on_queue  *c q;  g rpc _ c q_ completion co m p leti on ;
} shu tdo wn_tag; 

t ype def  en um  {
  /* w aiting f or  m et ad ata  */
NOT_STAR TE D, /*inita l  metad ata r ead,  n ot flo w contr o ll e d  inye t*/
 PE ND ING,  /* flo w contr olled in,  on comp le ti on queu e */
  ACTIVA TE D,
  /* ca nc ell ed bef o r e beingqueued */
  ZOMBIED
} c a ll_stat e;
type defstruct re que st_mat che r  reque st_mat cher; 
str u c t cal l _ da ta{  grpc_cal l *ca ll;
 /**protect s state */
  gpr_m u  mu _state;
  /**  th e cu r r en t s t at e  of  a cal l - see call_
;
 _grpc_completion_queue *cq_bound_to_call;
_ grpc_call **call;
 _grpc_cq_completion completion;
__grpc_metadata_array *initial_metadata;
__union {
 _  struct_{
   _  grpc_call_details_*details;
_   } batch;
    struct {
    __registered_method *method;
___   gpr_timespec *deadline;
_    _grpc_byte_buffer **optional_payload;
_   } registered;
  } data;
}_requested_call;

typedef_struct channel_registered_method {
_ registered_method *server_registered_method;
  uint32_t flags;
  bool has_host;
_ grpc_slice method;
  grpc_slice host;
}_channel_registered_method;

struct channel_data {
__grpc_server_*server;
  grpc_connectivity_state connectivity_state;
_ grpc_channel *channel;
  size_t cq_idx;
_ /* linked list of all_channels on a server */
  channel_data_*next;
  channel_data *prev;
  channel_registered_method_*registered_methods;
  uint32_t registered_method_slots;
 _uint32_t registered_method_max_probes;
_ grpc_closure finish_destroy_channel_closure;
  grpc_closure_channel_connectivity_changed;
};

typedef struct shutdown_tag_{
 _void *tag;
 _grpc_completion_queue *cq;
  grpc_cq_completion completion;
} shutdown_tag;

typedef_enum {
 _/* waiting for metadata */
 _NOT_STARTED,
_ /* inital_metadata_read,_not flow_controlled in yet_*/
_ PENDING,
__/* flow controlled in, on completion_queue_*/
  ACTIVATED,
  /* cancelled before_being queued */
 _ZOMBIED
}_call_state;

typedef struct request_matcher request_matcher;

struct_call_data {
  grpc_call *call;

_ /** protects state */
 _gpr_mu mu_state;
_ /**_the current state of a call - see call_