label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | void bdrv_flush_io_queue(BlockDriverState *bs) { BlockDriver *drv = bs->drv; if (drv && drv->bdrv_flush_io_queue) { drv->bdrv_flush_io_queue(bs); } else if (bs->file) { bdrv_flush_io_queue(bs->file); } } | 15,438 |
0 | static void rtas_event_log_queue(int log_type, void *data, bool exception) { sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); sPAPREventLogEntry *entry = g_new(sPAPREventLogEntry, 1); g_assert(data); entry->log_type = log_type; entry->exception = exception; entry->data = data; QTAILQ_INSERT_TAIL(&spapr->pe... | 15,439 |
0 | static int pci_set_default_subsystem_id(PCIDevice *pci_dev) { uint16_t *id; id = (void*)(&pci_dev->config[PCI_SUBSYSTEM_VENDOR_ID]); id[0] = cpu_to_le16(pci_default_sub_vendor_id); id[1] = cpu_to_le16(pci_default_sub_device_id); return 0; } | 15,440 |
0 | static inline uint8_t *get_seg_base(uint32_t e1, uint32_t e2) { return (uint8_t *)((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000)); } | 15,441 |
0 | int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, H264ParamSets *ps, int ignore_truncation) { AVBufferRef *sps_buf; int profile_idc, level_idc, constraint_set_flags = 0; unsigned int sps_id; int i, log2_max_frame_num_minus4; SPS *sps; sps_buf = av_buffer_allocz(sizeof(*sps)); if (!sps_buf) ... | 15,442 |
0 | static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr length) { if (cpu_physical_memory_range_includes_clean(addr, length)) { uint8_t dirty_log_mask = memory_region_get_dirty_log_mask(mr); if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) { tb_invalidate_phys_range(addr, addr + length); dirty_log_mask... | 15,443 |
0 | void ich9_lpc_pm_init(PCIDevice *lpc_pci) { ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci); ich9_pm_init(lpc_pci, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0)); ich9_lpc_reset(&lpc->d.qdev); } | 15,444 |
0 | static void term_show_prompt(void) { term_show_prompt2(); term_cmd_buf_index = 0; term_cmd_buf_size = 0; } | 15,446 |
0 | static int vfio_add_capabilities(VFIOPCIDevice *vdev) { PCIDevice *pdev = &vdev->pdev; int ret; if (!(pdev->config[PCI_STATUS] & PCI_STATUS_CAP_LIST) || !pdev->config[PCI_CAPABILITY_LIST]) { return 0; /* Nothing to add */ } ret = vfio_add_std_cap(vdev, pdev->config[PCI_CAPABILITY_LIST]); if (ret) { return ret; } /* on ... | 15,447 |
0 | static void test_qemu_strtosz_units(void) { const char *none = "1"; const char *b = "1B"; const char *k = "1K"; const char *m = "1M"; const char *g = "1G"; const char *t = "1T"; const char *p = "1P"; const char *e = "1E"; char *endptr = NULL; int64_t res; /* default is M */ res = qemu_strtosz_MiB(none, &endptr); g_asse... | 15,448 |
0 | static inline void gen_op_arith_divd(DisasContext *ctx, TCGv ret, TCGv arg1, TCGv arg2, int sign, int compute_ov) { int l1 = gen_new_label(); int l2 = gen_new_label(); tcg_gen_brcondi_i64(TCG_COND_EQ, arg2, 0, l1); if (sign) { int l3 = gen_new_label(); tcg_gen_brcondi_i64(TCG_COND_NE, arg2, -1, l3); tcg_gen_brcondi_i64... | 15,450 |
0 | static int os_host_main_loop_wait(int timeout) { int ret, i; PollingEntry *pe; WaitObjects *w = &wait_objects; static struct timeval tv0; /* XXX: need to suppress polling by better using win32 events */ ret = 0; for (pe = first_polling_entry; pe != NULL; pe = pe->next) { ret |= pe->func(pe->opaque); } if (ret != 0) { r... | 15,451 |
0 | static int asf_write_header(AVFormatContext *s) { ASFContext *asf = s->priv_data; asf->packet_size = PACKET_SIZE; asf->nb_packets = 0; asf->last_indexed_pts = 0; asf->index_ptr = (ASFIndex*)av_malloc( sizeof(ASFIndex) * ASF_INDEX_BLOCK ); asf->nb_index_memory_alloc = ASF_INDEX_BLOCK; asf->nb_index_count = 0; asf->maxim... | 15,452 |
0 | static int do_syscall(CPUState *env, struct kqemu_cpu_state *kenv) { int selector; selector = (env->star >> 32) & 0xffff; #ifdef TARGET_X86_64 if (env->hflags & HF_LMA_MASK) { int code64; env->regs[R_ECX] = kenv->next_eip; env->regs[11] = env->eflags; code64 = env->hflags & HF_CS64_MASK; cpu_x86_set_cpl(env, 0); cpu_x8... | 15,453 |
0 | gdb_handlesig(CPUState *cpu, int sig) { GDBState *s; char buf[256]; int n; s = gdbserver_state; if (gdbserver_fd < 0 || s->fd < 0) { return sig; } /* disable single step if it was enabled */ cpu_single_step(cpu, 0); tb_flush(cpu); if (sig != 0) { snprintf(buf, sizeof(buf), "S%02x", target_signal_to_gdb(sig)); put_packe... | 15,454 |
0 | void xen_map_cache_init(void) { unsigned long size; struct rlimit rlimit_as; mapcache = g_malloc0(sizeof (MapCache)); QTAILQ_INIT(&mapcache->locked_entries); mapcache->last_address_index = -1; if (geteuid() == 0) { rlimit_as.rlim_cur = RLIM_INFINITY; rlimit_as.rlim_max = RLIM_INFINITY; mapcache->max_mcache_size = MCACH... | 15,455 |
0 | static void nvdimm_build_nfit(AcpiNVDIMMState *state, GArray *table_offsets, GArray *table_data, BIOSLinker *linker) { NvdimmFitBuffer *fit_buf = &state->fit_buf; unsigned int header; /* NVDIMM device is not plugged? */ if (!fit_buf->fit->len) { return; } acpi_add_table(table_offsets, table_data); /* NFIT header. */ he... | 15,456 |
0 | static inline uint32_t efsctui(uint32_t val) { CPU_FloatU u; u.l = val; /* NaN are not treated the same way IEEE 754 does */ if (unlikely(float32_is_nan(u.f))) return 0; return float32_to_uint32(u.f, &env->vec_status); } | 15,459 |
0 | BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque) { BlockDriver *drv = bs->drv; if (drv && drv->bdrv_aio_ioctl) return drv->bdrv_aio_ioctl(bs, req, buf, cb, opaque); return NULL; } | 15,460 |
0 | static int lsi_scsi_init(PCIDevice *dev) { LSIState *s = DO_UPCAST(LSIState, dev, dev); uint8_t *pci_conf; pci_conf = s->dev.config; /* PCI Vendor ID (word) */ pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC); /* PCI device ID (word) */ pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_LSI_53C895A); /* PCI ba... | 15,461 |
0 | void cpu_physical_memory_write_rom(hwaddr addr, const uint8_t *buf, int len) { hwaddr l; uint8_t *ptr; hwaddr addr1; MemoryRegion *mr; while (len > 0) { l = len; mr = address_space_translate(&address_space_memory, addr, &addr1, &l, true); if (!(memory_region_is_ram(mr) || memory_region_is_romd(mr))) { /* do nothing */ ... | 15,462 |
0 | static int decode_cabac_mb_type( H264Context *h ) { MpegEncContext * const s = &h->s; if( h->slice_type == I_TYPE ) { return decode_cabac_intra_mb_type(h, 3, 1); } else if( h->slice_type == P_TYPE ) { if( get_cabac( &h->cabac, &h->cabac_state[14] ) == 0 ) { /* P-type */ if( get_cabac( &h->cabac, &h->cabac_state[15] ) =... | 15,464 |
0 | static int ehci_state_fetchentry(EHCIState *ehci, int async) { int again = 0; uint32_t entry = ehci_get_fetch_addr(ehci, async); if (entry < 0x1000) { DPRINTF("fetchentry: entry invalid (0x%08x)\n", entry); ehci_set_state(ehci, async, EST_ACTIVE); goto out; } /* section 4.8, only QH in async schedule */ if (async && (N... | 15,465 |
0 | static int ssi_slave_init(DeviceState *dev, DeviceInfo *base_info) { SSISlaveInfo *info = container_of(base_info, SSISlaveInfo, qdev); SSISlave *s = SSI_SLAVE_FROM_QDEV(dev); SSIBus *bus; bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(dev)); if (LIST_FIRST(&bus->qbus.children) != dev || LIST_NEXT(dev, sibling) != NULL) { ... | 15,466 |
0 | struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size, DisplayState *ds) { struct pxa2xx_state_s *s; struct pxa2xx_ssp_s *ssp; int iomemtype, i; s = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s)); s->env = cpu_init(); cpu_arm_set_model(s->env, "pxa255"); register_savevm("cpu", 0, 0, cpu_save... | 15,467 |
0 | void stq_le_phys(target_phys_addr_t addr, uint64_t val) { val = cpu_to_le64(val); cpu_physical_memory_write(addr, &val, 8); } | 15,468 |
0 | static int arm946_prbs_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { if (ri->crm >= 8) { return EXCP_UDEF; } env->cp15.c6_region[ri->crm] = value; return 0; } | 15,469 |
0 | static int64_t get_clock(void) { #if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \ || defined(__DragonFly__) if (use_rt_clock) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return ts.tv_sec * 1000000000LL + ts.tv_nsec; } else #endif { /* XXX: using gettimeofday leads to prob... | 15,470 |
0 | static void setup_frame(int sig, struct emulated_sigaction * ka, target_sigset_t *set, CPUState *regs) { struct sigframe *frame; abi_ulong frame_addr; int i; frame_addr = get_sigframe(ka, regs, sizeof(*frame)); if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) goto give_sigsegv; install_sigtramp(frame->sf_code... | 15,471 |
0 | static void vmsvga_text_update(void *opaque, console_ch_t *chardata) { struct vmsvga_state_s *s = opaque; if (s->vga.text_update) s->vga.text_update(&s->vga, chardata); } | 15,473 |
0 | static int send_response(GAState *s, QObject *payload) { const char *buf; QString *payload_qstr; GIOStatus status; g_assert(payload && s->channel); payload_qstr = qobject_to_json(payload); if (!payload_qstr) { return -EINVAL; } qstring_append_chr(payload_qstr, '\n'); buf = qstring_get_str(payload_qstr); status = ga_cha... | 15,474 |
0 | float64 HELPER(ucf64_addd)(float64 a, float64 b, CPUUniCore32State *env) { return float64_add(a, b, &env->ucf64.fp_status); } | 15,475 |
0 | static void term_exit(void) { tcsetattr (0, TCSANOW, &oldtty); } | 15,477 |
0 | void timer_mod_ns(QEMUTimer *ts, int64_t expire_time) { QEMUTimerList *timer_list = ts->timer_list; bool rearm; qemu_mutex_lock(&timer_list->active_timers_lock); timer_del_locked(timer_list, ts); rearm = timer_mod_ns_locked(timer_list, ts, expire_time); qemu_mutex_unlock(&timer_list->active_timers_lock); if (rearm) { t... | 15,478 |
0 | static int convert_do_copy(ImgConvertState *s) { uint8_t *buf = NULL; int64_t sector_num, allocated_done; int ret; int n; /* Check whether we have zero initialisation or can get it efficiently */ s->has_zero_init = s->min_sparse && !s->target_has_backing ? bdrv_has_zero_init(blk_bs(s->target)) : false; if (!s->has_zero... | 15,479 |
0 | static void test_visitor_in_native_list_uint16(TestInputVisitorData *data, const void *unused) { test_native_list_integer_helper(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_U16); } | 15,480 |
0 | static void validate_bootdevices(char *devices) { /* We just do some generic consistency checks */ const char *p; int bitmap = 0; for (p = devices; *p != '\0'; p++) { /* Allowed boot devices are: * a-b: floppy disk drives * c-f: IDE disk drives * g-m: machine implementation dependent drives * n-p: network devices * It'... | 15,481 |
0 | void s390_add_running_cpu(S390CPU *cpu) { CPUState *cs = CPU(cpu); if (cs->halted) { s390_running_cpus++; cs->halted = 0; cs->exception_index = -1; } } | 15,483 |
0 | static int usb_audio_handle_data(USBDevice *dev, USBPacket *p) { USBAudioState *s = (USBAudioState *) dev; int ret = 0; switch (p->pid) { case USB_TOKEN_OUT: switch (p->devep) { case 1: ret = usb_audio_handle_dataout(s, p); break; default: goto fail; } break; default: fail: ret = USB_RET_STALL; break; } if (ret == USB_... | 15,484 |
0 | int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, void *opaque) { struct arm_note note; CPUARMState *env = &ARM_CPU(cs)->env; DumpState *s = opaque; int ret, i; arm_note_init(¬e, s, "CORE", 5, NT_PRSTATUS, sizeof(note.prstatus)); note.prstatus.pr_pid = cpu_to_dump32(s, cpuid); for (i = 0... | 15,485 |
0 | static int write_manifest(AVFormatContext *s, int final) { DASHContext *c = s->priv_data; AVIOContext *out; char temp_filename[1024]; int ret, i; const char *proto = avio_find_protocol_name(s->filename); int use_rename = proto && !strcmp(proto, "file"); static unsigned int warned_non_file = 0; AVDictionaryEntry *title ... | 15,487 |
0 | static void curl_close(BlockDriverState *bs) { BDRVCURLState *s = bs->opaque; int i; DPRINTF("CURL: Close\n"); for (i=0; i<CURL_NUM_STATES; i++) { if (s->states[i].in_use) curl_clean_state(&s->states[i]); if (s->states[i].curl) { curl_easy_cleanup(s->states[i].curl); s->states[i].curl = NULL; } if (s->states[i].orig_bu... | 15,488 |
0 | if_output(struct socket *so, struct mbuf *ifm) { struct mbuf *ifq; int on_fastq = 1; DEBUG_CALL("if_output"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("ifm = %lx", (long)ifm); /* * First remove the mbuf from m_usedlist, * since we're gonna use m_next and m_prev ourselves * XXX Shouldn't need this, gotta change dtom()... | 15,490 |
0 | static int ne2000_can_receive(void *opaque) { NE2000State *s = opaque; if (s->cmd & E8390_STOP) return 1; return !ne2000_buffer_full(s); } | 15,491 |
0 | static void *bochs_bios_init(void) { void *fw_cfg; uint8_t *smbios_table; size_t smbios_len; uint64_t *numa_fw_cfg; int i, j; register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL); register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL); register_ioport_write(0x402, 1, 1, bochs_bios_write, NULL); register_iopor... | 15,493 |
0 | static int xen_pt_word_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint16_t *value, uint16_t valid_mask) { XenPTRegInfo *reg = cfg_entry->reg; uint16_t valid_emu_mask = 0; /* emulate word register */ valid_emu_mask = reg->emu_mask & valid_mask; *value = XEN_PT_MERGE_VALUE(*value, cfg_entry->data, ~valid_em... | 15,494 |
0 | static int img_rebase(int argc, char **argv) { BlockDriverState *bs, *bs_old_backing = NULL, *bs_new_backing = NULL; BlockDriver *old_backing_drv, *new_backing_drv; char *filename; const char *fmt, *cache, *out_basefmt, *out_baseimg; int c, flags, ret; int unsafe = 0; int progress = 0; /* Parse commandline parameters *... | 15,496 |
0 | int get_buffer(ByteIOContext *s, unsigned char *buf, int size) { int len, size1; size1 = size; while (size > 0) { len = s->buf_end - s->buf_ptr; if (len > size) len = size; if (len == 0) { fill_buffer(s); len = s->buf_end - s->buf_ptr; if (len == 0) break; } else { memcpy(buf, s->buf_ptr, len); buf += len; s->buf_ptr +... | 15,497 |
0 | AVFilterFormats *ff_make_format_list(const int *fmts) { AVFilterFormats *formats; int count; for (count = 0; fmts[count] != -1; count++) ; formats = av_mallocz(sizeof(*formats)); if (count) formats->formats = av_malloc(sizeof(*formats->formats) * count); formats->nb_formats = count; memcpy(formats->formats, fmts, sizeo... | 15,498 |
1 | void qemu_cond_destroy(QemuCond *cond) { BOOL result; result = CloseHandle(cond->continue_event); if (!result) { error_exit(GetLastError(), __func__); } cond->continue_event = 0; result = CloseHandle(cond->sema); if (!result) { error_exit(GetLastError(), __func__); } cond->sema = 0; } | 15,500 |
1 | static inline void gen_intermediate_code_internal(CPUARMState *env, TranslationBlock *tb, int search_pc) { DisasContext dc1, *dc = &dc1; CPUBreakpoint *bp; uint16_t *gen_opc_end; int j, lj; target_ulong pc_start; uint32_t next_page_start; int num_insns; int max_insns; /* generate intermediate code */ pc_start = tb->pc;... | 15,502 |
1 | static int ram_save_page(RAMState *rs, PageSearchStatus *pss, bool last_stage) { int pages = -1; uint64_t bytes_xmit; ram_addr_t current_addr; uint8_t *p; int ret; bool send_async = true; RAMBlock *block = pss->block; ram_addr_t offset = pss->page << TARGET_PAGE_BITS; p = block->host + offset; trace_ram_save_page(block... | 15,503 |
1 | static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s) { if (!s->config || !s->enable) return 1; return (s->cmd->next_cmd == s->cmd->stop); } | 15,504 |
0 | static int dnxhd_decode_dct_block_10_444(const DNXHDContext *ctx, RowContext *row, int n) { return dnxhd_decode_dct_block(ctx, row, n, 6, 32, 6); } | 15,505 |
0 | av_cold int swri_rematrix_init(SwrContext *s){ int i, j; int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout); int nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout); s->mix_any_f = NULL; if (!s->rematrix_custom) { int r = auto_matrix(s); if (r) return r; } if (s->midbuf.fmt == AV_SAMPLE_FMT_S16P){ ... | 15,506 |
0 | static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb) { int i, j, k, sb_x, sb_y; int scheme; int current_macroblock; int current_fragment; int coding_mode; int custom_mode_alphabet[CODING_MODE_COUNT]; if (s->keyframe) { for (i = 0; i < s->fragment_count; i++) s->all_fragments[i].coding_method = MODE_INTRA; } ... | 15,507 |
0 | static int h264_probe(AVProbeData *p) { uint32_t code = -1; int sps = 0, pps = 0, idr = 0, res = 0, sli = 0; int i; for (i = 0; i < p->buf_size; i++) { code = (code << 8) + p->buf[i]; if ((code & 0xffffff00) == 0x100) { int ref_idc = (code >> 5) & 3; int type = code & 0x1F; static const int8_t ref_zero[] = { 2, 0, 0, 0... | 15,508 |
0 | static int mov_write_tapt_tag(AVIOContext *pb, MOVTrack *track) { int32_t width = av_rescale(track->enc->sample_aspect_ratio.num, track->enc->width, track->enc->sample_aspect_ratio.den); int64_t pos = avio_tell(pb); avio_wb32(pb, 0); /* size */ ffio_wfourcc(pb, "tapt"); avio_wb32(pb, 20); ffio_wfourcc(pb, "clef"); avio... | 15,509 |
0 | static inline void RENAME(rgb24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused) { int i; assert(src1==src2); for (i=0; i<width; i++) { int r= src1[6*i + 0] + src1[6*i + 3]; int g= src1[6*i + 1] + src1[6*i + 4]; int b= src1[6*i + 2] + src1[6*i + 5]; dstU[i]... | 15,510 |
0 | static inline int parse_nal_units(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t * const buf, int buf_size) { H264ParseContext *p = s->priv_data; H2645NAL nal = { NULL }; int buf_index, next_avc; unsigned int pps_id; unsigned int slice_type; int state = -1, got_reset = 0; int q264 = buf_size >=4 && !memc... | 15,511 |
1 | static void balloon_stats_change_timer(VirtIOBalloon *s, int secs) { timer_mod(s->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000); } | 15,512 |
1 | static int tta_decode_init(AVCodecContext * avctx) { TTAContext *s = avctx->priv_data; int i; s->avctx = avctx; // 30bytes includes a seektable with one frame if (avctx->extradata_size < 30) init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size); if (show_bits_long(&s->gb, 32) == bswap_32(ff_get_fourcc("TTA1"))... | 15,513 |
1 | void show_licence(void) { printf( "ffmpeg version " FFMPEG_VERSION "\n" "Copyright (c) 2000, 2001, 2002 Gerard Lantau\n" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation; either version 2 of th... | 15,516 |
1 | static int parse_hex64(DeviceState *dev, Property *prop, const char *str) { uint64_t *ptr = qdev_get_prop_ptr(dev, prop); if (sscanf(str, "%" PRIx64, ptr) != 1) return -EINVAL; return 0; } | 15,518 |
1 | const TPMDriverOps *tpm_get_backend_driver(const char *type) { int i; for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) { if (!strcmp(TpmType_lookup[be_drivers[i]->type], type)) { return be_drivers[i]; } } return NULL; } | 15,519 |
0 | static void glib_pollfds_fill(int64_t *cur_timeout) { GMainContext *context = g_main_context_default(); int timeout = 0; int64_t timeout_ns; int n; g_main_context_prepare(context, &max_priority); glib_pollfds_idx = gpollfds->len; n = glib_n_poll_fds; do { GPollFD *pfds; glib_n_poll_fds = n; g_array_set_size(gpollfds, g... | 15,522 |
0 | static uint64_t musicpal_misc_read(void *opaque, target_phys_addr_t offset, unsigned size) { switch (offset) { case MP_MISC_BOARD_REVISION: return MP_BOARD_REVISION; default: return 0; } } | 15,525 |
0 | static void dmg_refresh_limits(BlockDriverState *bs, Error **errp) { bs->request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O supported */ } | 15,527 |
0 | static void sigp_store_adtl_status(void *arg) { SigpInfo *si = arg; if (!kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) { set_sigp_status(si, SIGP_STAT_INVALID_ORDER); return; } /* cpu has to be stopped */ if (s390_cpu_get_state(si->cpu) != CPU_STATE_STOPPED) { set_sigp_status(si, SIGP_STAT_INCORRECT_ST... | 15,528 |
0 | static void rom_reset(void *unused) { Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (rom->data == NULL) continue; cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize); if (rom->isrom) { /* rom needs to be written only once */ qemu_free(rom->data); rom->data = NULL; } } } | 15,529 |
0 | static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, MPADecodeHeader *c, uint32_t spf) { #define LAST_BITS(k, n) ((k) & ((1 << (n)) - 1)) #define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m))) uint16_t crc; uint32_t v; char version[10]; uint32_t peak = 0; int32_t r_gain = INT32_MIN, a_gain = INT32_... | 15,531 |
0 | int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) { uint8_t *buf; int size = av_samples_get_buffer_size(NULL, nb_channels, nb_samples, sample_fmt, align); if (size < 0) return size; buf = av_mallocz(size); if (!buf) return AVERROR(ENOME... | 15,532 |
0 | static void do_interrupt_protected(int intno, int is_int, int error_code, unsigned int next_eip, int is_hw) { SegmentCache *dt; uint8_t *ptr, *ssp; int type, dpl, selector, ss_dpl, cpl, sp_mask; int has_error_code, new_stack, shift; uint32_t e1, e2, offset, ss, esp, ss_e1, ss_e2; uint32_t old_eip; has_error_code = 0; i... | 15,533 |
0 | static int v9fs_synth_remove(FsContext *ctx, const char *path) { errno = EPERM; return -1; } | 15,536 |
0 | static void dec_b(DisasContext *dc) { if (dc->r0 == R_RA) { LOG_DIS("ret\n"); } else if (dc->r0 == R_EA) { LOG_DIS("eret\n"); } else if (dc->r0 == R_BA) { LOG_DIS("bret\n"); } else { LOG_DIS("b r%d\n", dc->r0); } /* restore IE.IE in case of an eret */ if (dc->r0 == R_EA) { TCGv t0 = tcg_temp_new(); int l1 = gen_new_lab... | 15,538 |
0 | static void query_facilities(void) { unsigned long hwcap = qemu_getauxval(AT_HWCAP); /* Is STORE FACILITY LIST EXTENDED available? Honestly, I believe this is present on all 64-bit systems, but let's check for it anyway. */ if (hwcap & HWCAP_S390_STFLE) { register int r0 __asm__("0"); register void *r1 __asm__("1"); /*... | 15,539 |
0 | static void setup_rt_frame(int sig, struct target_sigaction *ka, target_siginfo_t *info, target_sigset_t *set, CPUOpenRISCState *env) { int err = 0; abi_ulong frame_addr; unsigned long return_ip; struct target_rt_sigframe *frame; abi_ulong info_addr, uc_addr; frame_addr = get_sigframe(ka, env, sizeof(*frame)); if (!loc... | 15,540 |
0 | static void imx_enet_do_tx(IMXFECState *s) { int frame_size = 0; uint8_t frame[ENET_MAX_FRAME_SIZE]; uint8_t *ptr = frame; uint32_t addr = s->tx_descriptor; while (1) { IMXENETBufDesc bd; int len; imx_enet_read_bd(&bd, addr); FEC_PRINTF("tx_bd %x flags %04x len %d data %08x option %04x " "status %04x\n", addr, bd.flags... | 15,541 |
0 | static uint64_t ne2000_read(void *opaque, target_phys_addr_t addr, unsigned size) { NE2000State *s = opaque; if (addr < 0x10 && size == 1) { return ne2000_ioport_read(s, addr); } else if (addr == 0x10) { if (size <= 2) { return ne2000_asic_ioport_read(s, addr); } else { return ne2000_asic_ioport_readl(s, addr); } } els... | 15,542 |
0 | static const OptionDef *find_option(const OptionDef *po, const char *name) { const char *p = strchr(name, ':'); int len = p ? p - name : strlen(name); while (po->name != NULL) { if (!strncmp(name, po->name, len) && strlen(po->name) == len) break; po++; } return po; } | 15,543 |
0 | uint32 float64_to_uint32( float64 a STATUS_PARAM ) { int64_t v; uint32 res; v = float64_to_int64(a STATUS_VAR); if (v < 0) { res = 0; float_raise( float_flag_invalid STATUS_VAR); } else if (v > 0xffffffff) { res = 0xffffffff; float_raise( float_flag_invalid STATUS_VAR); } else { res = v; } return res; } | 15,544 |
0 | static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq) { VirtIOGPU *g = VIRTIO_GPU(vdev); VirtQueueElement elem; size_t s; struct virtio_gpu_update_cursor cursor_info; if (!virtio_queue_ready(vq)) { return; } while (virtqueue_pop(vq, &elem)) { s = iov_to_buf(elem.out_sg, elem.out_num, 0, &cursor_info, ... | 15,545 |
0 | static int iscsi_truncate(BlockDriverState *bs, int64_t offset) { IscsiLun *iscsilun = bs->opaque; Error *local_err = NULL; if (iscsilun->type != TYPE_DISK) { return -ENOTSUP; } iscsi_readcapacity_sync(iscsilun, &local_err); if (local_err != NULL) { error_free(local_err); return -EIO; } if (offset > iscsi_getlength(bs)... | 15,546 |
0 | static void save_native_fp_fxsave(CPUState *env) { struct fpxstate *fp = &fpx1; int fptag, i, j; uint16_t fpuc; asm volatile ("fxsave %0" : : "m" (*fp)); env->fpuc = fp->fpuc; env->fpstt = (fp->fpus >> 11) & 7; env->fpus = fp->fpus & ~0x3800; fptag = fp->fptag ^ 0xff; for(i = 0;i < 8; i++) { env->fptags[i] = (fptag >> ... | 15,547 |
0 | static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp) { int idx = 0; BlockDriverState *new_bs = NULL; Error *local_err = NULL; char *desc = NULL; int64_t total_size = 0, filesize; char *adapter_type = NULL; char *backing_file = NULL; char *fmt = NULL; int flags = 0; int ret = 0; bool flat, split, c... | 15,548 |
0 | void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap, int64_t cur_sector, int64_t nr_sectors) { assert(bdrv_dirty_bitmap_enabled(bitmap)); hbitmap_reset(bitmap->bitmap, cur_sector, nr_sectors); } | 15,551 |
0 | static int set_string(void *obj, const AVOption *o, const char *val, uint8_t **dst) { av_freep(dst); *dst = av_strdup(val); return 0; } | 15,553 |
0 | static int mkv_write_native_codecprivate(AVFormatContext *s, AVCodecParameters *par, AVIOContext *dyn_cp) { switch (par->codec_id) { case AV_CODEC_ID_VORBIS: case AV_CODEC_ID_THEORA: return put_xiph_codecpriv(s, dyn_cp, par); case AV_CODEC_ID_FLAC: return put_flac_codecpriv(s, dyn_cp, par); case AV_CODEC_ID_WAVPACK: re... | 15,554 |
1 | static void set_cfg_value(bool is_max, int index, int value) { if (is_max) { cfg.buckets[index].max = value; } else { cfg.buckets[index].avg = value; } } | 15,556 |
1 | static int coroutine_fn mirror_iteration(MirrorBlockJob *s) { BlockDriverState *source = s->common.bs; BlockDriverState *target = s->target; QEMUIOVector qiov; int ret, nb_sectors; int64_t end; struct iovec iov; end = s->common.len >> BDRV_SECTOR_BITS; s->sector_num = bdrv_get_next_dirty(source, s->sector_num); nb_sect... | 15,557 |
1 | static void decode_rr_divide(CPUTriCoreState *env, DisasContext *ctx) { uint32_t op2; int r1, r2, r3; TCGv temp, temp2; op2 = MASK_OP_RR_OP2(ctx->opcode); r3 = MASK_OP_RR_D(ctx->opcode); r2 = MASK_OP_RR_S2(ctx->opcode); r1 = MASK_OP_RR_S1(ctx->opcode); switch (op2) { case OPC2_32_RR_BMERGE: gen_helper_bmerge(cpu_gpr_d[... | 15,558 |
1 | static int local_unlinkat(FsContext *ctx, V9fsPath *dir, const char *name, int flags) { int ret; V9fsString fullname; char *buffer; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullname, "%s/%s", dir->data, name); if (ctx->export_flags & V9FS_SM_MAPPED_FILE) { if (flags == AT_REMOVEDIR) { /* * If directory remove ... | 15,559 |
1 | static uint64_t pl011_read(void *opaque, hwaddr offset, unsigned size) { PL011State *s = (PL011State *)opaque; uint32_t c; if (offset >= 0xfe0 && offset < 0x1000) { return s->id[(offset - 0xfe0) >> 2]; } switch (offset >> 2) { case 0: /* UARTDR */ s->flags &= ~PL011_FLAG_RXFF; c = s->read_fifo[s->read_pos]; if (s->read... | 15,560 |
1 | static BlockAIOCB *inject_error(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule) { BDRVBlkdebugState *s = bs->opaque; int error = rule->options.inject.error; struct BlkdebugAIOCB *acb; QEMUBH *bh; if (rule->options.inject.once) { QSIMPLEQ_INIT(&s->active_rules); } if (rule->options.injec... | 15,561 |
1 | static void colo_old_packet_check_one_conn(void *opaque, void *user_data) { Connection *conn = opaque; GList *result = NULL; int64_t check_time = REGULAR_PACKET_CHECK_MS; result = g_queue_find_custom(&conn->primary_list, &check_time, (GCompareFunc)colo_old_packet_check_one); if (result) { /* do checkpoint will flush ol... | 15,562 |
1 | int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot) { int fd; int64_t size; struct cow_header_v2 cow_header; #ifndef _WIN32 char template[] = "/tmp/vl.XXXXXX"; int cow_fd; struct stat st; #endif bs->read_only = 0; bs->fd = -1; bs->cow_fd = -1; bs->cow_bitmap = NULL; strcpy(bs->filename, filename); /... | 15,563 |
1 | static void ehci_detach(USBPort *port) { EHCIState *s = port->opaque; uint32_t *portsc = &s->portsc[port->index]; const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; trace_usb_ehci_port_detach(port->index, owner); if (*portsc & PORTSC_POWNER) { USBPort *companion = s->companion_ports[port->index]; companio... | 15,564 |
1 | static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX mm_end = end - 15; #if 1 //is faster only if multiplies are reasonable fast... | 15,565 |
1 | PPC_OP(tlbie) { do_tlbie(); RETURN(); } | 15,566 |
0 | static int avs_probe(AVProbeData * p) { const uint8_t *d; if (p->buf_size < 2) return 0; d = p->buf; if (d[0] == 'w' && d[1] == 'W' && d[2] == 0x10 && d[3] == 0) return 50; return 0; } | 15,568 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.