label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, uint16_t ipbh0) { CPUS390XState *env = &cpu->env; uint64_t sccb; uint32_t code; int r = 0; cpu_synchronize_state(CPU(cpu)); if (env->psw.mask & PSW_MASK_PSTATE) { enter_pgmcheck(cpu, PGM_PRIVILEGED); return 0; } sccb = env->regs[ipbh0 & 0xf]; code = en... | 12,962 |
1 | static void libschroedinger_flush(AVCodecContext *avctx) { /* Got a seek request. Free the decoded frames queue and then reset * the decoder */ SchroDecoderParams *p_schro_params = avctx->priv_data; /* Free data in the output frame queue. */ ff_schro_queue_free(&p_schro_params->dec_frame_queue, libschroedinger_decode_f... | 12,964 |
1 | CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx) { HEVCContext *h = avctx->priv_data; const HEVCVPS *vps = (const HEVCVPS *)h->ps.vps_list[0]->data; const HEVCSPS *sps = (const HEVCSPS *)h->ps.sps_list[0]->data; int i, num_pps = 0; const HEVCPPS *pps = h->ps.pps; PTLCommon ptlc = vps->ptl.general_... | 12,965 |
1 | static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid) { XHCIState *xhci = epctx->xhci; XHCIStreamContext *stctx = NULL; XHCITransfer *xfer; XHCIRing *ring; USBEndpoint *ep = NULL; uint64_t mfindex; unsigned int count = 0; int length; int i; trace_usb_xhci_ep_kick(epctx->slotid, epctx->epid, streamid)... | 12,967 |
1 | static int local_symlink(FsContext *fs_ctx, const char *oldpath, V9fsPath *dir_path, const char *name, FsCred *credp) { int err = -1; int serrno = 0; char *newpath; V9fsString fullname; char *buffer; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name); newpath = fullname.data; /* ... | 12,969 |
1 | void OPPROTO op_405_check_satu (void) { if (unlikely(T0 < T2)) { /* Saturate result */ T0 = -1; } RETURN(); } | 12,970 |
1 | static void qemu_gluster_complete_aio(void *opaque) { GlusterAIOCB *acb = (GlusterAIOCB *)opaque; qemu_bh_delete(acb->bh); acb->bh = NULL; qemu_coroutine_enter(acb->coroutine, NULL); } | 12,971 |
1 | static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev, uint16_t vendor, uint16_t device, uint16_t class_code, uint8_t pif) { uint8_t *config; uint32_t size; proxy->vdev = vdev; config = proxy->pci_dev.config; pci_config_set_vendor_id(config, vendor); pci_config_set_device_id(config, device); config[0x08... | 12,972 |
1 | static void disas_pc_rel_adr(DisasContext *s, uint32_t insn) { unsigned int page, rd; uint64_t base; int64_t offset; page = extract32(insn, 31, 1); /* SignExtend(immhi:immlo) -> offset */ offset = ((int64_t)sextract32(insn, 5, 19) << 2) | extract32(insn, 29, 2); rd = extract32(insn, 0, 5); base = s->pc - 4; if (page) {... | 12,973 |
1 | ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) { VocDecContext *voc = s->priv_data; AVCodecParameters *par = st->codecpar; AVIOContext *pb = s->pb; VocType type; int size, tmp_codec=-1; int sample_rate = 0; int channels = 1; int64_t duration; int ret; av_add_index_entry(st, avio_tell(p... | 12,974 |
1 | void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu) { CPUClass *k = CPU_GET_CLASS(cpu); int64_t cpu_id; *gpe->sts = *gpe->sts | ACPI_CPU_HOTPLUG_STATUS; cpu_id = k->get_arch_id(CPU(cpu)); g->sts[cpu_id / 8] |= (1 << (cpu_id % 8)); } | 12,975 |
1 | static void fill_coding_method_array (sb_int8_array tone_level_idx, sb_int8_array tone_level_idx_temp, sb_int8_array coding_method, int nb_channels, int c, int superblocktype_2_3, int cm_table_select) { int ch, sb, j; int tmp, acc, esp_40, comp; int add1, add2, add3, add4; int64_t multres; // This should never happen i... | 12,976 |
1 | void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]) { int i; int w_align= 1; int h_align= 1; switch(s->pix_fmt){ case PIX_FMT_YUV420P: case PIX_FMT_YUYV422: case PIX_FMT_UYVY422: case PIX_FMT_YUV422P: case PIX_FMT_YUV440P: case PIX_FMT_YUV444P: case PIX_F... | 12,977 |
1 | PPC_OP(addze) { T1 = T0; T0 += xer_ca; if (T0 < T1) { xer_ca = 1; } else { xer_ca = 0; } RETURN(); } | 12,978 |
1 | static int get_unused_buffer(QEMUFile *f, void *pv, size_t size) { qemu_fseek(f, size, SEEK_CUR); return 0; } | 12,979 |
1 | void hmp_savevm(Monitor *mon, const QDict *qdict) { BlockDriverState *bs, *bs1; QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1; int ret; QEMUFile *f; int saved_vm_running; uint64_t vm_state_size; qemu_timeval tv; struct tm tm; const char *name = qdict_get_try_str(qdict, "name"); Error *local_err = NULL; ... | 12,980 |
1 | static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) { SWFContext *swf = s->priv_data; AVIOContext *pb = s->pb; AVStream *vst = NULL, *ast = NULL, *st = 0; int tag, len, i, frame, v, res; #if CONFIG_ZLIB if (swf->zpb) pb = swf->zpb; #endif for(;;) { uint64_t pos = avio_tell(pb); tag = get_swf_tag(pb, &len); if... | 12,981 |
1 | static int dvbsub_parse_region_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { DVBSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; int region_id, object_id; int av_unused version; DVBSubRegion *region; DVBSubObject *object; DVBSubObjectDisplay *display; int fill; int ret; ... | 12,982 |
1 | int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags) { BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; int ret; AVFrame *cur_frame; /* no picref available, fetch it from the filterchain */ if (!av_fifo_size(buf->fifo)) { if (flags & AV_BUFFERS... | 12,983 |
1 | void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict) { QObject *data; int devfn; if (do_pcie_aer_inject_error(mon, qdict, &data) < 0) { return; } qdict = qobject_to_qdict(data); assert(qdict); devfn = (int)qdict_get_int(qdict, "devfn"); monitor_printf(mon, "OK id: %s root bus: %s, bus: %x devfn: %x.%x\n", q... | 12,985 |
0 | static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) { int max_frames, first_frames = 0, frames; uint8_t *buf, *buf2, *end; AC3HeaderInfo hdr; GetBitContext gbc; enum CodecID codec_id = CODEC_ID_AC3; max_frames = 0; buf = p->buf; end = buf + p->buf_size; for(; buf < end; buf++) { buf2 = buf; for(fr... | 12,986 |
0 | static int h263_probe(AVProbeData *p) { int code; const uint8_t *d; if (p->buf_size < 6) return 0; d = p->buf; code = (d[0] << 14) | (d[1] << 6) | (d[2] >> 2); if (code == 0x20) { return 50; } return 0; } | 12,987 |
0 | static int cinepak_decode_init(AVCodecContext *avctx) { CinepakContext *s = avctx->priv_data; s->avctx = avctx; s->width = (avctx->width + 3) & ~3; s->height = (avctx->height + 3) & ~3; s->sega_film_skip_bytes = -1; /* uninitialized state */ // check for paletted data if ((avctx->palctrl == NULL) || (avctx->bits_per_sa... | 12,989 |
1 | static int mpegts_init(AVFormatContext *s) { MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st; MpegTSService *service; AVStream *st, *pcr_st = NULL; AVDictionaryEntry *title, *provider; int i, j; const char *service_name; const char *provider_name; int *pids; int ret; if (s->max_delay < 0) /* Not set by the cal... | 12,990 |
1 | static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPHeader *h) { FFStream *stream; int stream_index, port; char buf[1024]; char path1[1024]; const char *path; HTTPContext *rtp_c; RTSPTransportField *th; struct sockaddr_in dest_addr; RTSPActionServerSetup setup; /* find which url is asked */ url_split(NULL, ... | 12,991 |
1 | void aio_set_fd_handler(AioContext *ctx, int fd, bool is_external, IOHandler *io_read, IOHandler *io_write, AioPollFn *io_poll, void *opaque) { AioHandler *node; bool is_new = false; bool deleted = false; qemu_lockcnt_lock(&ctx->list_lock); node = find_aio_handler(ctx, fd); /* Are we deleting the fd handler? */ if (!io... | 12,992 |
0 | static int check_bits_for_superframe(GetBitContext *orig_gb, WMAVoiceContext *s) { GetBitContext s_gb, *gb = &s_gb; int n, need_bits, bd_idx; const struct frame_type_desc *frame_desc; /* initialize a copy */ init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits); skip_bits_long(gb, get_bits_count(orig_gb)); av_asser... | 12,993 |
0 | static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale) { if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { const int strength = ff_h263_loop_filter_strength[qscale]; __asm__ volatile ( H263_LOOP_FILTER "movq %%mm3, %1 \n\t" "movq %%mm4, %2 \n\t" "movq %%mm5, %0 \n\t" "movq %%mm6, %3 \n\t" : "+m"(*(uin... | 12,994 |
0 | static int64_t *concat_channels_lists(const int64_t *layouts, const int *counts) { int nb_layouts = 0, nb_counts = 0, i; int64_t *list; if (layouts) for (; layouts[nb_layouts] != -1; nb_layouts++); if (counts) for (; counts[nb_counts] != -1; nb_counts++); if (nb_counts > INT_MAX - 1 - nb_layouts) return NULL; if (!(lis... | 12,995 |
0 | static void vnc_qmp_event(VncState *vs, QAPIEvent event) { VncServerInfo *si; if (!vs->info) { return; } g_assert(vs->info->base); si = vnc_server_info_get(vs->vd); if (!si) { return; } switch (event) { case QAPI_EVENT_VNC_CONNECTED: qapi_event_send_vnc_connected(si, vs->info->base, &error_abort); break; case QAPI_EVEN... | 12,996 |
0 | void dump_exec_info(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { int i, target_code_size, max_target_code_size; int direct_jmp_count, direct_jmp2_count, cross_page; TranslationBlock *tb; target_code_size = 0; max_target_code_size = 0; cross_page = 0; direct_jmp_count = 0; direct_jmp2_count = 0; for(i =... | 12,997 |
0 | static void ac3_downmix(AC3DecodeContext *s) { int i, j; float v0, v1; for(i=0; i<256; i++) { v0 = v1 = 0.0f; for(j=0; j<s->fbw_channels; j++) { v0 += s->output[j][i] * s->downmix_coeffs[j][0]; v1 += s->output[j][i] * s->downmix_coeffs[j][1]; } v0 /= s->downmix_coeff_sum[0]; v1 /= s->downmix_coeff_sum[1]; if(s->output_... | 12,998 |
0 | static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features) { VirtIONet *n = VIRTIO_NET(vdev); int i; virtio_net_set_multiqueue(n, __virtio_has_feature(features, VIRTIO_NET_F_MQ)); virtio_net_set_mrg_rx_bufs(n, __virtio_has_feature(features, VIRTIO_NET_F_MRG_RXBUF), __virtio_has_feature(features, VIRTIO_... | 13,000 |
0 | int postcopy_ram_enable_notify(MigrationIncomingState *mis) { /* Open the fd for the kernel to give us userfaults */ mis->userfault_fd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); if (mis->userfault_fd == -1) { error_report("%s: Failed to open userfault fd: %s", __func__, strerror(errno)); return -1; } /* * Alt... | 13,003 |
0 | void qio_dns_resolver_lookup_async(QIODNSResolver *resolver, SocketAddress *addr, QIOTaskFunc func, gpointer opaque, GDestroyNotify notify) { QIOTask *task; struct QIODNSResolverLookupData *data = g_new0(struct QIODNSResolverLookupData, 1); data->addr = QAPI_CLONE(SocketAddress, addr); task = qio_task_new(OBJECT(resolv... | 13,004 |
0 | static void vhost_iommu_region_add(MemoryListener *listener, MemoryRegionSection *section) { struct vhost_dev *dev = container_of(listener, struct vhost_dev, iommu_listener); struct vhost_iommu *iommu; if (!memory_region_is_iommu(section->mr)) { return; } iommu = g_malloc0(sizeof(*iommu)); iommu->n.notify = vhost_iommu... | 13,005 |
0 | static void arm_timer_write(void *opaque, target_phys_addr_t offset, uint32_t value) { arm_timer_state *s = (arm_timer_state *)opaque; int freq; switch (offset >> 2) { case 0: /* TimerLoad */ s->limit = value; arm_timer_recalibrate(s, 1); break; case 1: /* TimerValue */ /* ??? Linux seems to want to write to this reado... | 13,006 |
0 | static void qed_plug_allocating_write_reqs(BDRVQEDState *s) { assert(!s->allocating_write_reqs_plugged); s->allocating_write_reqs_plugged = true; } | 13,007 |
0 | static inline void t_gen_swapr(TCGv d, TCGv s) { struct { int shift; /* LSL when positive, LSR when negative. */ uint32_t mask; } bitrev [] = { {7, 0x80808080}, {5, 0x40404040}, {3, 0x20202020}, {1, 0x10101010}, {-1, 0x08080808}, {-3, 0x04040404}, {-5, 0x02020202}, {-7, 0x01010101} }; int i; TCGv t, org_s; /* d and s r... | 13,008 |
0 | int h263_decode_picture_header(MpegEncContext *s) { int format, width, height, i; uint32_t startcode; align_get_bits(&s->gb); startcode= get_bits(&s->gb, 22-8); for(i= s->gb.size_in_bits - get_bits_count(&s->gb); i>24; i-=8) { startcode = ((startcode << 8) | get_bits(&s->gb, 8)) & 0x003FFFFF; if(startcode == 0x20) brea... | 13,009 |
0 | static X86CPU *pc_new_cpu(const char *cpu_model, int64_t apic_id, Error **errp) { X86CPU *cpu = NULL; Error *local_err = NULL; cpu = cpu_x86_create(cpu_model, &local_err); if (local_err != NULL) { goto out; } object_property_set_int(OBJECT(cpu), apic_id, "apic-id", &local_err); object_property_set_bool(OBJECT(cpu), tru... | 13,010 |
0 | static int find_pte64 (mmu_ctx_t *ctx, int h, int rw) { return _find_pte(ctx, 1, h, rw); } | 13,011 |
0 | void pc_basic_device_init(qemu_irq *isa_irq, ISADevice **rtc_state) { int i; DriveInfo *fd[MAX_FD]; PITState *pit; qemu_irq rtc_irq = NULL; qemu_irq *a20_line; ISADevice *i8042, *port92, *vmmouse; qemu_irq *cpu_exit_irq; register_ioport_write(0x80, 1, 1, ioport80_write, NULL); register_ioport_write(0xf0, 1, 1, ioportF0... | 13,013 |
0 | static JSONTokenType token_get_type(QObject *obj) { return qdict_get_int(qobject_to_qdict(obj), "type"); } | 13,014 |
0 | void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, const char *boot_device, BusState *idebus0, BusState *idebus1, ISADevice *s) { int val, nb, nb_heads, max_track, last_sect, i; FDriveType fd_type[2]; DriveInfo *fd[2]; static pc_cmos_init_late_arg arg; /* various important CMOS locations needed by PC/... | 13,015 |
0 | static uint32_t slow_bar_readw(void *opaque, target_phys_addr_t addr) { AssignedDevRegion *d = opaque; uint16_t *in = (uint16_t *)(d->u.r_virtbase + addr); uint32_t r; r = *in; DEBUG("slow_bar_readl addr=0x" TARGET_FMT_plx " val=0x%08x\n", addr, r); return r; } | 13,018 |
1 | static void simple_dict(void) { int i; struct { const char *encoded; LiteralQObject decoded; } test_cases[] = { { .encoded = "{\"foo\": 42, \"bar\": \"hello world\"}", .decoded = QLIT_QDICT(((LiteralQDictEntry[]){ { "foo", QLIT_QINT(42) }, { "bar", QLIT_QSTR("hello world") }, { } })), }, { .encoded = "{}", .decoded = Q... | 13,019 |
1 | static av_always_inline void idct(uint8_t *dst, int stride, int16_t *input, int type) { int16_t *ip = input; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H; int Ed, Gd, Add, Bdd, Fd, Hd; int i; /* Inverse DCT on the rows now */ for (i = 0; i < 8; i++) { /* Check for non-zero values ... | 13,020 |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; const uint8_t *buf_end = avpkt->data + avpkt->size; int buf_size = avpkt->size; QdrawContext * const a = avctx->priv_data; AVFrame * const p= (AVFrame*)&a->pic; uint8_t* outdata; int colors; i... | 13,021 |
1 | static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model, const char *name, int restricted, const char *vnetwork, const char *vhost, const char *vhostname, const char *tftp_export, const char *bootfile, const char *vdhcp_start, const char *vnameserver, const char *smb_export, const char *vsmbserver) {... | 13,022 |
1 | void exec_start_outgoing_migration(MigrationState *s, const char *command, Error **errp) { QIOChannel *ioc; const char *argv[] = { "/bin/sh", "-c", command, NULL }; trace_migration_exec_outgoing(command); ioc = QIO_CHANNEL(qio_channel_command_new_spawn(argv, O_WRONLY, errp)); if (!ioc) { return; } migration_set_outgoin... | 13,023 |
0 | static int nsv_probe(AVProbeData *p) { int i; av_dlog(NULL, "nsv_probe(), buf_size %d\n", p->buf_size); /* check file header */ /* streamed files might not have any header */ if (p->buf[0] == 'N' && p->buf[1] == 'S' && p->buf[2] == 'V' && (p->buf[3] == 'f' || p->buf[3] == 's')) return AVPROBE_SCORE_MAX; /* XXX: do stre... | 13,025 |
0 | static int nvdec_hevc_decode_init(AVCodecContext *avctx) { const HEVCContext *s = avctx->priv_data; const HEVCSPS *sps = s->ps.sps; return ff_nvdec_decode_init(avctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1); } | 13,026 |
1 | qemu_irq sh7750_irl(SH7750State *s) { sh_intc_toggle_source(sh_intc_source(&s->intc, IRL), 1, 0); /* enable */ return qemu_allocate_irqs(sh_intc_set_irl, sh_intc_source(&s->intc, IRL), 1)[0]; } | 13,028 |
1 | static uint64_t ivshmem_io_read(void *opaque, hwaddr addr, unsigned size) { IVShmemState *s = opaque; uint32_t ret; switch (addr) { case INTRMASK: ret = ivshmem_IntrMask_read(s); break; case INTRSTATUS: ret = ivshmem_IntrStatus_read(s); break; case IVPOSITION: /* return my VM ID if the memory is mapped */ if (s->shm_fd... | 13,029 |
1 | static void mcf_fec_enable_rx(mcf_fec_state *s) { mcf_fec_bd bd; mcf_fec_read_bd(&bd, s->rx_descriptor); s->rx_enabled = ((bd.flags & FEC_BD_E) != 0); if (!s->rx_enabled) DPRINTF("RX buffer full\n"); } | 13,030 |
1 | void usb_packet_setup(USBPacket *p, int pid, USBEndpoint *ep, uint64_t id, bool short_not_ok, bool int_req) { assert(!usb_packet_is_inflight(p)); assert(p->iov.iov != NULL); p->id = id; p->pid = pid; p->ep = ep; p->result = 0; p->parameter = 0; p->short_not_ok = short_not_ok; p->int_req = int_req; qemu_iovec_reset(&p->... | 13,032 |
1 | static void virtio_scsi_device_realize(DeviceState *dev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOSCSI *s = VIRTIO_SCSI(dev); static int virtio_scsi_id; Error *err = NULL; virtio_scsi_common_realize(dev, &err); if (err != NULL) { error_propagate(errp, err); return; } scsi_bus_new(&s->bus, sizeof(s... | 13,033 |
1 | void qemu_mutex_lock(QemuMutex *mutex) { EnterCriticalSection(&mutex->lock); /* Win32 CRITICAL_SECTIONs are recursive. Assert that we're not * using them as such. */ assert(mutex->owner == 0); mutex->owner = GetCurrentThreadId(); } | 13,037 |
1 | void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val) { /* We're passed bits [11..0] of the instruction; extract * SYSm and the mask bits. * Invalid combinations of SYSm and mask are UNPREDICTABLE; * we choose to treat them as if the mask bits were valid. * NB that the pseudocode 'mask' variable is bit... | 13,038 |
1 | static int parse_h264_sdp_line(AVFormatContext *s, int st_index, PayloadContext *h264_data, const char *line) { AVStream *stream; AVCodecContext *codec; const char *p = line; if (st_index < 0) return 0; stream = s->streams[st_index]; codec = stream->codec; assert(h264_data->cookie == MAGIC_COOKIE); if (av_strstart(p, "... | 13,041 |
1 | PPC_OP(icbi) { do_icbi(); RETURN(); } | 13,042 |
0 | void ff_vp3_idct_put_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){ idct(dest, line_size, block, 1); } | 13,043 |
0 | static bool is_iso_bc_entry_compatible(IsoBcSection *s) { return true; } | 13,044 |
0 | int64_t bdrv_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { return bdrv_get_block_status_above(bs, backing_bs(bs), sector_num, nb_sectors, pnum); } | 13,045 |
0 | static inline void gen_op_eval_fbe(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset); tcg_gen_or_tl(dst, dst, cpu_tmp0); tcg_gen_xori_tl(dst, dst, 0x1); } | 13,047 |
0 | static int blk_free(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); struct ioreq *ioreq; while (!LIST_EMPTY(&blkdev->freelist)) { ioreq = LIST_FIRST(&blkdev->freelist); LIST_REMOVE(ioreq, list); qemu_iovec_destroy(&ioreq->v); qemu_free(ioreq); } qemu_free(blkdev->p... | 13,048 |
0 | static uint32_t ide_ioport_read(void *opaque, uint32_t addr1) { IDEState *ide_if = opaque; IDEState *s = ide_if->cur_drive; uint32_t addr; int ret, hob; addr = addr1 & 7; /* FIXME: HOB readback uses bit 7, but it's always set right now */ //hob = s->select & (1 << 7); hob = 0; switch(addr) { case 0: ret = 0xff; break; ... | 13,049 |
0 | void qmp_block_dirty_bitmap_add(const char *node, const char *name, bool has_granularity, uint32_t granularity, Error **errp) { AioContext *aio_context; BlockDriverState *bs; if (!name || name[0] == '\0') { error_setg(errp, "Bitmap name cannot be empty"); return; } bs = bdrv_lookup_bs(node, node, errp); if (!bs) { retu... | 13,052 |
0 | static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp) { uint16_t nodenr; uint16List *cpus = NULL; if (node->has_nodeid) { nodenr = node->nodeid; } else { nodenr = nb_numa_nodes; } if (nodenr >= MAX_NODES) { error_setg(errp, "Max number of NUMA nodes reached: %" PRIu16 "", nodenr); return; } i... | 13,053 |
0 | static int create_filtergraph(AVFilterContext *ctx, const AVFrame *in, const AVFrame *out) { ColorSpaceContext *s = ctx->priv; const AVPixFmtDescriptor *in_desc = av_pix_fmt_desc_get(in->format); const AVPixFmtDescriptor *out_desc = av_pix_fmt_desc_get(out->format); int emms = 0, m, n, o, res, fmt_identical, redo_yuv2r... | 13,054 |
0 | static void stream_set_speed(BlockJob *job, int64_t speed, Error **errp) { StreamBlockJob *s = container_of(job, StreamBlockJob, common); if (speed < 0) { error_set(errp, QERR_INVALID_PARAMETER, "speed"); return; } ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE); } | 13,055 |
0 | static Rom *find_rom(target_phys_addr_t addr) { Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (rom->addr > addr) { continue; } if (rom->addr + rom->romsize < addr) { continue; } return rom; } return NULL; } | 13,056 |
0 | iscsi_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque) { IscsiLun *iscsilun = bs->opaque; struct iscsi_context *iscsi = iscsilun->iscsi; IscsiAIOCB *acb; size_t qemu_read_size; #if !defined(LIBISCSI_FEATURE_IOVECTOR) int i; #endif int r... | 13,057 |
0 | static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr, int count, int copy) { struct target_iovec *target_vec; abi_ulong base; int i; target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1); if (!target_vec) return -TARGET_EFAULT; for(i = 0;i < count; i++) { base... | 13,058 |
0 | S390PCIBusDevice *s390_pci_find_next_avail_dev(S390PCIBusDevice *pbdev) { int idx = 0; S390PCIBusDevice *dev = NULL; S390pciState *s = s390_get_phb(); if (pbdev) { idx = (pbdev->fh & FH_MASK_INDEX) + 1; } for (; idx < PCI_SLOT_MAX; idx++) { dev = s->pbdev[idx]; if (dev && dev->state != ZPCI_FS_RESERVED) { return dev; }... | 13,059 |
0 | static void fw_cfg_ctl_mem_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { fw_cfg_select(opaque, (uint16_t)value); } | 13,061 |
0 | static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { int64_t total_sectors; int64_t n; int64_t ret, ret2; *file = NULL; total_sectors = bdrv_nb_sectors(bs); if (total_sectors < 0) { return total_sectors; } if (sector_num >= ... | 13,062 |
0 | static int dmg_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BDRVDMGState *s = bs->opaque; int i; for(i=0;i<nb_sectors;i++) { uint32_t sector_offset_in_chunk; if(dmg_read_chunk(bs, sector_num+i) != 0) return -1; sector_offset_in_chunk = sector_num+i-s->sectors[s->current_chunk]; memcpy(... | 13,063 |
0 | static int nbd_can_read(void *opaque) { NBDClient *client = opaque; return client->recv_coroutine || client->nb_requests < MAX_NBD_REQUESTS; } | 13,064 |
0 | int avpriv_dca_parse_core_frame_header(DCACoreFrameHeader *h, const uint8_t *buf, int size) { GetBitContext gb; if (init_get_bits8(&gb, buf, size) < 0) return DCA_PARSE_ERROR_INVALIDDATA; return ff_dca_parse_core_frame_header(h, &gb); } | 13,065 |
0 | static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, MachineState *machine) { const char *cpu_model = machine->cpu_model; unsigned int i; void *iommu, *espdma, *ledma, *nvram; qemu_irq *cpu_irqs[MAX_CPUS], slavio_irq[32], slavio_cpu_irq[MAX_CPUS], espdma_irq, ledma_irq; qemu_irq esp_reset, dma_enable; qemu_irq fd... | 13,066 |
0 | static inline int qemu_rdma_buffer_mergable(RDMAContext *rdma, uint64_t offset, uint64_t len) { RDMALocalBlock *block = &(rdma->local_ram_blocks.block[rdma->current_index]); uint8_t *host_addr = block->local_host_addr + (offset - block->offset); uint8_t *chunk_end = ram_chunk_end(block, rdma->current_chunk); if (rdma->... | 13,067 |
1 | static int ogg_new_buf(struct ogg *ogg, int idx) { struct ogg_stream *os = ogg->streams + idx; uint8_t *nb = av_malloc(os->bufsize); int size = os->bufpos - os->pstart; if(os->buf){ memcpy(nb, os->buf + os->pstart, size); av_free(os->buf); } os->buf = nb; os->bufpos = size; os->pstart = 0; return 0; } | 13,069 |
1 | void s390_memory_init(ram_addr_t mem_size) { MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); /* allocate RAM for core */ memory_region_init_ram(ram, NULL, "s390.ram", mem_size, &error_abort); vmstate_register_ram_global(ram); memory_region_add_subregion(sysmem, 0, ram); /* Initia... | 13,070 |
1 | static void tracked_request_begin(BdrvTrackedRequest *req, BlockDriverState *bs, int64_t sector_num, int nb_sectors, bool is_write) *req = (BdrvTrackedRequest){ .bs = bs, .sector_num = sector_num, .nb_sectors = nb_sectors, .is_write = is_write, }; QLIST_INSERT_HEAD(&bs->tracked_requests, req, list); | 13,071 |
1 | static inline int decode_seq_parameter_set(H264Context *h){ MpegEncContext * const s = &h->s; int profile_idc, level_idc; int sps_id, i; SPS *sps; profile_idc= get_bits(&s->gb, 8); get_bits1(&s->gb); //constraint_set0_flag get_bits1(&s->gb); //constraint_set1_flag get_bits1(&s->gb); //constraint_set2_flag get_bits1(&s-... | 13,072 |
1 | static int usb_ehci_initfn(PCIDevice *dev) { EHCIState *s = DO_UPCAST(EHCIState, dev, dev); uint8_t *pci_conf = s->dev.config; int i; pci_set_byte(&pci_conf[PCI_CLASS_PROG], 0x20); /* capabilities pointer */ pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x00); //pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x50); pci_se... | 13,073 |
1 | static int vnc_refresh_server_surface(VncDisplay *vd) { int width = MIN(pixman_image_get_width(vd->guest.fb), pixman_image_get_width(vd->server)); int height = MIN(pixman_image_get_height(vd->guest.fb), pixman_image_get_height(vd->server)); int cmp_bytes, server_stride, min_stride, guest_stride, y = 0; uint8_t *guest_r... | 13,074 |
1 | static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const AVPixFmtDescriptor *desc; SMVJpegDecodeContext *s = avctx->priv_data; AVFrame* mjpeg_data = s->picture[0]; int i, cur_frame = 0, ret = 0; cur_frame = avpkt->pts % s->frames_per_jpeg; /* Are we at the start of a b... | 13,075 |
1 | static inline uint16_t vring_avail_ring(VirtQueue *vq, int i) { VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches); hwaddr pa = offsetof(VRingAvail, ring[i]); return virtio_lduw_phys_cached(vq->vdev, &caches->avail, pa); } | 13,076 |
1 | static int open_f(BlockDriverState *bs, int argc, char **argv) { int flags = 0; int readonly = 0; int growable = 0; int c; QemuOpts *qopts; QDict *opts; while ((c = getopt(argc, argv, "snrgo:")) != EOF) { switch (c) { case 's': flags |= BDRV_O_SNAPSHOT; break; case 'n': flags |= BDRV_O_NOCACHE | BDRV_O_CACHE_WB; break;... | 13,078 |
0 | av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale) { int n, n4, i; double alpha, theta; int tstep; memset(s, 0, sizeof(*s)); n = 1 << nbits; s->mdct_bits = nbits; s->mdct_size = n; n4 = n >> 2; s->permutation = FF_MDCT_PERM_NONE; if (ff_fft_init(s, s->mdct_bits - 2, inverse) < 0) goto fail; s... | 13,079 |
0 | int ff_slice_thread_init(AVCodecContext *avctx) { int i; ThreadContext *c; int thread_count = avctx->thread_count; #if HAVE_W32THREADS w32thread_init(); #endif if (!thread_count) { int nb_cpus = av_cpu_count(); av_log(avctx, AV_LOG_DEBUG, "detected %d logical cores\n", nb_cpus); // use number of cores + 1 as thread cou... | 13,080 |
0 | void ff_avg_h264_qpel4_mc22_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_mid_and_aver_dst_4x4_msa(src - (2 * stride) - 2, stride, dst, stride); } | 13,082 |
0 | int qsv_transcode_init(OutputStream *ost) { InputStream *ist; const enum AVPixelFormat *pix_fmt; AVDictionaryEntry *e; const AVOption *opt; int flags = 0; int err, i; QSVContext *qsv = NULL; AVQSVContext *hwctx = NULL; mfxIMPL impl; mfxVersion ver = { { 3, 1 } }; /* check if the encoder supports QSV */ if (!ost->enc->p... | 13,084 |
0 | static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) { MOVMuxContext *mov = s->priv_data; int64_t pos = avio_tell(pb); int has_h264 = 0, has_video = 0; int minor = 0x200; int i; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) has_video =... | 13,085 |
1 | static av_cold int bktr_init(const char *video_device, int width, int height, int format, int *video_fd, int *tuner_fd, int idev, double frequency) { struct meteor_geomet geo; int h_max; long ioctl_frequency; char *arg; int c; struct sigaction act = { 0 }, old; if (idev < 0 || idev > 4) { arg = getenv ("BKTR_DEV"); if ... | 13,086 |
1 | static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, void *dst_l, void *dst_r, const int type) { int i, j, count = 0; int last, t; int A, B, L, L2, R, R2; int pos = s->pos; uint32_t crc = s->sc.crc; uint32_t crc_extra_bits = s->extra_sc.crc; int16_t *dst16_l = dst_l; int16_t *dst16_r = dst_r; i... | 13,087 |
1 | static ExitStatus trans_fop_wed_0c(DisasContext *ctx, uint32_t insn, const DisasInsn *di) { unsigned rt = extract32(insn, 0, 5); unsigned ra = extract32(insn, 21, 5); return do_fop_wed(ctx, rt, ra, di->f_wed); } | 13,088 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.