예제 #1
0
 /**
   Set a string field (set_field(..., const string& value) form).
   @param name the field name
   @param name_len the length of name in bytes
   @param value the field value
   @return *this
 */
 HTTPMessageType&
 set_field(
     const char* name,
     size_t name_len,
     const string& value
 ) {
     return set_field(name, name_len, value.data(), value.size());
 }
예제 #2
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_wr(void *blk, unsigned int wr)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ctl, SRCCTL_WR, wr);
	ctl->dirty.bf.ctl = 1;
	return 0;
}
예제 #3
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_rom(void *blk, unsigned int rom)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ctl, SRCCTL_ROM, rom);
	ctl->dirty.bf.ctl = 1;
	return 0;
}
예제 #4
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_la(void *blk, unsigned int la)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->la, SRCLA_LA, la);
	ctl->dirty.bf.la = 1;
	return 0;
}
예제 #5
0
static int dai_srt_set_et(void *blk, unsigned int et)
{
	struct dai_ctrl_blk *ctl = blk;

	set_field(&ctl->srtctl, SRTCTL_ET, et ? 1 : 0);
	ctl->dirty.bf.srtctl = 1;
	return 0;
}
예제 #6
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_bp(void *blk, unsigned int bp)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ctl, SRCCTL_BP, bp);
	ctl->dirty.bf.ctl = 1;
	return 0;
}
예제 #7
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_ca(void *blk, unsigned int ca)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ca, SRCCA_CA, ca);
	ctl->dirty.bf.ca = 1;
	return 0;
}
예제 #8
0
static int amixer_set_y(void *blk, unsigned int y)
{
	struct amixer_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->amoplo, AMOPLO_Y, y);
	ctl->dirty.bf.amoplo = 1;
	return 0;
}
예제 #9
0
static int amixer_set_se(void *blk, unsigned int se)
{
	struct amixer_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->amophi, AMOPHI_SE, se);
	ctl->dirty.bf.amophi = 1;
	return 0;
}
예제 #10
0
static int srcimp_mgr_set_imapuser(void *blk, unsigned int user)
{
	struct srcimp_mgr_ctrl_blk *ctl = blk;

	set_field(&ctl->srcimap.srcaim, SRCAIM_SRC, user);
	ctl->dirty.bf.srcimap = 1;
	return 0;
}
예제 #11
0
static int srcimp_mgr_set_imapnxt(void *blk, unsigned int next)
{
	struct srcimp_mgr_ctrl_blk *ctl = blk;

	set_field(&ctl->srcimap.srcaim, SRCAIM_NXT, next);
	ctl->dirty.bf.srcimap = 1;
	return 0;
}
예제 #12
0
static int srcimp_mgr_set_imaparc(void *blk, unsigned int slot)
{
	struct srcimp_mgr_ctrl_blk *ctl = blk;

	set_field(&ctl->srcimap.srcaim, SRCAIM_ARC, slot);
	ctl->dirty.bf.srcimap = 1;
	return 0;
}
예제 #13
0
static int src_set_pitch(void *blk, unsigned int pitch)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->mpr, MPRLH_PITCH, pitch);
	ctl->dirty.bf.mpr = 1;
	return 0;
}
예제 #14
0
 /**
   Set a string field (set_field(..., const void* value, size_t value_len)
     form).
   @param name the field name
   @param value the field value
   @param value_len the length of value in bytes
   @return *this
 */
 HTTPMessageType&
 set_field(
     const char* name,
     const void* value,
     size_t value_len
 ) {
     return set_field(name, strlen(name), value, value_len);
 }
예제 #15
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_st(void *blk, unsigned int st)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ctl, SRCCTL_ST, st);
	ctl->dirty.bf.ctl = 1;
	return 0;
}
예제 #16
0
static int dai_srt_set_srcl(void *blk, unsigned int src)
{
	struct dai_ctrl_blk *ctl = blk;

	set_field(&ctl->srtctl, SRTCTL_SRCL, src);
	ctl->dirty.bf.srtctl = 1;
	return 0;
}
예제 #17
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_ilsz(void *blk, unsigned int ilsz)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ctl, SRCCTL_ILSZ, ilsz);
	ctl->dirty.bf.ctl = 1;
	return 0;
}
예제 #18
0
static int dai_srt_set_rsr(void *blk, unsigned int rsr)
{
	struct dai_ctrl_blk *ctl = blk;

	set_field(&ctl->srtctl, SRTCTL_RSR, rsr);
	ctl->dirty.bf.srtctl = 1;
	return 0;
}
예제 #19
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_cisz(void *blk, unsigned int cisz)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ccr, SRCCCR_CISZ, cisz);
	ctl->dirty.bf.ccr = 1;
	return 0;
}
예제 #20
0
static int dai_srt_set_drat(void *blk, unsigned int drat)
{
	struct dai_ctrl_blk *ctl = blk;

	set_field(&ctl->srtctl, SRTCTL_DRAT, drat);
	ctl->dirty.bf.srtctl = 1;
	return 0;
}
예제 #21
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_sa(void *blk, unsigned int sa)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->sa, SRCSA_SA, sa);
	ctl->dirty.bf.sa = 1;
	return 0;
}
예제 #22
0
파일: cthw20k1.c 프로젝트: 19Dan01/linux
static int src_set_vo(void *blk, unsigned int vo)
{
	struct src_rsc_ctrl_blk *ctl = blk;

	set_field(&ctl->ctl, SRCCTL_VO, vo);
	ctl->dirty.bf.ctl = 1;
	return 0;
}
예제 #23
0
 /**
   Set a string field (set_field(..., const char* value) form).
   @param name the field name
   @param name_len the length of name in bytes
   @param value the field value
   @return *this
 */
 HTTPMessageType&
 set_field(
     const char* name,
     size_t name_len,
     const char* value
 ) {
     return set_field(name, name_len, value, strlen(value));
 }
예제 #24
0
파일: DexUtil.cpp 프로젝트: facebook/redex
void change_visibility(DexMethod* method) {
  auto code = method->get_code();
  always_assert(code != nullptr);

  editable_cfg_adapter::iterate(code, [](MethodItemEntry& mie) {
    auto insn = mie.insn;

    if (insn->has_field()) {
      auto cls = type_class(insn->get_field()->get_class());
      if (cls != nullptr && !cls->is_external()) {
        set_public(cls);
      }
      auto field =
          resolve_field(insn->get_field(), is_sfield_op(insn->opcode())
              ? FieldSearch::Static : FieldSearch::Instance);
      if (field != nullptr && field->is_concrete()) {
        set_public(field);
        set_public(type_class(field->get_class()));
        // FIXME no point in rewriting opcodes in the method
        insn->set_field(field);
      }
    } else if (insn->has_method()) {
      auto cls = type_class(insn->get_method()->get_class());
      if (cls != nullptr && !cls->is_external()) {
        set_public(cls);
      }
      auto current_method = resolve_method(
          insn->get_method(), opcode_to_search(insn));
      if (current_method != nullptr && current_method->is_concrete()) {
        set_public(current_method);
        set_public(type_class(current_method->get_class()));
        // FIXME no point in rewriting opcodes in the method
        insn->set_method(current_method);
      }
    } else if (insn->has_type()) {
      auto type = insn->get_type();
      auto cls = type_class(type);
      if (cls != nullptr && !cls->is_external()) {
        set_public(cls);
      }
    }
    return editable_cfg_adapter::LOOP_CONTINUE;
  });

  std::vector<DexType*> types;
  if (code->editable_cfg_built()) {
    code->cfg().gather_catch_types(types);
  } else {
    code->gather_catch_types(types);
  }
  for (auto type : types) {
    auto cls = type_class(type);
    if (cls != nullptr && !cls->is_external()) {
      set_public(cls);
    }
  }
}
예제 #25
0
static int daio_mgr_dsb_dai(void *blk, unsigned int idx)
{
	struct daio_mgr_ctrl_blk *ctl = blk;

	set_field(&ctl->rxctl[idx], ARXCTL_EN, 0);

	ctl->dirty.bf.arxctl |= (0x1 << idx);
	return 0;
}
예제 #26
0
void MethodBlock::sfield_op(IROpcode opcode,
                            DexField* field,
                            Location& src_or_dst) {
  always_assert(is_sfield_op(opcode));
  if (is_sget(opcode)) {
    auto sget = new IRInstruction(opcode);
    sget->set_field(field);
    src_or_dst.type = field->get_class();
    push_instruction(sget);
    push_instruction(
        (new IRInstruction(opcode::move_result_pseudo_for_sget(opcode)))
            ->set_dest(src_or_dst.get_reg()));
  } else {
    auto sput = new IRInstruction(opcode);
    sput->set_field(field)->set_src(0, src_or_dst.get_reg());
    push_instruction(sput);
  }
}
예제 #27
0
/*
 * setup the RF FPGA registers based on 
 * icat status and console type
 */
int setupRfType()
{
   uint64_t readDNA(void);
   int status;
   int icatFpgaFlag;
   // determine if RF Controller FPGA is icat capable
   icatFpgaFlag = fpgaIcatEnabled();
   if (icatFpgaFlag > 0)
   {
       int icatID;
       // determine if icat RF is attached to the controller
       icatID = getIcatId();
       diagPrint(NULL," ICAT ID: 0x%lx\n",icatID);
       if (icatID != 0xa)
       {
          diagPrint(NULL," iCAT NOT Attached\n");
          set_field(RF,transmitter_mode,0);  // Non-ICAT  RF
          RfType = 0;
       }
       else
       {
          diagPrint(NULL,"iCAT Attached\n");
          RfType = 1;

          /* obtain the unique identifier for iCAT board */
          /* used within the fail files */
          iCAT_DNA = readDNA();
          diagPrint(NULL," ICAT DNA: 0x%llx\n",iCAT_DNA);
       }
       if (ConsoleTypeFlag != 1) {
          diagPrint(NULL," Setting for VNMRS Console\n");
          // printf("Setting for VNMRS Console\n");
          set_field(RF,console_type,0);  // VNMRS = 0, 400-MR = 1
       }
       else {
          diagPrint(NULL," Setting for 400-MR Console\n");
          // printf("Setting for 400-MR Console\n");
          set_field(RF,console_type,1);  // VNMRS = 0, 400-MR = 1
       }

       set_field(RF,p2_disable,0); // This will then connect the interface on the P2 connector
   }
   return RfType;
}
예제 #28
0
void BitSequenceRRR::create_sampling(uint sample_rate) {
    this->sample_rate = sample_rate;
    /*cout << "===================" << endl;
    cout << "length = " << length << endl;
    cout << "ones = " << ones << endl;
    cout << "C_len = " << C_len << endl;
    cout << "C_field_bits = " << C_field_bits << endl;
    cout << "O_len = " << O_len << endl;
    cout << "O_bits_len = " << O_bits_len << endl;
    cout << "sample_rate = " << sample_rate << endl;
    cout << "C_alen = " << uint_len(C_len,C_field_bits) << endl;
    cout << "O_alen = " << O_len << endl;*/

    // Sampling for C
    C_sampling_len = C_len/sample_rate+2;
    C_sampling_field_bits = bits(ones);
    if(C_sampling!=NULL) delete [] C_sampling;
    C_sampling = new uint[max((uint)1,uint_len(C_sampling_len,C_sampling_field_bits))];
    for(uint i=0; i<max((uint)1,uint_len(C_sampling_len,C_sampling_field_bits)); i++)
        C_sampling[i] = 0;
    uint sum = 0;
    for(uint i=0; i<C_len; i++) {
        if(i%sample_rate==0)
            set_field(C_sampling,C_sampling_field_bits,i/sample_rate,sum);
        sum += get_field(C,C_field_bits,i);
    }
    for(uint i=(C_len-1)/sample_rate+1; i<C_sampling_len; i++)
        set_field(C_sampling,C_sampling_field_bits,i,sum);

    // Sampling for O (table S) (Code separated from previous construction for readability)
    O_pos_len = C_len/sample_rate+1;
    O_pos_field_bits = bits(O_bits_len);
    if(O_pos!=NULL) delete [] O_pos;
    O_pos = new uint[uint_len(O_pos_len,O_pos_field_bits)];
    for(uint i=0; i<uint_len(O_pos_len,O_pos_field_bits); i++)
        O_pos[i] = 0;
    uint pos = 0;
    for(uint i=0; i<C_len; i++) {
        if(i%sample_rate==0)
            set_field(O_pos,O_pos_field_bits,i/sample_rate,pos);
        pos += E->get_log2binomial(BLOCK_SIZE,get_field(C,C_field_bits,i));
    }
}
예제 #29
0
void LogSequence2::set(size_t position, size_t value) {
	if(IsMapped) {
		throw "Data structure read-only when mapped.";
	}
	if(position>numentries) {
		throw "Trying to modify a position out of the structure capacity. Use push_back() instead";
	}
	if(value>maxval) {
		throw "Trying to insert a value bigger that expected. Please increase numbits when creating the data structure.";
	}
    set_field(array, numbits, position, value);
}
예제 #30
0
파일: platform.c 프로젝트: ArthurMurata/lk
void per_L4_config(void)
{
	vaddr_t base = SOC_CM_PER_REGS;

	/* configure L4 interface clocks. */
	set_field(base, CM_PER_L4LS_CLKCTRL,
	          CM_PER_L4LS_CLKCTRL_MODULEMODE,
	          CM_PER_L4LS_CLKCTRL_MODULEMODE_ENABLE);

	set_field(base, CM_PER_L4LS_CLKSTCTRL,
	          CM_PER_L4LS_CLKSTCTRL_CLKTRCTRL,
	          CM_PER_L4LS_CLKSTCTRL_CLKTRCTRL_SW_WKUP);

	wait_field(base, CM_PER_L4LS_CLKCTRL,
	           CM_PER_L4LS_CLKCTRL_IDLEST,
	           CM_PER_L4LS_CLKCTRL_IDLEST_FUNC << CM_PER_L4LS_CLKCTRL_IDLEST_SHIFT);

	wait_field(base, CM_PER_L4LS_CLKSTCTRL,
	           CM_PER_L4LS_CLKSTCTRL_CLKACTIVITY_L4LS_GCLK,
	           CM_PER_L4LS_CLKSTCTRL_CLKACTIVITY_L4LS_GCLK);
}