label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti){uint16_t mss;int opt, optlen;DEBUG_CALL("tcp_dooptions");DEBUG_ARGS((dfd," tp = %lx cnt=%i \n", (long )tp, cnt));for (; cnt > 0; cnt -= optlen, cp += optlen) {opt = cp[0];if (opt == TCPOPT_EOL)break;if (opt == TCPOPT_NOP)optlen = 1;else {optlen =... |
0 | static void test_qemu_strtoull_hex(void){ const char *str = "0123"; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 16, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 0x123); g_assert(endptr == str + strlen(str)); str = "0x123"; endptr = &f; res = 999;... |
0 | static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width){#ifdef HAVE_MMXFIXME#elseint i;for(i=0; i<width; i++){dstU[i]= (src1[4*i + 1] + src2[4*i + 1])>>1;dstV[i]= (src1[4*i + 3] + src2[4*i + 3])>>1;}#endif} |
0 | static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size){ const uint16_t *end;#if COMPILE_TEMPLATE_MMX const uint16_t *mm_end;#endif uint8_t *d = dst; const uint16_t *s = (const uint16_t *)src; end = s + src_size/2;#if COMPILE_TEMPLATE_MMX __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory"); ... |
0 | static int qcow_create(const char *filename, QEMUOptionParameter *options){ const char *backing_file = NULL; const char *backing_fmt = NULL; uint64_t sectors = 0; int flags = 0; size_t cluster_size = 65536; int prealloc = 0; /* Read out options */ while (options && options->name) { if (!strcmp(options->name, BLOCK_OPT_... |
0 | void do_interrupt(CPUState *env){int ex_vec = -1;D(fprintf (stderr, "exception index=%d interrupt_req=%d\n", env->exception_index, env->interrupt_request));switch (env->exception_index){case EXCP_BREAK:/* These exceptions are genereated by the core itself. ERP should point to the insn following the brk. */ex_vec = env-... |
0 | void *qemu_blockalign0(BlockDriverState *bs, size_t size){ return memset(qemu_blockalign(bs, size), 0, size);} |
0 | static void t_gen_asr(TCGv d, TCGv a, TCGv b){TCGv t0, t_31;t0 = tcg_temp_new(TCG_TYPE_TL);t_31 = tcg_temp_new(TCG_TYPE_TL);tcg_gen_sar_tl(d, a, b);tcg_gen_movi_tl(t_31, 31);tcg_gen_sub_tl(t0, t_31, b);tcg_gen_sar_tl(t0, t0, t_31);tcg_gen_or_tl(d, d, t0);tcg_temp_free(t0);tcg_temp_free(t_31);} |
0 | static inline uint64_t do_fri(uint64_t arg, int rounding_mode){ CPU_DoubleU farg; farg.ll = arg; if (unlikely(float64_is_signaling_nan(farg.d))) { /* sNaN round */ farg.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN | POWERPC_EXCP_FP_VXCVI); } else if (unlikely(float64_is_nan(farg.d) || float64_is_infinity(farg.d)))... |
0 | static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base){ PCIDevice *pci_dev = (PCIDevice *)qdev; PCIDeviceInfo *info = container_of(base, PCIDeviceInfo, qdev); PCIBus *bus; int devfn, rc; /* initialize cap_present for pci_is_express() and pci_config_size() */ if (info->is_express) { pci_dev->cap_present |= QEMU_P... |
0 | static inline void bit_copy(PutBitContext *pb, GetBitContext *gb){ int bits_left = get_bits_left(gb); while (bits_left >= 16) { put_bits(pb, 16, get_bits(gb, 16)); bits_left -= 16; } if (bits_left > 0) { put_bits(pb, bits_left, get_bits(gb, bits_left)); }} |
0 | static int coroutine_fn v9fs_mark_fids_unreclaim(V9fsPDU *pdu, V9fsPath *path){ int err; V9fsState *s = pdu->s; V9fsFidState *fidp, head_fid; head_fid.next = s->fid_list; for (fidp = s->fid_list; fidp; fidp = fidp->next) { if (fidp->path.size != path->size) { continue; } if (!memcmp(fidp->path.data, path->data, path->s... |
0 | float64 helper_fabs_DT(float64 t0){ return float64_abs(t0);} |
0 | static long gethugepagesize(const char *path, Error **errp){ struct statfs fs; int ret; do { ret = statfs(path, &fs); } while (ret != 0 && errno == EINTR); if (ret != 0) { error_setg_errno(errp, errno, "failed to get page size of file %s", path); return 0; } if (!qtest_driver() && fs.f_type != HUGETLBFS_MAGIC) { fprint... |
0 | static void gen_sllq(DisasContext *ctx){ int l1 = gen_new_label(); int l2 = gen_new_label(); TCGv t0 = tcg_temp_local_new(); TCGv t1 = tcg_temp_local_new(); TCGv t2 = tcg_temp_local_new(); tcg_gen_andi_tl(t2, cpu_gpr[rB(ctx->opcode)], 0x1F); tcg_gen_movi_tl(t1, 0xFFFFFFFF); tcg_gen_shl_tl(t1, t1, t2); tcg_gen_andi_tl(t... |
0 | static void raw_eject(BlockDriverState *bs, bool eject_flag){ bdrv_eject(bs->file->bs, eject_flag);} |
0 | int acpi_add_cpu_info(Object *o, void *opaque){ AcpiCpuInfo *cpu = opaque; uint64_t apic_id; if (object_dynamic_cast(o, TYPE_CPU)) { apic_id = object_property_get_int(o, "apic-id", NULL); assert(apic_id <= MAX_CPUMASK_BITS); set_bit(apic_id, cpu->found_cpus); } object_child_foreach(o, acpi_add_cpu_info, opaque); return... |
0 | int ff_listen_bind(int fd, const struct sockaddr *addr, socklen_t addrlen, int timeout, URLContext *h){ int ret; int reuse = 1; struct pollfd lp = { fd, POLLIN, 0 }; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse))) { av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_REUSEADDR) failed\n"); } ret = bind(fd,... |
0 | static uint64_t vtd_get_iotlb_key(uint64_t gfn, uint8_t source_id, uint32_t level){ return gfn | ((uint64_t)(source_id) << VTD_IOTLB_SID_SHIFT) | ((uint64_t)(level) << VTD_IOTLB_LVL_SHIFT);} |
0 | static int chr_can_read(void *opaque){ SCLPConsole *scon = opaque; return SIZE_BUFFER_VT220 - scon->iov_data_len;} |
0 | static void virtio_scsi_do_tmf(VirtIOSCSI *s, VirtIOSCSIReq *req){ SCSIDevice *d = virtio_scsi_device_find(s, req->req.tmf->lun); SCSIRequest *r, *next; BusChild *kid; int target; /* Here VIRTIO_SCSI_S_OK means "FUNCTION COMPLETE". */ req->resp.tmf->response = VIRTIO_SCSI_S_OK; tswap32s(&req->req.tmf->subtype); switch ... |
0 | int iommu_dma_memory_set(DMAContext *dma, dma_addr_t addr, uint8_t c, dma_addr_t len){ target_phys_addr_t paddr, plen; int err;#ifdef DEBUG_IOMMU fprintf(stderr, "dma_memory_set context=%p addr=0x" DMA_ADDR_FMT " len=0x" DMA_ADDR_FMT "\n", dma, addr, len);#endif while (len) { err = dma->translate(dma, addr, &paddr, &pl... |
0 | static void ppc6xx_set_irq (void *opaque, int pin, int level){ CPUState *env = opaque; int cur_level;#if defined(PPC_DEBUG_IRQ) if (loglevel & CPU_LOG_INT) { fprintf(logfile, "%s: env %p pin %d level %d\n", __func__, env, pin, level); }#endif cur_level = (env->irq_input_state >> pin) & 1; /* Don't generate spurious eve... |
1 | static void sdp_service_record_build(struct sdp_service_record_s *record, struct sdp_def_service_s *def, int handle){ int len = 0; uint8_t *data; int *uuid; record->uuids = 0; while (def->attributes[record->attributes].data.type) { len += 3; len += sdp_attr_max_size(&def->attributes[record->attributes ++].data, &record... |
1 | static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){ int x, y, plane; int score = 0; int64_t score64 = 0; for (plane = 0; plane < 3; plane++) { const int stride = p->f.linesize[plane]; const int bw = plane ? 1 : 2; for (y = 0; y < s->mb_height * bw; y++) { for (x = 0; x < s->mb_width * bw; x++) { int off... |
1 | int ff_slice_thread_init(AVCodecContext *avctx){ int i; SliceThreadContext *c; int thread_count = avctx->thread_count;#if HAVE_W32THREADS w32thread_init();#endif // We cannot do this in the encoder init as the threads are created before if (av_codec_is_encoder(avctx->codec) && avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO ... |
0 | int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate){ MPADecodeContext s1, *s = &s1; s1.avctx = avctx; if (ff_mpa_check_header(head) != 0) return -1; if (ff_mpegaudio_decode_header(s, head) != 0) { return -1; } switch(s->layer) { case 1: avctx->frame_size = 384; break; case 2: avctx->frame_s... |
0 | int ff_vaapi_decode_init(AVCodecContext *avctx){ VAAPIDecodeContext *ctx = avctx->internal->hwaccel_priv_data; VAStatus vas; int err; ctx->va_config = VA_INVALID_ID; ctx->va_context = VA_INVALID_ID;#if FF_API_VAAPI_CONTEXT if (avctx->hwaccel_context) { av_log(avctx, AV_LOG_WARNING, "Using deprecated struct " "vaapi_con... |
1 | void helper_set_alarm(CPUAlphaState *env, uint64_t expire){ if (expire) { env->alarm_expire = expire; qemu_mod_timer(env->alarm_timer, expire); } else { qemu_del_timer(env->alarm_timer); }} |
1 | static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbuf){ FrameBuffer *buf = av_mallocz(sizeof(*buf)); int i, ret; const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1; int h_chroma_shift, v_chroma_shift; int edge = 32; // XXX should be avcodec_get_edge_width(), but ... |
1 | static int mxf_set_audio_pts(MXFContext *mxf, AVCodecContext *codec, AVPacket *pkt){ MXFTrack *track = mxf->fc->streams[pkt->stream_index]->priv_data; pkt->pts = track->sample_count; if (codec->channels <= 0 || av_get_bits_per_sample(codec->codec_id) <= 0) return AVERROR(EINVAL); track->sample_count += pkt->size / (cod... |
1 | uint32_t HELPER(sar_cc)(CPUM68KState *env, uint32_t val, uint32_t shift){ uint64_t temp; uint32_t result; shift &= 63; temp = (int64_t)val << 32 >> shift; result = temp >> 32; env->cc_c = (temp >> 31) & 1; env->cc_n = result; env->cc_z = result; env->cc_v = result ^ val; env->cc_x = shift ? env->cc_c : env->cc_x; retur... |
1 | static void build_basic_mjpeg_vlc(MJpegDecodeContext *s){ build_vlc(&s->vlcs[0][0], avpriv_mjpeg_bits_dc_luminance, avpriv_mjpeg_val_dc, 12, 0, 0); build_vlc(&s->vlcs[0][1], avpriv_mjpeg_bits_dc_chrominance, avpriv_mjpeg_val_dc, 12, 0, 0); build_vlc(&s->vlcs[1][0], avpriv_mjpeg_bits_ac_luminance, avpriv_mjpeg_val_ac_lu... |
1 | static void fsl_imx31_class_init(ObjectClass *oc, void *data){ DeviceClass *dc = DEVICE_CLASS(oc); dc->realize = fsl_imx31_realize; dc->desc = "i.MX31 SOC";} |
1 | static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int size){ DiracContext *s = avctx->priv_data; DiracFrame *pic = NULL; AVDiracSeqHeader *dsh; int ret, i; uint8_t parse_code; unsigned tmp; if (size < DATA_UNIT_HEADER_SIZE) return AVERROR_INVALIDDATA; parse_code = buf[4]; init_get_bits(&s->gb... |
1 | static void filter0(int32_t *dst, const int32_t *src, int32_t coeff, ptrdiff_t len){ int i; for (i = 0; i < len; i++) dst[i] -= mul22(src[i], coeff);} |
0 | static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr){ int i, k, channel; DCAContext *c = avctx->priv_data; const int16_t *samples; int ret, real_channel = 0; if ((ret = ff_alloc_packet2(avctx, avpkt, DCA_MAX_FRAME_SIZE + DCA_HEADER_SIZE))) return ret; samples = (con... |
1 | static inline void RENAME(yuv2nv12X)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, int dstFormat){yuv2nv12XinC(lumFilter, lumSrc, lumFilterSize, chrFilter, chrSrc, chrFilterSize, dest... |
1 | static void thread_pool_completion_bh(void *opaque){ ThreadPool *pool = opaque; ThreadPoolElement *elem, *next; aio_context_acquire(pool->ctx);restart: QLIST_FOREACH_SAFE(elem, &pool->head, all, next) { if (elem->state != THREAD_DONE) { continue; } trace_thread_pool_complete(pool, elem, elem->common.opaque, elem->ret);... |
1 | static int yop_read_packet(AVFormatContext *s, AVPacket *pkt){ YopDecContext *yop = s->priv_data; AVIOContext *pb = s->pb; int ret; int actual_video_data_size = yop->frame_size - yop->audio_block_length - yop->palette_size; yop->video_packet.stream_index = 1; if (yop->video_packet.data) { *pkt = yop->video_packet; yop-... |
1 | static int upload_texture(SDL_Texture *tex, AVFrame *frame, struct SwsContext **img_convert_ctx) { int ret = 0; switch (frame->format) { case AV_PIX_FMT_YUV420P: ret = SDL_UpdateYUVTexture(tex, NULL, frame->data[0], frame->linesize[0], frame->data[1], frame->linesize[1], frame->data[2], frame->linesize[2]); break; case... |
1 | static int vorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr){ vorbis_enc_context *venc = avctx->priv_data; int i, ret, need_more; int frame_size = 1 << (venc->log2_blocksize[1] - 1); vorbis_enc_mode *mode; vorbis_enc_mapping *mapping; PutBitContext pb; if (frame) { i... |
1 | void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref){ void (*start_frame)(AVFilterLink *, AVFilterBufferRef *); AVFilterPad *dst = &link_dpad(link); FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1); if (!(start_frame = dst->star... |
1 | static void ivshmem_check_memdev_is_busy(Object *obj, const char *name, Object *val, Error **errp){ if (host_memory_backend_is_mapped(MEMORY_BACKEND(val))) { char *path = object_get_canonical_path_component(val); error_setg(errp, "can't use already busy memdev: %s", path); g_free(path); } else { qdev_prop_allow_set_lin... |
1 | static int vorbis_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; vorbis_context *vc = avctx->priv_data; AVFrame *frame = data; GetBitContext *gb = &vc->gb; float *channel_ptrs[255]; int i, len, ret; av_dlog(NULL, "packe... |
1 | static int qemu_balloon_status(MonitorCompletion cb, void *opaque){ if (!balloon_event_fn) { return 0; } balloon_event_fn(balloon_opaque, 0, cb, opaque); return 1;} |
1 | static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size){ int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; /* read the pixels */ for(i=0;i<4;i++) { pixels[0] = cm[block[0]]; pixels[1] = cm[block[1]]; pixels[2] = cm[block[2]]; pixels[3] = cm[block[3]]; pixels += line_size; block +=... |
0 | static void check_pred4x4(H264PredContext *h, uint8_t *buf0, uint8_t *buf1, int codec, int chroma_format, int bit_depth){ if (chroma_format == 1) { uint8_t *topright = buf0 + 2*16; int pred_mode; for (pred_mode = 0; pred_mode < 15; pred_mode++) { if (check_pred_func(h->pred4x4[pred_mode], "4x4", pred4x4_modes[codec][pr... |
0 | int ff_mov_iso639_to_lang(const char *lang, int mp4){ int i, code = 0; /* old way, only for QT? */ for (i = 0; !mp4 && i < FF_ARRAY_ELEMS(mov_mdhd_language_map); i++) { if (mov_mdhd_language_map[i] && !strcmp(lang, mov_mdhd_language_map[i])) return i; } /* XXX:can we do that in mov too? */ if (!mp4) return 0; /* handle... |
0 | static int dxva2_vp9_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size){ const VP9SharedContext *h = avctx->priv_data; AVDXVAContext *ctx = avctx->hwaccel_context; struct vp9_dxva2_picture_context *ctx_pic = h->frames[CUR_FRAME].hwaccel_picture_private; if (DXVA_CONTEXT_DECODER... |
1 | static void test_nop(gconstpointer data){ QTestState *s; const char *machine = data; char *args; args = g_strdup_printf("-display none -machine %s", machine); s = qtest_start(args); if (s) { qtest_quit(s); } g_free(args);} |
1 | static int ass_get_duration(const uint8_t *p){ int sh, sm, ss, sc, eh, em, es, ec; uint64_t start, end; if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d", &sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8) return 0; start = 3600000*sh + 60000*sm + 1000*ss + 10*sc; end = 3600000*eh + 60000*em + 1000*es + 10*ec; return end -... |
1 | static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, GetBitContext *gb, SBRData *ch_data){ int i; ch_data->bs_freq_res[0] = ch_data->bs_freq_res[ch_data->bs_num_env[1]]; ch_data->bs_num_env[0] = ch_data->bs_num_env[1]; ch_data->bs_amp_res = sbr->bs_amp_res_header; switch (ch_data->bs_frame_class = get... |
1 | static int modified_clear_reset(S390CPU *cpu){ S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); pause_all_vcpus(); cpu_synchronize_all_states(); cpu_full_reset_all(); io_subsystem_reset(); scc->load_normal(CPU(cpu)); cpu_synchronize_all_post_reset(); resume_all_vcpus(); return 0;} |
0 | static av_cold int png_enc_init(AVCodecContext *avctx){ PNGEncContext *s = avctx->priv_data;#if FF_API_CODED_FRAMEFF_DISABLE_DEPRECATION_WARNINGS avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1;FF_ENABLE_DEPRECATION_WARNINGS#endif ff_huffyuvencdsp_init(&s->hdsp); s->filter_type = av... |
1 | static void test_smbios_ep_table(test_data *data){ struct smbios_entry_point *ep_table = &data->smbios_ep_table; uint32_t addr = data->smbios_ep_addr; ACPI_READ_ARRAY(ep_table->anchor_string, addr); g_assert(!memcmp(ep_table->anchor_string, "_SM_", 4)); ACPI_READ_FIELD(ep_table->checksum, addr); ACPI_READ_FIELD(ep_tabl... |
1 | static inline int svq3_mc_dir(SVQ3Context *s, int size, int mode, int dir, int avg){ int i, j, k, mx, my, dx, dy, x, y; const int part_width = ((size & 5) == 4) ? 4 : 16 >> (size & 1); const int part_height = 16 >> ((unsigned)(size + 1) / 3); const int extra_width = (mode == PREDICT_MODE) ? -16 * 6 : 0; const int h_edg... |
0 | static void pxa2xx_update_display(void *opaque){ struct pxa2xx_lcdc_s *s = (struct pxa2xx_lcdc_s *) opaque; target_phys_addr_t fbptr; int miny, maxy; int ch; if (!(s->control[0] & LCCR0_ENB)) return; pxa2xx_descriptor_load(s); pxa2xx_lcdc_resize(s); miny = s->yres; maxy = 0; s->transp = s->dma_ch[2].up || s->dma_ch[3].... |
0 | char *object_property_print(Object *obj, const char *name, bool human, Error **errp){ StringOutputVisitor *sov; char *string = NULL; Error *local_err = NULL; sov = string_output_visitor_new(human); object_property_get(obj, string_output_get_visitor(sov), name, &local_err); if (local_err) { error_propagate(errp, local_e... |
0 | static int send_sub_rect_solid(VncState *vs, int x, int y, int w, int h){ vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_TIGHT); vnc_tight_start(vs); vnc_raw_send_framebuffer_update(vs, x, y, w, h); vnc_tight_stop(vs); return send_solid_rect(vs);} |
0 | static void qdict_array_split_test(void){ QDict *test_dict = qdict_new(); QDict *dict1, *dict2; QList *test_list; /* * Test the split of * * { * "1.x": 0, * "3.y": 1, * "0.a": 42, * "o.o": 7, * "0.b": 23 * } * * to * * [ * { * "a": 42, * "b": 23 * }, * { * "x": 0 * } * ] * * and * * { * "3.y": 1, * "o.o": 7 * } * * (re... |
0 | static target_ulong disas_insn(CPUX86State *env, DisasContext *s, target_ulong pc_start){ int b, prefixes, aflag, dflag; int shift, ot; int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val; target_ulong next_eip, tval; int rex_w, rex_r; if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) { tc... |
0 | int qemu_timedate_diff(struct tm *tm){ time_t seconds; if (rtc_date_offset == -1) if (rtc_utc) seconds = mktimegm(tm); else { struct tm tmp = *tm; tmp.tm_isdst = -1; /* use timezone to figure it out */ seconds = mktime(&tmp);} else seconds = mktimegm(tm) + rtc_date_offset; return seconds - time(NULL);} |
0 | VTDAddressSpace *vtd_find_add_as(IntelIOMMUState *s, PCIBus *bus, int devfn){ uintptr_t key = (uintptr_t)bus; VTDBus *vtd_bus = g_hash_table_lookup(s->vtd_as_by_busptr, &key); VTDAddressSpace *vtd_dev_as; char name[128]; if (!vtd_bus) { uintptr_t *new_key = g_malloc(sizeof(*new_key)); *new_key = (uintptr_t)bus; /* No c... |
0 | void qemu_announce_self(void){static QEMUTimer *timer;timer = qemu_new_timer(rt_clock, qemu_announce_self_once, &timer);qemu_announce_self_once(&timer);} |
0 | static int mpegts_probe(AVProbeData *p){ const int size = p->buf_size; int maxscore = 0; int sumscore = 0; int i; int check_count = size / TS_FEC_PACKET_SIZE;#define CHECK_COUNT 10#define CHECK_BLOCK 100 if (check_count < CHECK_COUNT) return 0; for (i = 0; i<check_count; i+=CHECK_BLOCK) { int left = FFMIN(check_count -... |
0 | static void do_commit(int argc, const char **argv){ int i; for (i = 0; i < MAX_DISKS; i++) { if (bs_table[i]) bdrv_commit(bs_table[i]); }} |
0 | static int ppc_hash32_pp_check(int key, int pp, int nx){ int access; /* Compute access rights */ access = 0; if (key == 0) { switch (pp) { case 0x0: case 0x1: case 0x2: access |= PAGE_WRITE; /* No break here */ case 0x3: access |= PAGE_READ; break; } } else { switch (pp) { case 0x0: access = 0; break; case 0x1: case 0x... |
0 | static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr, uint64_t val, unsigned size, bool hw_access){ TPMState *s = opaque; TPMTISEmuState *tis = &s->s.tis; uint16_t off = addr & 0xffc; uint8_t shift = (addr & 0x3) * 8; uint8_t locty = tpm_tis_locality_from_addr(addr); uint8_t active_locty, l; int c, set_new_l... |
0 | int smbios_entry_add(const char *t){ char buf[1024]; if (get_param_value(buf, sizeof(buf), "file", t)) { struct smbios_structure_header *header; struct smbios_table *table; int size = get_image_size(buf); if (size < sizeof(struct smbios_structure_header)) { fprintf(stderr, "Cannot read smbios file %s", buf); exit(1); }... |
0 | void do_mouse_set(Monitor *mon, const QDict *qdict){ QemuInputHandlerState *s; int index = qdict_get_int(qdict, "index"); int found = 0; QTAILQ_FOREACH(s, &handlers, node) { if (s->id == index) { found = 1; qemu_input_handler_activate(s); break; } } if (!found) { monitor_printf(mon, "Mouse at given index not found\n");... |
0 | static bool msix_is_masked(PCIDevice *dev, int vector){ return msix_vector_masked(dev, vector, dev->msix_function_masked);} |
0 | static int acpi_checksum(const uint8_t *data, int len){ int sum, i; sum = 0; for(i = 0; i < len; i++) sum += data[i]; return (-sum) & 0xff;} |
0 | static inline void load_seg_cache_raw_dt(SegmentCache *sc, uint32_t e1, uint32_t e2){ sc->base = get_seg_base(e1, e2); sc->limit = get_seg_limit(e1, e2); sc->flags = e2;} |
0 | static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded, int intra, int rvlc){ int level, i, last, run; int dc_pred_dir; RLTable * rl; RL_VLC_ELEM * rl_vlc; const uint8_t * scan_table; int qmul, qadd; //Note intra & rvlc should be optimized away if this is inlined if(intra) { if(s->qs... |
0 | static int ea_probe(AVProbeData *p){ if (p->buf_size < 4) return 0; if (AV_RL32(&p->buf[0]) != SCHl_TAG) return 0; return AVPROBE_SCORE_MAX;} |
0 | static int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n){ int64_t delay_ns = 0; int64_t now = qemu_get_clock_ns(rt_clock); if (limit->next_slice_time < now) { limit->next_slice_time = now + SLICE_TIME; limit->dispatched = 0; } if (limit->dispatched + n > limit->slice_quota) { delay_ns = limit->next_slice_... |
0 | static uint32_t iommu_mem_readw(void *opaque, target_phys_addr_t addr){ IOMMUState *s = opaque; target_phys_addr_t saddr; uint32_t ret; saddr = (addr - s->addr) >> 2; switch (saddr) { default: ret = s->regs[saddr]; break; case IOMMU_AFAR: case IOMMU_AFSR: ret = s->regs[saddr]; qemu_irq_lower(s->irq); break; } DPRINTF("... |
0 | static void create_cpu_model_list(ObjectClass *klass, void *opaque){ struct CpuDefinitionInfoListData *cpu_list_data = opaque; CpuDefinitionInfoList **cpu_list = &cpu_list_data->list; CpuDefinitionInfoList *entry; CpuDefinitionInfo *info; char *name = g_strdup(object_class_get_name(klass)); S390CPUClass *scc = S390_CPU... |
0 | static int kvm_mips_put_fpu_registers(CPUState *cs, int level){ MIPSCPU *cpu = MIPS_CPU(cs); CPUMIPSState *env = &cpu->env; int err, ret = 0; unsigned int i; /* Only put FPU state if we're emulating a CPU with an FPU */ if (env->CP0_Config1 & (1 << CP0C1_FP)) { /* FPU Control Registers */ if (level == KVM_PUT_FULL_STAT... |
0 | void qemu_free(void *ptr){ free(ptr);} |
0 | static void v9fs_mknod(void *opaque){ int mode; gid_t gid; int32_t fid; V9fsQID qid; int err = 0; int major, minor; size_t offset = 7; V9fsString name; struct stat stbuf; V9fsString fullname; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; v9fs_string_init(&fullname); pdu_unmarshal(pdu, offset, "dsddd... |
0 | static void intel_hda_set_st_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint32_t old){ bool output = reg->stream >= 4; IntelHDAStream *st = d->st + reg->stream; if (st->ctl & 0x01) { /* reset */ dprint(d, 1, "st #%d: reset\n", reg->stream); st->ctl = 0; } if ((st->ctl & 0x02) != (old & 0x02)) { uint32_t stnr = (st->... |
0 | static void vnc_listen_read(void *opaque){ VncDisplay *vs = opaque; struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); /* Catch-up */ vga_hw_update(); int csock = qemu_accept(vs->lsock, (struct sockaddr *)&addr, &addrlen); if (csock != -1) { vnc_connect(vs, csock); }} |
0 | static inline void int8x8_fmul_int32(DCADSPContext *dsp, float *dst, const int8_t *src, int scale){ dsp->int8x8_fmul_int32(dst, src, scale);} |
0 | static hwaddr get_offset(hwaddr phys_addr, DumpState *s){ RAMBlock *block; hwaddr offset = s->memory_offset; int64_t size_in_block, start; if (s->has_filter) { if (phys_addr < s->begin || phys_addr >= s->begin + s->length) { return -1; } } QTAILQ_FOREACH(block, &ram_list.blocks, next) { if (s->has_filter) { if (block->... |
0 | void net_cleanup(void){ VLANState *vlan;#if !defined(_WIN32) /* close network clients */ for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) { VLANClientState *vc; for(vc = vlan->first_client; vc != NULL; vc = vc->next) { if (vc->fd_read == tap_receive) { char ifname[64]; TAPState *s = vc->opaque; if (strcmp(vc->mo... |
0 | static int64_t coroutine_fn qcow_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum){ BDRVQcowState *s = bs->opaque; int index_in_cluster, n; uint64_t cluster_offset; qemu_co_mutex_lock(&s->lock); cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0); qemu_co_mutex_un... |
0 | static int v9fs_synth_rename(FsContext *ctx, const char *oldpath, const char *newpath){ errno = EPERM; return -1;} |
0 | static void gen_spr_604 (CPUPPCState *env){ /* Processor identification */ spr_register(env, SPR_PIR, "PIR", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_pir, 0x00000000); /* Breakpoints */ /* XXX : not implemented */ spr_register(env, SPR_IABR, "IABR", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_w... |
0 | void helper_sysret(int dflag){ int cpl, selector; if (!(env->efer & MSR_EFER_SCE)) { raise_exception_err(EXCP06_ILLOP, 0); } cpl = env->hflags & HF_CPL_MASK; if (!(env->cr[0] & CR0_PE_MASK) || cpl != 0) { raise_exception_err(EXCP0D_GPF, 0); } selector = (env->star >> 48) & 0xffff; if (env->hflags & HF_LMA_MASK) { if (d... |
0 | static int parallels_probe(const uint8_t *buf, int buf_size, const char *filename){ const ParallelsHeader *ph = (const void *)buf; if (buf_size < sizeof(ParallelsHeader)) return 0; if ((!memcmp(ph->magic, HEADER_MAGIC, 16) || !memcmp(ph->magic, HEADER_MAGIC2, 16)) && (le32_to_cpu(ph->version) == HEADER_VERSION)) return... |
0 | static int decode_coeffs(WMAProDecodeCtx *s, int c){ /* Integers 0..15 as single-precision floats. The table saves a costly int to float conversion, and storing the values as integers allows fast sign-flipping. */ static const int fval_tab[16] = { 0x00000000, 0x3f800000, 0x40000000, 0x40400000, 0x40800000, 0x40a00000, ... |
0 | static void qemu_chr_parse_ringbuf(QemuOpts *opts, ChardevBackend *backend, Error **errp){ int val; ChardevRingbuf *ringbuf; ringbuf = backend->u.ringbuf = g_new0(ChardevRingbuf, 1); qemu_chr_parse_common(opts, qapi_ChardevRingbuf_base(ringbuf)); val = qemu_opt_get_size(opts, "size", 0); if (val != 0) { ringbuf->has_si... |
0 | static coroutine_fn int sd_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov){ SheepdogAIOCB acb; BDRVSheepdogState *s = bs->opaque; sd_aio_setup(&acb, s, qiov, sector_num, nb_sectors, AIOCB_READ_UDATA);retry: if (check_overlapping_aiocb(s, &acb)) { qemu_co_queue_wait(&s->overlapping... |
0 | static void multiwrite_help(void){ printf("\n"" writes a range of bytes from the given offset source from multiple buffers,\n"" in a batch of requests that may be merged by qemu\n""\n"" Example:\n"" 'multiwrite 512 1k 1k ; 4k 1k' \n"" writes 2 kB at 512 bytes and 1 kB at 4 kB into the open file\n""\n"" Writes into a se... |
0 | MemoryRegionSection memory_region_find(MemoryRegion *address_space, hwaddr addr, uint64_t size){ AddressSpace *as = memory_region_to_address_space(address_space); AddrRange range = addrrange_make(int128_make64(addr), int128_make64(size)); FlatRange *fr = address_space_lookup(as, range); MemoryRegionSection ret = { .mr ... |
0 | static int check_pow_970MP (CPUPPCState *env){ if (env->spr[SPR_HID0] & 0x01C00000) return 1; return 0;} |
0 | void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t val){ trace_esp_mem_writeb(saddr, s->wregs[saddr], val); switch (saddr) { case ESP_TCHI: s->tchi_written = true; /* fall through */ case ESP_TCLO: case ESP_TCMID: s->rregs[ESP_RSTAT] &= ~STAT_TC; break; case ESP_FIFO: if (s->do_cmd) { if (s->cmdlen < TI_BUFSZ) { ... |
0 | static void decode_delta_e(uint8_t *dst, const uint8_t *buf, const uint8_t *buf_end, int w, int flag, int bpp, int dst_size){ int planepitch = FFALIGN(w, 16) >> 3; int pitch = planepitch * bpp; int planepitch_byte = (w + 7) / 8; unsigned entries, ofssrc; GetByteContext gb, ptrs; PutByteContext pb; int k; if (buf_end - ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.