def serialize_atomic_type(argtype, cast, accessor):
 if (dereference_type(argtype) == argtype):
  return ('(%s)(%s)' % (cast, accessor))
 else:
  real_type = dereference_type(argtype)
  t = (accessor, cast, real_type, accessor, real_type)
  return ('!!(%s) ? (%s)0 : *(%s *)copyin((uint64_t)%s, sizeof(%s))' % t)

def serialize_atomic_type ( argtype , cast , accessor ) : if ( dereference_type ( argtype ) == argtype ) : return ( '(%s)(%s)' % ( cast , accessor ) ) else : real_type = dereference_type ( argtype ) t = ( accessor , cast , real_type , accessor , real_type ) return ( '!!(%s) ? (%s)0 : *(%s *)copyin((uint64_t)%s, sizeof(%s))' % t )
returns a serialization statement for the given atomic type .