当前位置: 首页>>代码示例>>C++>>正文


C++ INFO2函数代码示例

本文整理汇总了C++中INFO2函数的典型用法代码示例。如果您正苦于以下问题:C++ INFO2函数的具体用法?C++ INFO2怎么用?C++ INFO2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了INFO2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getBendData

struct bendData *
getBendData(int element_center,
            enum hybridization centerHybridization,
            int element1,
            char bondOrder1,
            int element2,
            char bondOrder2)
{
  struct bendData *bend;
  char bendName[256]; // XXX Can overflow for long atom type names
  
  generateBendName(bendName, element_center, centerHybridization, element1, bondOrder1, element2, bondOrder2);
  bend = (struct bendData *)hashtable_get(bendDataHashtable, bendName);
  if (bend == NULL) {
    bend = generateGenericBendData(bendName, element_center, centerHybridization, element1, bondOrder1, element2, bondOrder2);
  }
  if (bend == NULL) {
    return NULL;
  }
  if (bend->parameterQuality < QualityWarningLevel && !bend->warned) {
    if (!ComputedParameterWarning) {
      WARNING("Using a reduced quality parameter, see the trace output for details");
      ComputedParameterWarning = 1;
    }
    INFO2("Using quality %d parameters for %s bend", bend->parameterQuality, bendName);
    INFO2("Computed kb: %e, theta0: %e", bend->kb, bend->theta0);
    bend->warned = 1;
  }
  return bend;
}
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:30,代码来源:newtables.c

示例2: read_dword

  PCI_Device::PCI_Device(const uint16_t pci_addr, const uint32_t device_id)
      : pci_addr_{pci_addr}, device_id_{device_id}
  {
    //We have device, so probe for details
    devtype_.reg = read_dword(pci_addr, PCI::CONFIG_CLASS_REV);

    //printf("\t[*] New PCI Device: Vendor: 0x%x Prod: 0x%x Class: 0x%x\n", 
    //device_id.vendor,device_id.product,classcode);
    
    INFO2("|");  
    
    switch (devtype_.classcode) {
    case PCI::BRIDGE:
      INFO2("+--+ %s %s (0x%x)",
            bridge_subclasses[devtype_.subclass < SS_BR ? devtype_.subclass : SS_BR-1],
            classcodes[devtype_.classcode],devtype_.subclass);
      break;

    case PCI::NIC:
      INFO2("+--+ %s %s (0x%x)",
            nic_subclasses[devtype_.subclass < SS_NIC ? devtype_.subclass : SS_NIC-1],
            classcodes[devtype_.classcode],devtype_.subclass);
      break;

    default:
      if (devtype_.classcode < NUM_CLASSCODES) {
        INFO2("+--+ %s ",classcodes[devtype_.classcode]);
      } else {
        INFO2("\t +--+ Other (Classcode 0x%x) \n",devtype_.classcode);
      } 
    } //< switch (devtype_.classcode)
  }
开发者ID:andreashappe,项目名称:IncludeOS,代码行数:32,代码来源:pci_device.cpp

示例3: INFO

void PCI_manager::init()
{
  INFO("PCI Manager","Probing PCI bus");
  
  /* 
     Probe the PCI bus
     - Assuming bus number is 0, there are 255 possible addresses  
  */
  uint32_t id = PCI::WTF;
  
  for (uint16_t pci_addr = 0; pci_addr < 255; pci_addr++)
    {
      id = PCI_Device::read_dword(pci_addr, PCI::CONFIG_VENDOR);
      if (id != PCI::WTF)
	{
	  
	  PCI_Device dev (pci_addr,id);
	  devices[dev.classcode()].emplace_back(dev);
	}
      
    }
  
  // Pretty printing, end of device tree
  // @todo should probably be moved, or optionally non-printed
  INFO2("|");
  INFO2("o");
  
}
开发者ID:jdiego,项目名称:IncludeOS,代码行数:28,代码来源:pci_manager.cpp

示例4: alert_push

int alert_push(int event, const char *msg)
{
	/* 日志以及调试功能回调入口 */

	switch(event){
		case ERR_BASE:
		case ERR_VERIFY:
		case ERR_BRIDGE:
		case ERR_PORT:
		case ERR_CTRL_BRIDGE:
		case ERR_CTRL_PORT:
			ERROR2(GLOBAL_OUT_GROUP,"%s\n", msg);
			break;
		case ERR_MSTI:
			ERROR2(MSTI_GROUP,"%s\n", msg);
			break;
		case ALERT_BASE:
		case ALERT_BRIDGE:
		case ALERT_PORT:
			break;
		case INFO_BRIDGE_TXBPDU:
		case INFO_PORT_TXBPDU:
			INFO2(BPDU_TX_GROUP,"%s\n", msg);
			break;
		case DEBUG_TXBPDU:
			INFO3(BPDU_TX_GROUP,"%s\n", msg);
			break;
		case INFO_BRIDGE_RXBPDU:
		case INFO_PORT_RXBPDU:
			INFO2(BPDU_RX_GROUP,"%s\n", msg);
			break;
		case DEBUG_RXBPDU:
			INFO3(BPDU_RX_GROUP,"%s\n", msg);
			break;
		case INFO_MSTI:
			INFO2(MSTI_GROUP,"%s\n", msg);
			break;
		case INFO_BASE:
		case INFO_BRIDGE:
		case INFO_PORT:
		case INFO_CTRL_BRIDGE:
		case INFO_CTRL_PORT:
		case INFO_CTRL_BRIDGE_MAC:
			INFO2(GLOBAL_OUT_GROUP,"%s\n", msg);
			break;
		case DEBUG_INFO:
			break;
		case NOTIFY_MSG:
			send_notify(event, msg);
			break;
		default:
			break;
	};


	return 0;
}
开发者ID:sevennothing,项目名称:lros,代码行数:57,代码来源:mstpd.c

示例5: INFO

  void ACPI::walk_madt(const char* addr)
  {
    auto* hdr = (MADTHeader*) addr;
    INFO("ACPI", "Reading APIC information");
    // the base address for APIC registers
    INFO2("LAPIC base: 0x%x  (flags: 0x%x)",
        hdr->lapic_addr, hdr->flags);
    this->apic_base = (uintptr_t) hdr->lapic_addr;

    // the length remaining after MADT header
    int len = hdr->hdr.Length - sizeof(MADTHeader);
    // start walking
    const char* ptr = (char*) hdr->record;

    while (len) {
      auto* rec = (MADTRecord*) ptr;
      switch (rec->type) {
      case 0:
        {
          auto& lapic = *(LAPIC*) rec;
          lapics.push_back(lapic);
          //INFO2("-> CPU %u ID %u  (flags=0x%x)",
          //    lapic.cpu, lapic.id, lapic.flags);
        }
        break;
      case 1:
        {
          auto& ioapic = *(IOAPIC*) rec;
          ioapics.push_back(ioapic);
          INFO2("I/O APIC %u   ADDR 0x%x  INTR 0x%x",
              ioapic.id, ioapic.addr_base, ioapic.intr_base);
        }
        break;
      case 2:
        {
          auto& redirect = *(override_t*) rec;
          overrides.push_back(redirect);
          INFO2("IRQ redirect for bus %u from IRQ %u to VEC %u",
              redirect.bus_source, redirect.irq_source, redirect.global_intr);
        }
        break;
      default:
        debug("Unrecognized ACPI MADT type: %u\n", rec->type);
      }
      // decrease length as we go
      len -= rec->length;
      // go to next entry
      ptr += rec->length;
    }
    INFO("SMP", "Found %u APs", (uint32_t) lapics.size());
  }
开发者ID:tanisman,项目名称:IncludeOS,代码行数:51,代码来源:acpi.cpp

示例6: compile_me

NativeCodePtr compile_me(Method* method)
{
    ASSERT_RAISE_AREA;
    ASSERT_NO_INTERPRETER;
    TRACE("compile_me " << method);

    GcFrame gc;
    compile_protect_arguments(method, &gc);

    if (exn_raised()) {
        return NULL;
     }

    tmn_suspend_enable();
    if (method->is_abstract()) { 
        compile_raise_exception("java/lang/AbstractMethodError", "", method); 
        tmn_suspend_disable(); 
        return NULL; 
    }

    DebugUtilsTI *ti = VM_Global_State::loader_env->TI;
    JIT_Result res = compile_do_compilation(method);

    if (res != JIT_SUCCESS) {
        INFO2("compile", "Cannot compile " << method);
        if (!exn_raised()) {
            compile_raise_exception("java/lang/InternalError", "Cannot compile ", method);
        }
        tmn_suspend_disable();
        return NULL;
    }
    tmn_suspend_disable();

    NativeCodePtr entry_point = method->get_code_addr();
    INFO2("compile.code", "Compiled method " << method
            << ", entry " << entry_point);

    if (method->get_pending_breakpoints() != 0)
        jvmti_set_pending_breakpoints(method);
    if(ti->isEnabled() && ti->is_single_step_enabled()
        && !method->is_native())
    {
        jvmti_thread_t jvmti_thread = jthread_self_jvmti();
        assert(jvmti_thread);
        jvmti_set_single_step_breakpoints_for_method(ti, jvmti_thread, method);
    }

    return entry_point;
} // compile_me
开发者ID:dacut,项目名称:juliet,代码行数:49,代码来源:compile.cpp

示例7: command_move_clients

static int command_move_clients (client_t *client, source_t *source, int response)
{
    const char *dest_source;
    xmlDocPtr doc;
    xmlNodePtr node;
    int parameters_passed = 0;
    char buf[255];

    if((COMMAND_OPTIONAL(client, "destination", dest_source))) {
        parameters_passed = 1;
    }
    if (!parameters_passed) {
        doc = admin_build_sourcelist(source->mount);
        thread_mutex_unlock (&source->lock);
        return admin_send_response(doc, client, response, "moveclients.xsl");
    }
    INFO2 ("source is \"%s\", destination is \"%s\"", source->mount, dest_source);

    doc = xmlNewDoc(XMLSTR("1.0"));
    node = xmlNewDocNode(doc, NULL, XMLSTR("iceresponse"), NULL);
    xmlDocSetRootElement(doc, node);

    source_set_fallback (source, dest_source);
    source->termination_count = source->listeners;
    source->flags |= SOURCE_LISTENERS_SYNC;

    snprintf (buf, sizeof(buf), "Clients moved from %s to %s",
            source->mount, dest_source);
    thread_mutex_unlock (&source->lock);
    xmlNewChild(node, NULL, XMLSTR("message"), XMLSTR(buf));
    xmlNewChild(node, NULL, XMLSTR("return"), XMLSTR("1"));

    return admin_send_response (doc, client, response, "response.xsl");
}
开发者ID:MechanisM,项目名称:icecast-kh,代码行数:34,代码来源:admin.c

示例8: sizeof

void IRQ_manager::bsp_init()
{
  const auto WORDS_PER_BMP = IRQ_LINES / 32;
  auto* bmp = new MemBitmap::word[WORDS_PER_BMP * 3]();
  irq_subs.set_location(bmp + 0 * WORDS_PER_BMP, WORDS_PER_BMP);
  irq_pend.set_location(bmp + 1 * WORDS_PER_BMP, WORDS_PER_BMP);
  irq_todo.set_location(bmp + 2 * WORDS_PER_BMP, WORDS_PER_BMP);

  //Create an idt entry for the 'lidt' instruction
  idt_loc idt_reg;
  idt_reg.limit = INTR_LINES * sizeof(IDTDescr) - 1;
  idt_reg.base = (uint32_t)idt;

  INFO("INTR", "Creating interrupt handlers");

  for (size_t i = 0; i < 32; i++) {
    create_gate(&idt[i],exception_handler,default_sel,default_attr);
  }

  // Set all interrupt-gates >= 32 to unused do-nothing handler
  for (size_t i = 32; i < INTR_LINES; i++) {
    create_gate(&idt[i],unused_interrupt_handler,default_sel,default_attr);
  }

  // spurious interrupts (should not happen)
  // currently set to be the last interrupt vector
  create_gate(&idt[INTR_LINES-1], spurious_intr, default_sel, default_attr);

  INFO2("+ Default interrupt gates set for irq >= 32");

  // Load IDT
  asm volatile ("lidt %0": :"m"(idt_reg) );
}
开发者ID:andreashappe,项目名称:IncludeOS,代码行数:33,代码来源:irq_manager.cpp

示例9: get_entry

 uint16_t msix_t::setup_vector(uint8_t cpu, uint8_t intr)
 {
   // find free table entry
   uint16_t vec;
   for (vec = 0; vec < this->vectors(); vec++)
   {
     // read data register
     auto reg = get_entry(vec, ENT_MSG_DATA);
     if ((mm_read(reg) & 0xff) == 0) break;
   }
   assert (vec != this->vectors());
   
   // use free table entry
   INFO2("MSI-X vector %u pointing to cpu %u intr %u",
       vec, cpu, intr);
   
   // mask entry
   mask_entry(vec);
   
   mm_write(get_entry(vec, ENT_MSG_ADDR), msix_addr_single_cpu(cpu));
   mm_write(get_entry(vec, ENT_MSG_UPPER), 0x0);
   mm_write(get_entry(vec, ENT_MSG_DATA), msix_data_single_vector(intr));
   
   // unmask entry
   unmask_entry(vec);
   // return it
   return vec;
 }
开发者ID:andreashappe,项目名称:IncludeOS,代码行数:28,代码来源:msi.cpp

示例10: queue_auth_client

static void queue_auth_client (auth_client *auth_user, mount_proxy *mountinfo)
{
    auth_t *auth;

    if (auth_user == NULL)
        return;
    auth_user->next = NULL;
    if (mountinfo)
    {
        auth = mountinfo->auth;
        thread_mutex_lock (&auth->lock);
        if (auth_user->client)
            auth_user->client->auth = auth;
        auth->refcount++;
    }
    else
    {
        if (auth_user->client == NULL || auth_user->client->auth == NULL)
        {
            WARN1 ("internal state is incorrect for %p", auth_user->client);
            return;
        }
        auth = auth_user->client->auth;
        thread_mutex_lock (&auth->lock);
    }
    DEBUG2 ("...refcount on auth_t %s is now %d", auth->mount, auth->refcount);
    *auth->tailp = auth_user;
    auth->tailp = &auth_user->next;
    auth->pending_count++;
    INFO2 ("auth on %s has %d pending", auth->mount, auth->pending_count);
    thread_mutex_unlock (&auth->lock);
}
开发者ID:9060,项目名称:icecast-uo-aga,代码行数:32,代码来源:auth.c

示例11: getBondStretch

struct bondStretch *
getBondStretch(int element1, int element2, char bondOrder)
{
  struct bondStretch *entry;
  char bondName[256]; // XXX Can overflow for long atom type names

  entry = getBondStretchEntry(element1, element2, bondOrder);
  if (entry->parameterQuality < QualityWarningLevel && !entry->warned) {
    if (!ComputedParameterWarning) {
      WARNING("Using a reduced quality parameter, see the trace output for details");
      ComputedParameterWarning = 1;
    }
    generateBondName(bondName, element1, element2, bondOrder);
    INFO2("Using quality %d parameters for %s stretch", entry->parameterQuality, bondName);
    INFO4("Computed ks: %e, r0: %e, de: %e, beta: %e",
          entry->ks,
          entry->r0,
          entry->de,
          entry->beta);
    entry->warned = 1;
  }
  if (entry->maxPhysicalTableIndex == -1) {
    // Only call initializeBondStretchInterpolater when we're actually
    // going to use it.  That way, we don't warn about too large of an
    // ExcessiveEnergyLevel
    initializeBondStretchInterpolater(entry);
  }
  return entry;
}
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:29,代码来源:newtables.c

示例12: mm_open

int
mm_open(mm_file *mf, const char *fname)
{
    assert(mf);
    assert(fname);
    INFO2("opening file `%s'", fname);
    return mm_open_fp(mf, fopen(fname, "rb"));
}
开发者ID:BlastarIndia,项目名称:raceintospace,代码行数:8,代码来源:mmfile.cpp

示例13: disable_irq

 inline static void disable_irq(const uint8_t irq) noexcept {
   irq_mask_ |= (1 << irq);
   if ((irq_mask_ & 0xFF00) == 0xFF00) {
     irq_mask_ |= (1 << 2);
   }
   set_intr_mask(irq_mask_);
   INFO2("- Disabling IRQ %i, mask: 0x%x", irq, irq_mask_);
 }
开发者ID:doniexun,项目名称:IncludeOS,代码行数:8,代码来源:pic.hpp

示例14: INFO

void PCI_manager::init() {
  INFO("PCI Manager", "Probing PCI bus");

  /*
   * Probe the PCI bus
   * - Assuming bus number is 0, there are 255 possible addresses
   */
  uint32_t id {PCI::WTF};

  for (uint16_t pci_addr {0}; pci_addr < 255; ++pci_addr) {
    id = hw::PCI_Device::read_dword(pci_addr, PCI::CONFIG_VENDOR);

    if (id != PCI::WTF) {
      hw::PCI_Device dev {pci_addr, id};

      // store device
      devices_[dev.classcode()].emplace_back(dev);

      bool registered = false;
      // translate classcode to device and register
      switch(dev.classcode())
      {
        case PCI::STORAGE:
          registered = register_device<hw::Drive>(dev);
          break;

        case PCI::NIC:
          registered = register_device<hw::Nic>(dev);
          break;

        default:
        {

        }

      }
      debug("Device %s", registered ? "registed":"not registered");
    }
  }

  // Pretty printing, end of device tree
  // @todo should probably be moved, or optionally non-printed
  INFO2("|");
  INFO2("o");
}
开发者ID:andreashappe,项目名称:IncludeOS,代码行数:45,代码来源:pci_manager.cpp

示例15: recheck_ip_file

/* function to handle the re-populating of the avl tree containing IP addresses
 * for deciding whether a connection of an incoming request is to be dropped.
 */
static void recheck_ip_file (cache_file_contents *cache)
{
    time_t now = time(NULL);
    if (now >= cache->file_recheck)
    {
        struct stat file_stat;
        FILE *file = NULL;
        int count = 0;
        avl_tree *new_ips;
        char line [MAX_LINE_LEN];

        cache->file_recheck = now + 10;
        if (cache->filename == NULL)
        {
            if (cache->contents)
            {
                avl_tree_free (cache->contents, free_filtered_ip);
                cache->contents = NULL;
            }
            return;
        }
        if (stat (cache->filename, &file_stat) < 0)
        {
            WARN2 ("failed to check status of \"%s\": %s", cache->filename, strerror(errno));
            return;
        }
        if (file_stat.st_mtime == cache->file_mtime)
            return; /* common case, no update to file */

        cache->file_mtime = file_stat.st_mtime;

        file = fopen (cache->filename, "r");
        if (file == NULL)
        {
            WARN2("Failed to open file \"%s\": %s", cache->filename, strerror (errno));
            return;
        }

        new_ips = avl_tree_new (compare_ip, NULL);

        while (get_line (file, line, MAX_LINE_LEN))
        {
            char *str;
            if(!line[0] || line[0] == '#')
                continue;
            count++;
            str = strdup (line);
            if (str)
                avl_insert (new_ips, str);
        }
        fclose (file);
        INFO2 ("%d entries read from file \"%s\"", count, cache->filename);

        if (cache->contents) avl_tree_free (cache->contents, free_filtered_ip);
        cache->contents = new_ips;
    }
}
开发者ID:miksago,项目名称:icecast,代码行数:60,代码来源:connection.c


注:本文中的INFO2函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。