label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | static int vm_can_run(void) { if (powerdown_requested) return 0; if (reset_requested) return 0; if (shutdown_requested) return 0; if (debug_requested) return 0; return 1; } | 15,936 |
0 | void vga_common_init(VGACommonState *s, int vga_ram_size) { int i, j, v, b; for(i = 0;i < 256; i++) { v = 0; for(j = 0; j < 8; j++) { v |= ((i >> j) & 1) << (j * 4); } expand4[i] = v; v = 0; for(j = 0; j < 4; j++) { v |= ((i >> (2 * j)) & 3) << (j * 4); } expand2[i] = v; } for(i = 0; i < 16; i++) { v = 0; for(j = 0; j ... | 15,937 |
0 | InputEvent *qemu_input_event_new_btn(InputButton btn, bool down) { InputEvent *evt = g_new0(InputEvent, 1); evt->btn = g_new0(InputBtnEvent, 1); evt->kind = INPUT_EVENT_KIND_BTN; evt->btn->button = btn; evt->btn->down = down; return evt; } | 15,938 |
0 | static void ecc_diag_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { ECCState *s = opaque; trace_ecc_diag_mem_writeb(addr, val); s->diag[addr & ECC_DIAG_MASK] = val; } | 15,939 |
0 | static void imx_fec_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) { IMXFECBufDesc bd; int len; imx_fec_read_bd(&bd, addr); FEC_PRINTF("tx_bd %x flags %04x len %d data %08x\n", addr, bd.flags, bd.length, bd.data); if ((bd... | 15,940 |
0 | static void omap_eac_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { struct omap_eac_s *s = (struct omap_eac_s *) opaque; if (size != 2) { return omap_badwidth_write16(opaque, addr, value); } switch (addr) { case 0x098: /* APD1LCR */ case 0x09c: /* APD1RCR */ case 0x0a0: /* APD2LCR */ case... | 15,941 |
0 | static void do_hybrid_window(int order, int n, int non_rec, const float *in, float *out, float *hist, float *out2, const float *window) { int i; float buffer1[order + 1]; float buffer2[order + 1]; float work[order + n + non_rec]; /* update history */ memmove(hist, hist + n, (order + non_rec)*sizeof(*hist)); for (i=0; i... | 15,942 |
0 | static void pxa2xx_rtc_hzupdate(PXA2xxRTCState *s) { int64_t rt = qemu_get_clock(rt_clock); s->last_rcnr += ((rt - s->last_hz) << 15) / (1000 * ((s->rttr & 0xffff) + 1)); s->last_rdcr += ((rt - s->last_hz) << 15) / (1000 * ((s->rttr & 0xffff) + 1)); s->last_hz = rt; } | 15,944 |
0 | void HELPER(wer)(CPUXtensaState *env, uint32_t data, uint32_t addr) { address_space_stl(env->address_space_er, addr, data, (MemTxAttrs){0}, NULL); } | 15,945 |
0 | static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt) { const char *name; int qcode, idx = -1; if (src) { idx = qemu_console_get_index(src); } switch (evt->kind) { case INPUT_EVENT_KIND_KEY: switch (evt->key->key->kind) { case KEY_VALUE_KIND_NUMBER: qcode = qemu_input_key_number_to_qcode(evt->key->key->... | 15,946 |
0 | void ff_aac_encode_tns_info(AACEncContext *s, SingleChannelElement *sce) { int i, w, filt, coef_len, coef_compress; const int coef_res = MAX_LPC_PRECISION == 4 ? 1 : 0; const int is8 = sce->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE; put_bits(&s->pb, 1, !!sce->tns.present); if (!sce->tns.present) return; for (i = 0... | 15,947 |
0 | AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, int64_t channel_layout, int packed) { return avfilter_get_audio_buffer(link->dst->outputs[0], perms, sample_fmt, size, channel_layout, packed); } | 15,948 |
0 | static void tcp_chr_read(void *opaque) { CharDriverState *chr = opaque; TCPCharDriver *s = chr->opaque; uint8_t buf[1024]; int len, size; if (!s->connected || s->max_size <= 0) return; len = sizeof(buf); if (len > s->max_size) len = s->max_size; size = tcp_chr_recv(chr, (void *)buf, len); if (size == 0) { /* connection... | 15,949 |
0 | uint64_t helper_fctid(CPUPPCState *env, uint64_t arg) { CPU_DoubleU farg; farg.ll = arg; if (unlikely(float64_is_signaling_nan(farg.d))) { /* sNaN conversion */ farg.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN | POWERPC_EXCP_FP_VXCVI); } else if (unlikely(float64_is_quiet_nan(farg.d) || float64_is_infinity(f... | 15,950 |
0 | static uint64_t cchip_read(void *opaque, target_phys_addr_t addr, unsigned size) { CPUAlphaState *env = cpu_single_env; TyphoonState *s = opaque; uint64_t ret = 0; if (addr & 4) { return s->latch_tmp; } switch (addr) { case 0x0000: /* CSC: Cchip System Configuration Register. */ /* All sorts of data here; probably the ... | 15,951 |
0 | void qemu_system_reset(ShutdownCause reason) { MachineClass *mc; mc = current_machine ? MACHINE_GET_CLASS(current_machine) : NULL; cpu_synchronize_all_states(); if (mc && mc->reset) { mc->reset(); } else { qemu_devices_reset(); } if (reason) { /* TODO update event based on reason */ qapi_event_send_reset(&error_abort);... | 15,953 |
0 | static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) { const char *p; int ch, reg_size, type; char buf[MAX_PACKET_LENGTH]; uint8_t mem_buf[MAX_PACKET_LENGTH]; uint8_t *registers; target_ulong addr, len; #ifdef DEBUG_GDB printf("command='%s'\n", line_buf); #endif p = line_buf; ch = *p++; switch... | 15,955 |
0 | av_cold void ff_volume_init_x86(VolumeContext *vol) { int cpu_flags = av_get_cpu_flags(); enum AVSampleFormat sample_fmt = av_get_packed_sample_fmt(vol->sample_fmt); if (sample_fmt == AV_SAMPLE_FMT_S16) { if (EXTERNAL_SSE2(cpu_flags) && vol->volume_i < 32768) { vol->scale_samples = ff_scale_samples_s16_sse2; vol->sampl... | 15,956 |
0 | static void pxb_register_bus(PCIDevice *dev, PCIBus *pxb_bus, Error **errp) { PCIBus *bus = dev->bus; int pxb_bus_num = pci_bus_num(pxb_bus); if (bus->parent_dev) { error_setg(errp, "PXB devices can be attached only to root bus"); return; } QLIST_FOREACH(bus, &bus->child, sibling) { if (pci_bus_num(bus) == pxb_bus_num)... | 15,957 |
0 | static void v9fs_flush(void *opaque) { int16_t tag; size_t offset = 7; V9fsPDU *cancel_pdu; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "w", &tag); trace_v9fs_flush(pdu->tag, pdu->id, tag); QLIST_FOREACH(cancel_pdu, &s->active_list, next) { if (cancel_pdu->tag == tag) { break; } } if (cance... | 15,958 |
0 | static uint32_t reloc_pc24_val(tcg_insn_unit *pc, tcg_insn_unit *target) { ptrdiff_t disp = tcg_ptr_byte_diff(target, pc); assert(in_range_b(disp)); return disp & 0x3fffffc; } | 15,959 |
0 | static void enable_interrupt(EEPRO100State * s) { if (!s->int_stat) { logout("interrupt enabled\n"); qemu_irq_raise(s->pci_dev->irq[0]); s->int_stat = 1; } } | 15,960 |
0 | static abi_ulong load_elf_interp(struct elfhdr * interp_elf_ex, int interpreter_fd, abi_ulong *interp_load_addr, char bprm_buf[BPRM_BUF_SIZE]) { struct elf_phdr *elf_phdata = NULL; abi_ulong load_addr, load_bias, loaddr, hiaddr; int retval; abi_ulong error; int i; bswap_ehdr(interp_elf_ex); /* First of all, some simple... | 15,961 |
0 | static int execute_command(BlockDriverState *bdrv, SCSIGenericReq *r, int direction, BlockCompletionFunc *complete) { r->io_header.interface_id = 'S'; r->io_header.dxfer_direction = direction; r->io_header.dxferp = r->buf; r->io_header.dxfer_len = r->buflen; r->io_header.cmdp = r->req.cmd.buf; r->io_header.cmd_len = r-... | 15,963 |
0 | void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val) { uint8_t *ptr; MemoryRegionSection *section; section = phys_page_find(addr >> TARGET_PAGE_BITS); if (!memory_region_is_ram(section->mr) || section->readonly) { addr = memory_region_section_addr(section, addr); if (memory_region_is_ram(section->mr)) { sectio... | 15,964 |
0 | static void clear_program(MpegTSContext *ts, unsigned int programid) { int i; clear_avprogram(ts, programid); for(i=0; i<ts->nb_prg; i++) if(ts->prg[i].id == programid) ts->prg[i].nb_pids = 0; } | 15,967 |
0 | static void jpeg2000_flush(Jpeg2000DecoderContext *s) { if (*s->buf == 0xff) s->buf++; s->bit_index = 8; s->buf++; } | 15,968 |
0 | static void kvm_apic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t data, unsigned size) { MSIMessage msg = { .address = addr, .data = data }; int ret; ret = kvm_irqchip_send_msi(kvm_state, msg); if (ret < 0) { fprintf(stderr, "KVM: injection failed, MSI lost (%s)\n", strerror(-ret)); } } | 15,969 |
0 | void os_daemonize(void) { if (daemonize) { pid_t pid; int fds[2]; if (pipe(fds) == -1) { exit(1); } pid = fork(); if (pid > 0) { uint8_t status; ssize_t len; close(fds[1]); again: len = read(fds[0], &status, 1); if (len == -1 && (errno == EINTR)) { goto again; } if (len != 1) { exit(1); } else if (status == 1) { fprint... | 15,970 |
0 | int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; ucontext_t *uc = puc; uint32_t *pc = uc->uc_mcontext.sc_pc; uint32_t insn = *pc; int is_write = 0; /* XXX: need kernel patch to get write flag faster */ switch (insn >> 26) { case 0x0d: /* stw */ case 0x0e: /* stb */ case 0x0f: /... | 15,971 |
0 | static uint32_t bitband_readw(void *opaque, target_phys_addr_t offset) { uint32_t addr; uint16_t mask; uint16_t v; addr = bitband_addr(opaque, offset) & ~1; mask = (1 << ((offset >> 2) & 15)); mask = tswap16(mask); cpu_physical_memory_read(addr, (uint8_t *)&v, 2); return (v & mask) != 0; } | 15,972 |
0 | static void sd_set_ocr(SDState *sd) { /* All voltages OK, card power-up OK, Standard Capacity SD Memory Card */ sd->ocr = 0x80ffff00; } | 15,974 |
0 | static uint32_t pxa2xx_rtc_read(void *opaque, target_phys_addr_t addr) { PXA2xxRTCState *s = (PXA2xxRTCState *) opaque; switch (addr) { case RTTR: return s->rttr; case RTSR: return s->rtsr; case RTAR: return s->rtar; case RDAR1: return s->rdar1; case RDAR2: return s->rdar2; case RYAR1: return s->ryar1; case RYAR2: retu... | 15,975 |
0 | static int check_protocol_support(bool *has_ipv4, bool *has_ipv6) { #ifdef HAVE_IFADDRS_H struct ifaddrs *ifaddr = NULL, *ifa; struct addrinfo hints = { 0 }; struct addrinfo *ai = NULL; int gaierr; *has_ipv4 = *has_ipv6 = false; if (getifaddrs(&ifaddr) < 0) { g_printerr("Failed to lookup interface addresses: %s\n", str... | 15,978 |
0 | static int init(AVFilterContext *ctx) { EvalContext *eval = ctx->priv; char *args1 = av_strdup(eval->exprs); char *expr, *buf; int ret, i; if (!args1) { av_log(ctx, AV_LOG_ERROR, "Channels expressions list is empty\n"); ret = eval->exprs ? AVERROR(ENOMEM) : AVERROR(EINVAL); goto end; } /* parse expressions */ buf = arg... | 15,979 |
0 | void OPPROTO op_addl_EDI_T0(void) { EDI = (uint32_t)(EDI + T0); } | 15,981 |
0 | START_TEST(qdict_haskey_not_test) { fail_unless(qdict_haskey(tests_dict, "test") == 0); } | 15,982 |
0 | static void test_acpi_piix4_tcg_memhp(void) { test_data data; memset(&data, 0, sizeof(data)); data.machine = MACHINE_PC; data.variant = ".memhp"; test_acpi_one(" -m 128,slots=3,maxmem=1G -numa node", &data); free_test_data(&data); } | 15,983 |
0 | static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) { int b1, op1_offset, op2_offset, is_xmm, val, ot; int modrm, mod, rm, reg, reg_addr, offset_addr; GenOpFunc2 *sse_op2; GenOpFunc3 *sse_op3; b &= 0xff; if (s->prefix & PREFIX_DATA) b1 = 1; else if (s->prefix & PREFIX_REPZ) b1 = 2; else if (s-... | 15,984 |
1 | int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps, const int *ref_count, int slice_type_nos, H264PredWeightTable *pwt, void *logctx) { int list, i, j; int luma_def, chroma_def; pwt->use_weight = 0; pwt->use_weight_chroma = 0; pwt->luma_log2_weight_denom = get_ue_golomb(gb); if (sps->chroma_format_idc) pwt... | 15,988 |
1 | static int do_vm_stop(RunState state) { int ret = 0; if (runstate_is_running()) { cpu_disable_ticks(); pause_all_vcpus(); runstate_set(state); vm_state_notify(0, state); qapi_event_send_stop(&error_abort); } bdrv_drain_all(); ret = blk_flush_all(); return ret; } | 15,989 |
1 | static int cin_read_packet(AVFormatContext *s, AVPacket *pkt) { CinDemuxContext *cin = s->priv_data; ByteIOContext *pb = s->pb; CinFrameHeader *hdr = &cin->frame_header; int rc, palette_type, pkt_size; if (cin->audio_buffer_size == 0) { rc = cin_read_frame_header(cin, pb); if (rc) return rc; if ((int16_t)hdr->pal_color... | 15,990 |
1 | static void kvm_do_inject_x86_mce(void *_data) { struct kvm_x86_mce_data *data = _data; int r; r = kvm_set_mce(data->env, data->mce); if (r < 0) perror("kvm_set_mce FAILED"); } | 15,991 |
1 | static int v4l2_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) { V4L2m2mContext *s = avctx->priv_data; V4L2Context *const capture = &s->capture; V4L2Context *const output = &s->output; int ret; if (s->draining) goto dequeue; if (!output->streamon) { ret = ff_v4l2_context_set_status(output, VIDIOC_STREAMON); if ... | 15,992 |
0 | static int mov_rewrite_dvd_sub_extradata(AVStream *st) { char pal_s[256]; char buf[256]; int pal_s_pos = 0; uint8_t *src = st->codec->extradata; int i; if (st->codec->extradata_size != 64) return 0; for (i = 0; i < 16; i++) { uint32_t yuv = AV_RB32(src + i * 4); uint32_t rgba = yuv_to_rgba(yuv); snprintf(pal_s + pal_s_... | 15,994 |
0 | static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt) { OutputFile *of = output_files[ost->file_index]; int64_t ost_tb_start_time = av_rescale_q(of->start_time, AV_TIME_BASE_Q, ost->st->time_base); AVPacket opkt; av_init_packet(&opkt); if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_... | 15,995 |
0 | static int au_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret; ret= av_get_packet(s->pb, pkt, BLOCK_SIZE * s->streams[0]->codec->channels * av_get_bits_per_sample(s->streams[0]->codec->codec_id) >> 3); if (ret < 0) return ret; pkt->flags &= ~AV_PKT_FLAG_CORRUPT; pkt->stream_index = 0; return 0; } | 15,996 |
0 | int av_find_stream_info(AVFormatContext *ic) { int i, count, ret, read_size, j; AVStream *st; AVPacket pkt1, *pkt; int64_t old_offset = url_ftell(ic->pb); struct { int64_t last_dts; int64_t duration_gcd; int duration_count; double duration_error[MAX_STD_TIMEBASES]; int64_t codec_info_duration; } info[MAX_STREAMS] = {{0... | 15,997 |
0 | static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom) { AVStream *st = s->streams[1]; int av_unused tmp, tmp2; int samples, size; uint64_t pos = avio_tell(s->pb); unsigned dts; int ret; dts = avio_rb32(s->pb); st->codec->sample_rate = avio_rb32(s->pb); if (st->codec->sample_rate <= 0) { av_log(s, AV_L... | 15,998 |
1 | void hmp_hostfwd_add(Monitor *mon, const QDict *qdict) { const char *redir_str; SlirpState *s; const char *arg1 = qdict_get_str(qdict, "arg1"); const char *arg2 = qdict_get_try_str(qdict, "arg2"); const char *arg3 = qdict_get_try_str(qdict, "arg3"); if (arg2) { s = slirp_lookup(mon, arg1, arg2); redir_str = arg3; } els... | 16,000 |
1 | void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size) { const uint16_t *end; uint8_t *d = (uint8_t *)dst; const uint16_t *s = (uint16_t *)src; end = s + src_size/2; while(s < end) { register uint16_t bgr; bgr = *s++; #ifdef WORDS_BIGENDIAN *d++ = 0; *d++ = (bgr&0x1F)<<3; *d++ = (bgr&0x7E0)>>3; *d++ = (bgr&... | 16,001 |
1 | static void ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst, int stride, const uint8_t *table) { int j; int out = 0; int c; int t; for (j = 0; j < height; j++){ out = 0; while (out < width){ c = ir2_get_code(&ctx->gb); if(c > 0x80) { /* we have a skip */ c -= 0x80; out += c * 2; } else { /* ... | 16,002 |
1 | static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacket *pkt, int *serial) { int got_picture; if (packet_queue_get(&is->videoq, pkt, 1, serial) < 0) return -1; if (pkt->data == flush_pkt.data) { avcodec_flush_buffers(is->video_st->codec); SDL_LockMutex(is->pictq_mutex); // Make sure there are ... | 16,004 |
1 | int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush, int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int), int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *)) { int i; if (pkt) { AVStream *st = s->streams[pkt->stream_index]; AudioInterleaveContext *aic = st... | 16,005 |
1 | static int aac_decode_frame_int(AVCodecContext *avctx, void *data, int *got_frame_ptr, GetBitContext *gb) { AACContext *ac = avctx->priv_data; ChannelElement *che = NULL, *che_prev = NULL; enum RawDataBlockType elem_type, elem_type_prev = TYPE_END; int err, elem_id; int samples = 0, multiplier, audio_found = 0, pce_fou... | 16,006 |
1 | static void musicpal_init(MachineState *machine) { const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; ARMCPU *cpu; qemu_irq pic[32]; DeviceState *dev; DeviceStat... | 16,007 |
1 | void helper_fxrstor(CPUX86State *env, target_ulong ptr, int data64) { int i, fpus, fptag, nb_xmm_regs; floatx80 tmp; target_ulong addr; /* The operand must be 16 byte aligned */ if (ptr & 0xf) { raise_exception(env, EXCP0D_GPF); } env->fpuc = cpu_lduw_data(env, ptr); fpus = cpu_lduw_data(env, ptr + 2); fptag = cpu_lduw... | 16,008 |
1 | static int fill_default_ref_list(H264Context *h){ MpegEncContext * const s = &h->s; int i; int smallest_poc_greater_than_current = -1; Picture sorted_short_ref[32]; if(h->slice_type==B_TYPE){ int out_i; int limit= -1; /* sort frame according to poc in B slice */ for(out_i=0; out_i<h->short_ref_count; out_i++){ int best... | 16,009 |
1 | target_ulong helper_rdhwr_cc(CPUMIPSState *env) { check_hwrena(env, 2); #ifdef CONFIG_USER_ONLY return env->CP0_Count; #else return (int32_t)cpu_mips_get_count(env); #endif } | 16,010 |
1 | void helper_rfci(CPUPPCState *env) { do_rfi(env, env->spr[SPR_BOOKE_CSRR0], SPR_BOOKE_CSRR1, ~((target_ulong)0x3FFF0000), 0); } | 16,011 |
0 | static void gen_nabso(DisasContext *ctx) { int l1 = gen_new_label(); int l2 = gen_new_label(); tcg_gen_brcondi_tl(TCG_COND_GT, cpu_gpr[rA(ctx->opcode)], 0, l1); tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]); tcg_gen_br(l2); gen_set_label(l1); tcg_gen_neg_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx-... | 16,012 |
0 | static coroutine_fn int cow_co_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { int ret; BDRVCowState *s = bs->opaque; qemu_co_mutex_lock(&s->lock); ret = cow_read(bs, sector_num, buf, nb_sectors); qemu_co_mutex_unlock(&s->lock); return ret; } | 16,013 |
0 | static inline uint32_t ucf64_stoi(float32 s) { union { uint32_t i; float32 s; } v; v.s = s; return v.i; } | 16,014 |
0 | static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val) { AHCIPortRegs *pr = &s->dev[port].port_regs; DPRINTF(port, "offset: 0x%x val: 0x%x\n", offset, val); switch (offset) { case PORT_LST_ADDR: pr->lst_addr = val; break; case PORT_LST_ADDR_HI: pr->lst_addr_hi = val; break; case PORT_FIS_ADDR: pr... | 16,015 |
0 | static int do_write_compressed(BlockBackend *blk, char *buf, int64_t offset, int64_t count, int64_t *total) { int ret; if (count >> 9 > INT_MAX) { return -ERANGE; } ret = blk_write_compressed(blk, offset >> 9, (uint8_t *)buf, count >> 9); if (ret < 0) { return ret; } *total = count; return 1; } | 16,016 |
0 | void qdict_put_obj(QDict *qdict, const char *key, QObject *value) { unsigned int hash; QDictEntry *entry; hash = tdb_hash(key) % QDICT_HASH_SIZE; entry = qdict_find(qdict, key, hash); if (entry) { /* replace key's value */ qobject_decref(entry->value); entry->value = value; } else { /* allocate a new entry */ entry = a... | 16,017 |
0 | static void trigger_page_fault(CPUS390XState *env, target_ulong vaddr, uint32_t type, uint64_t asc, int rw, bool exc) { int ilen = ILEN_LATER; uint64_t tec; tec = vaddr | (rw == MMU_DATA_STORE ? FS_WRITE : FS_READ) | asc >> 46; DPRINTF("%s: trans_exc_code=%016" PRIx64 "\n", __func__, tec); if (!exc) { return; } /* Code... | 16,018 |
0 | static av_cold int read_specific_config(ALSDecContext *ctx) { GetBitContext gb; uint64_t ht_size; int i, config_offset; MPEG4AudioConfig m4ac; ALSSpecificConfig *sconf = &ctx->sconf; AVCodecContext *avctx = ctx->avctx; uint32_t als_id, header_size, trailer_size; init_get_bits(&gb, avctx->extradata, avctx->extradata_siz... | 16,019 |
0 | int socket_listen(SocketAddressLegacy *addr, Error **errp) { int fd; switch (addr->type) { case SOCKET_ADDRESS_LEGACY_KIND_INET: fd = inet_listen_saddr(addr->u.inet.data, 0, false, errp); break; case SOCKET_ADDRESS_LEGACY_KIND_UNIX: fd = unix_listen_saddr(addr->u.q_unix.data, false, errp); break; case SOCKET_ADDRESS_LE... | 16,021 |
0 | static long do_sigreturn_v1(CPUARMState *env) { abi_ulong frame_addr; struct sigframe_v1 *frame = NULL; target_sigset_t set; sigset_t host_set; int i; /* * Since we stacked the signal on a 64-bit boundary, * then 'sp' should be word aligned here. If it's * not, then the user is trying to mess with us. */ frame_addr = e... | 16,022 |
0 | static int usbnet_can_receive(void *opaque) { USBNetState *s = opaque; if (s->rndis && !s->rndis_state == RNDIS_DATA_INITIALIZED) return 1; return !s->in_len; } | 16,023 |
0 | static int rtc_load(QEMUFile *f, void *opaque, int version_id) { RTCState *s = opaque; if (version_id != 1) return -EINVAL; qemu_get_buffer(f, s->cmos_data, 128); qemu_get_8s(f, &s->cmos_index); s->current_tm.tm_sec=qemu_get_be32(f); s->current_tm.tm_min=qemu_get_be32(f); s->current_tm.tm_hour=qemu_get_be32(f); s->curr... | 16,024 |
0 | void vnc_display_close(DisplayState *ds) { VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display; if (!vs) return; if (vs->display) { qemu_free(vs->display); vs->display = NULL; } if (vs->lsock != -1) { qemu_set_fd_handler2(vs->lsock, NULL, NULL, NULL, NULL); close(vs->lsock); vs->lsock = -1; } vs->auth = VNC_AU... | 16,025 |
0 | static void tmu2_start(MilkymistTMU2State *s) { int pbuffer_attrib[6] = { GLX_PBUFFER_WIDTH, 0, GLX_PBUFFER_HEIGHT, 0, GLX_PRESERVED_CONTENTS, True }; GLXPbuffer pbuffer; GLuint texture; void *fb; target_phys_addr_t fb_len; void *mesh; target_phys_addr_t mesh_len; float m; trace_milkymist_tmu2_start(); /* Create and se... | 16,026 |
0 | static int colo_packet_compare_icmp(Packet *spkt, Packet *ppkt) { trace_colo_compare_main("compare icmp"); if (colo_packet_compare_common(ppkt, spkt)) { trace_colo_compare_icmp_miscompare("primary pkt size", ppkt->size); qemu_hexdump((char *)ppkt->data, stderr, "colo-compare", ppkt->size); trace_colo_compare_icmp_misco... | 16,027 |
0 | static void scsi_destroy(SCSIDevice *dev) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev); scsi_disk_purge_requests(s); blockdev_mark_auto_del(s->qdev.conf.dinfo->bdrv); } | 16,028 |
0 | void HELPER(yield)(CPUARMState *env) { ARMCPU *cpu = arm_env_get_cpu(env); CPUState *cs = CPU(cpu); /* When running in MTTCG we don't generate jumps to the yield and * WFE helpers as it won't affect the scheduling of other vCPUs. * If we wanted to more completely model WFE/SEV so we don't busy * spin unnecessarily we w... | 16,029 |
0 | static void gic_init(gic_state *s, int num_cpu, int num_irq) #else static void gic_init(gic_state *s, int num_irq) #endif { int i; #if NCPU > 1 s->num_cpu = num_cpu; if (s->num_cpu > NCPU) { hw_error("requested %u CPUs exceeds GIC maximum %d\n", num_cpu, NCPU); } #endif s->num_irq = num_irq + GIC_BASE_IRQ; if (s->num_i... | 16,030 |
0 | static int dv_read_timecode(AVFormatContext *s) { int ret; char timecode[AV_TIMECODE_STR_SIZE]; int64_t pos = avio_tell(s->pb); // Read 3 DIF blocks: Header block and 2 Subcode blocks. int partial_frame_size = 3 * 80; uint8_t *partial_frame = av_mallocz(sizeof(*partial_frame) * partial_frame_size); RawDVContext *c = s-... | 16,031 |
0 | static void vt82c686b_init_ports(PCIIDEState *d) { int i; struct { int iobase; int iobase2; int isairq; } port_info[] = { {0x1f0, 0x3f6, 14}, {0x170, 0x376, 15}, }; for (i = 0; i < 2; i++) { ide_bus_new(&d->bus[i], &d->dev.qdev, i); ide_init_ioport(&d->bus[i], port_info[i].iobase, port_info[i].iobase2); ide_init2(&d->b... | 16,033 |
0 | static void gen_tlbsx_40x(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); gen_helper_4xx_tlbsx(cpu_gpr[rD(ctx->opcode)]... | 16,034 |
0 | static unsigned int PerformComparison(const unsigned int opcode) { FPA11 *fpa11 = GET_FPA11(); unsigned int Fn, Fm; floatx80 rFn, rFm; int e_flag = opcode & 0x400000; /* 1 if CxFE */ int n_flag = opcode & 0x200000; /* 1 if CNxx */ unsigned int flags = 0; //printk("PerformComparison(0x%08x)\n",opcode); Fn = getFn(opcode... | 16,035 |
0 | static bool aio_dispatch_handlers(AioContext *ctx, HANDLE event) { AioHandler *node; bool progress = false; /* * We have to walk very carefully in case aio_set_fd_handler is * called while we're walking. */ node = QLIST_FIRST(&ctx->aio_handlers); while (node) { AioHandler *tmp; ctx->walking_handlers++; if (!node->delet... | 16,037 |
0 | static void monitor_control_read(void *opaque, const uint8_t *buf, int size) { Monitor *old_mon = cur_mon; cur_mon = opaque; // TODO: read QMP input cur_mon = old_mon; } | 16,038 |
0 | int kvm_log_stop(target_phys_addr_t phys_addr, ram_addr_t size) { return kvm_dirty_pages_log_change(phys_addr, size, 0, KVM_MEM_LOG_DIRTY_PAGES); } | 16,039 |
0 | static int curl_find_buf(BDRVCURLState *s, size_t start, size_t len, CURLAIOCB *acb) { int i; size_t end = start + len; for (i=0; i<CURL_NUM_STATES; i++) { CURLState *state = &s->states[i]; size_t buf_end = (state->buf_start + state->buf_off); size_t buf_fend = (state->buf_start + state->buf_len); if (!state->orig_buf)... | 16,040 |
0 | static uint64_t mcf_intc_read(void *opaque, target_phys_addr_t addr, unsigned size) { int offset; mcf_intc_state *s = (mcf_intc_state *)opaque; offset = addr & 0xff; if (offset >= 0x40 && offset < 0x80) { return s->icr[offset - 0x40]; } switch (offset) { case 0x00: return (uint32_t)(s->ipr >> 32); case 0x04: return (ui... | 16,041 |
0 | int ff_hls_write_file_entry(AVIOContext *out, int insert_discont, int byterange_mode, double duration, int round_duration, int64_t size, int64_t pos, //Used only if HLS_SINGLE_FILE flag is set char *baseurl, //Ignored if NULL char *filename, double *prog_date_time) { if (!out || !filename) return AVERROR(EINVAL); if (i... | 16,042 |
0 | static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc) { int addr_reg, data_reg, data_reg2, bswap; #ifdef CONFIG_SOFTMMU int mem_index, s_bits; # if TARGET_LONG_BITS == 64 int addr_reg2; # endif uint32_t *label_ptr; #endif #ifdef TARGET_WORDS_BIGENDIAN bswap = 1; #else bswap = 0; #endif data_reg... | 16,043 |
0 | static void gen_spr_403 (CPUPPCState *env) { /* MMU */ spr_register(env, SPR_403_PBL1, "PBL1", SPR_NOACCESS, SPR_NOACCESS, &spr_read_403_pbr, &spr_write_403_pbr, 0x00000000); spr_register(env, SPR_403_PBU1, "PBU1", SPR_NOACCESS, SPR_NOACCESS, &spr_read_403_pbr, &spr_write_403_pbr, 0x00000000); spr_register(env, SPR_403... | 16,044 |
0 | static gnutls_certificate_credentials_t vnc_tls_initialize_x509_cred(VncState *vs) { gnutls_certificate_credentials_t x509_cred; int ret; if (!vs->vd->x509cacert) { VNC_DEBUG("No CA x509 certificate specified\n"); return NULL; } if (!vs->vd->x509cert) { VNC_DEBUG("No server x509 certificate specified\n"); return NULL; ... | 16,045 |
0 | CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus **pcip, const unsigned int pci_irq_nrs[4], int do_init, const char *cpu_model) { target_phys_addr_t ram_bases[PPC440EP_SDRAM_NR_BANKS]; target_phys_addr_t ram_sizes[PPC440EP_SDRAM_NR_BANKS]; CPUState *env; qemu_irq *pic; qemu_irq *irqs; qemu_irq *pci_irqs; if (cpu_mo... | 16,046 |
1 | void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque)) { MapClient *client = g_malloc(sizeof(*client)); qemu_mutex_lock(&map_client_list_lock); client->opaque = opaque; client->callback = callback; QLIST_INSERT_HEAD(&map_client_list, client, link); if (!atomic_read(&bounce.in_use)) { cpu_notify_map... | 16,048 |
1 | static int svag_read_header(AVFormatContext *s) { unsigned size, align; AVStream *st; avio_skip(s->pb, 4); st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); size = avio_rl32(s->pb); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = AV_CODEC_ID_ADPCM_PSX; st->codec->sample_rate = avio_r... | 16,049 |
1 | int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src) { int i; MpegEncContext *s = dst->priv_data, *s1 = src->priv_data; if (dst == src || !s1->context_initialized) return 0; // FIXME can parameters change on I-frames? // in that case dst may need a reinit if (!s->context_initialized) { memc... | 16,050 |
1 | static void encode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, int stride[3]){ int x, y, p, i; const int ring_size= s->avctx->context_model ? 3 : 2; int16_t *sample[4][3]; int lbd= s->avctx->bits_per_raw_sample <= 8; int bits= s->avctx->bits_per_raw_sample > 0 ? s->avctx->bits_per_raw_sample : 8; int offse... | 16,051 |
1 | static void test_flush(void) { QPCIDevice *dev; QPCIBar bmdma_bar, ide_bar; uint8_t data; ide_test_start( "-drive file=blkdebug::%s,if=ide,cache=writeback,format=raw", tmp_path); dev = get_pci_device(&bmdma_bar, &ide_bar); qtest_irq_intercept_in(global_qtest, "ioapic"); /* Dirty media so that CMD_FLUSH_CACHE will actua... | 16,052 |
1 | static int protocol_client_auth_sasl_start(VncState *vs, uint8_t *data, size_t len) { uint32_t datalen = len; const char *serverout; unsigned int serveroutlen; int err; char *clientdata = NULL; /* NB, distinction of NULL vs "" is *critical* in SASL */ if (datalen) { clientdata = (char*)data; clientdata[datalen-1] = '\0... | 16,053 |
1 | static int decode_init(AVCodecContext * avctx) { MPADecodeContext *s = avctx->priv_data; static int init=0; int i, j, k; #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) avctx->sample_fmt= SAMPLE_FMT_S32; #else avctx->sample_fmt= SAMPLE_FMT_S16; #endif if(avctx->antialias_algo != FF_AA_FLOAT) s->compute... | 16,054 |
1 | static int init_muxer(AVFormatContext *s, AVDictionary **options) { int ret = 0, i; AVStream *st; AVDictionary *tmp = NULL; AVCodecParameters *par = NULL; AVOutputFormat *of = s->oformat; const AVCodecDescriptor *desc; AVDictionaryEntry *e; if (options) av_dict_copy(&tmp, *options, 0); if ((ret = av_opt_set_dict(s, &tm... | 16,055 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.