project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
qemu
e70377dfa4bbc2e101066ca35675bed4129c5a8c
0
static S390PCIBusDevice *s390_pci_find_dev_by_uid(uint16_t uid) { int i; S390PCIBusDevice *pbdev; S390pciState *s = s390_get_phb(); for (i = 0; i < PCI_SLOT_MAX; i++) { pbdev = s->pbdev[i]; if (!pbdev) { continue; } if (pbdev->uid == uid) { ...
26,881
qemu
079d0b7f1eedcc634c371fe05b617fdc55c8b762
0
static int usb_host_usbfs_type(USBHostDevice *s, USBPacket *p) { static const int usbfs[] = { [USB_ENDPOINT_XFER_CONTROL] = USBDEVFS_URB_TYPE_CONTROL, [USB_ENDPOINT_XFER_ISOC] = USBDEVFS_URB_TYPE_ISO, [USB_ENDPOINT_XFER_BULK] = USBDEVFS_URB_TYPE_BULK, [USB_ENDPOINT_XFER_I...
26,882
qemu
3df9caf88f5c0859ae380101fea47609ba1dbfbd
0
static void scsi_cancel_io(SCSIRequest *req) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); DPRINTF("Cancel tag=0x%x\n", req->tag); if (r->req.aiocb) { bdrv_aio_cancel(r->req.aiocb); /* This reference was left in by scsi_*_data. We take ownership of * it the moment...
26,883
qemu
9d4c0f4f0a71e74fd7e04d73620268484d693adf
0
static uint32_t drc_unisolate_logical(sPAPRDRConnector *drc) { /* cannot unisolate a non-existent resource, and, or resources * which are in an 'UNUSABLE' allocation state. (PAPR 2.7, * 13.5.3.5) */ if (!drc->dev || drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_UNUSABLE) { ...
26,885
qemu
cef34eebf3d0f252a3b3e9a2a459b6c3ecc56f68
0
void do_blockdev_backup(const char *job_id, const char *device, const char *target, enum MirrorSyncMode sync, bool has_speed, int64_t speed, bool has_on_source_error, BlockdevOnError on_source_error, ...
26,887
qemu
8e8eb0a9035e5b6c6447c82138570e388282cfa2
0
BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs, Error **errp) { ImageInfo **p_image_info; BlockDriverState *bs0; BlockDeviceInfo *info = g_malloc0(sizeof(*info)); info->file = g_strdup(bs->filename); ...
26,888
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
void qemu_clock_unregister_reset_notifier(QEMUClockType type, Notifier *notifier) { notifier_remove(notifier); }
26,889
qemu
28c5af54c661e73e5596918fa67a22b5e87c2022
0
static void ppc_core99_init (int ram_size, int vga_ram_size, const char *boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline,...
26,890
qemu
90618f4f4d1e7b5b9fe40834646adac1e21d1b07
0
POWERPC_FAMILY(POWER5P)(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc); dc->fw_name = "PowerPC,POWER5"; dc->desc = "POWER5+"; pcc->init_proc = init_proc_power5plus; pcc->check_pow = check_pow_970FX; pcc->insns_flags =...
26,891
qemu
a7812ae412311d7d47f8aa85656faadac9d64b56
0
static unsigned int dec_addi_acr(DisasContext *dc) { TCGv t0; DIS(fprintf (logfile, "addi.%c $r%u, $r%u, $acr\n", memsize_char(memsize_zz(dc)), dc->op2, dc->op1)); cris_cc_mask(dc, 0); t0 = tcg_temp_new(TCG_TYPE_TL); tcg_gen_shl_tl(t0, cpu_R[dc->op2], tcg_const_tl(dc->zzsize)); tcg_gen_add_tl(cpu_R[R_...
26,894
qemu
b3db211f3c80bb996a704d665fe275619f728bd4
0
static void test_visitor_out_list_qapi_free(TestOutputVisitorData *data, const void *unused) { UserDefTwoList *p, *head = NULL; const char string[] = "foo bar"; int i, max_count = 1024; for (i = 0; i < max_count; i++) { p = g_malloc0(sizeof(*p...
26,895
qemu
31dce3ccca98bc9f9eb57f8b08b008edd07661ba
0
void bdrv_io_limits_enable(BlockDriverState *bs, const char *group) { assert(!bs->throttle_state); throttle_group_register_bs(bs, group); }
26,896
qemu
d9911d14e01f5e97c6ac1fe681ef15334250d149
0
static bool select_accel_fn(const void *buf, size_t len) { uintptr_t ibuf = (uintptr_t)buf; #ifdef CONFIG_AVX2_OPT if (len % 128 == 0 && ibuf % 32 == 0 && (cpuid_cache & CACHE_AVX2)) { return buffer_zero_avx2(buf, len); } if (len % 64 == 0 && ibuf % 16 == 0 && (cpuid_cache & CACHE_SSE4)) ...
26,897
qemu
b172c56a6d849554f7e43adc95983a9d6c042689
0
static void cpu_ppc_set_tb_clk (void *opaque, uint32_t freq) { CPUState *env = opaque; ppc_tb_t *tb_env = env->tb_env; tb_env->tb_freq = freq; tb_env->decr_freq = freq; /* There is a bug in Linux 2.4 kernels: * if a decrementer exception is pending when it enables msr_ee at startup, ...
26,898
FFmpeg
89505f2c3f8ee1b0b68fc220a226c8bf3cef24cd
0
static int init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char *effect_type, int width) { int z; const char *effect = fp->amount == 0 ? "none" : fp->amount < 0 ? "blur" : "sharpen"; if (!(fp->msize_x & fp->msize_y & 1)) { av_log(ctx, AV_LOG_ERROR, "Invalid eve...
26,899
FFmpeg
95af5e1c8158667066e1b39217bbf6e62cedeb4c
0
static void do_video_out(AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVFrame *in_picture, int *frame_size) { int nb_frames, i, ret; AVFrame *final_picture, *formatted_picture, *resampling_...
26,900
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void pci_apb_iowritel (void *opaque, target_phys_addr_t addr, uint32_t val) { cpu_outl(addr & IOPORTS_MASK, bswap32(val)); }
26,901
qemu
245f7b51c0ea04fb2224b1127430a096c91aee70
0
tight_detect_smooth_image24(VncState *vs, int w, int h) { int off; int x, y, d, dx; uint c; uint stats[256]; int pixels = 0; int pix, left[3]; uint errors; unsigned char *buf = vs->tight.buffer; /* * If client is big-endian, color samples begin from the second ...
26,902
qemu
8d5c773e323b22402abdd0beef4c7d2fc91dd0eb
0
static void csselr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { env->cp15.c0_cssel = value & 0xf; }
26,903
qemu
eb700029c7836798046191d62d595363d92c84d4
0
bool net_tx_pkt_send(struct NetTxPkt *pkt, NetClientState *nc) { assert(pkt); if (!pkt->has_virt_hdr && pkt->virt_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { net_tx_pkt_do_sw_csum(pkt); } /* * Since underlying infrastructure does not support IP datagrams longer * th...
26,905
qemu
ec5c3e487eb49100e6cb1b84e7f0bd022fbbf54b
0
static int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx, target_ulong address, int rw, int access_type) { ppcemb_tlb_t *tlb; target_phys_addr_t raddr; int i, ret, zsel, zpr, pr; ret = -1; raddr = (target_phys_addr_t)-1ULL; pr = msr_pr; ...
26,907
qemu
4fc9af53d88c0a2a810704a06cb39a7182982e4e
0
int bdrv_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BlockDriver *drv = bs->drv; if (!drv) return -ENOMEDIUM; if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { memcpy(buf, bs->boot_sector_data, 512); s...
26,908
qemu
32bafa8fdd098d52fbf1102d5a5e48d29398c0aa
0
int socket_connect(SocketAddress *addr, Error **errp, NonBlockingConnectHandler *callback, void *opaque) { int fd; switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: fd = inet_connect_saddr(addr->u.inet, errp, callback, opaque); break; case SOCKET_ADDRESS...
26,909
FFmpeg
f8cab062caacba2982a0d0bccd504b11c073caf6
0
static int process_ea_header(AVFormatContext *s) { uint32_t blockid, size = 0; EaDemuxContext *ea = s->priv_data; ByteIOContext *pb = &s->pb; blockid = get_le32(pb); if (blockid == MVhd_TAG) { size = get_le32(pb); process_video_header_vp6(s); url_fskip(pb, size-32);...
26,910
FFmpeg
daece4c6745b42e8b1e171fb4bf485d5d64fc53f
0
static void check_external_clock_sync(VideoState *is, double pts) { if (fabs(get_external_clock(is) - pts) > AV_NOSYNC_THRESHOLD) { update_external_clock_pts(is, pts); } }
26,911
qemu
04097f7c5957273c578f72b9bd603ba6b1d69e33
1
static int vhost_client_sync_dirty_bitmap(CPUPhysMemoryClient *client, target_phys_addr_t start_addr, target_phys_addr_t end_addr) { struct vhost_dev *dev = container_of(client, struct vhost_dev, client); int i; if (!d...
26,912
FFmpeg
fd6e513ee1dc13174256de8adaeeb2c2691eee95
1
static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = (MOVStreamContext *)st->priv_data; int entries, frames_per_sample; uint32_t format; print_atom("stsd", atom); get_byte(pb); /* versi...
26,913
qemu
ad2d30f79d3b0812f02c741be2189796b788d6d7
1
void scsi_req_free(SCSIRequest *req) { scsi_req_dequeue(req); qemu_free(req); }
26,914
qemu
b4ba67d9a702507793c2724e56f98e9b0f7be02b
1
void qpci_memwrite(QPCIDevice *dev, void *data, const void *buf, size_t len) { uintptr_t addr = (uintptr_t)data; g_assert(addr >= QPCI_PIO_LIMIT); dev->bus->memwrite(dev->bus, addr, buf, len); }
26,915
qemu
1108b2f8a939fb5778d384149e2f1b99062a72da
1
e1000e_init_msi(E1000EState *s) { int res; res = msi_init(PCI_DEVICE(s), 0xD0, /* MSI capability offset */ 1, /* MAC MSI interrupts */ true, /* 64-bit message addresses supported */ false);...
26,916
FFmpeg
574929d8b6de32ae712fcca7ab09f01a3e4616be
1
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size) { int elems = pkt->side_data_elems; if ((unsigned)elems + 1 > INT_MAX / sizeof(*pkt->side_data)) return AVERROR(ERANGE); pkt->side_data = av_realloc(pkt->side_...
26,917
qemu
56439e9d55626b65ecb887f1ac3714652555312e
1
static coroutine_fn int qcow_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { BDRVQcowState *s = bs->opaque; int index_in_cluster; int ret = 0, n; uint64_t cluster_offset; struct iovec hd_iov; QEMUIOVector hd_qiov; uin...
26,918
qemu
e0dadc1e9ef1f35208e5d2af9c7740c18a0b769f
1
static inline I2CBus *aux_bridge_get_i2c_bus(AUXTOI2CState *bridge) { return bridge->i2c_bus; }
26,919
qemu
33e66b86d89040f0a9e99aa53deb74ce8936a649
1
static int usb_host_auto_scan(void *opaque, int bus_num, int addr, int class_id, int vendor_id, int product_id, const char *product_name, int speed) { struct USBAutoFilter *f; struct USBDevice *dev; /* Ignore hubs */ if (class_id == 9) return 0...
26,920
FFmpeg
628c9dcca3fb3f46f960f0df8236591653c6e512
1
static int get_siz(J2kDecoderContext *s) { int i, ret; if (s->buf_end - s->buf < 36) bytestream_get_be16(&s->buf); // Rsiz (skipped) s->width = bytestream_get_be32(&s->buf); // width s->height = bytestream_get_be32(&s->buf); // height s->image_offset_x = byte...
26,921
FFmpeg
d9fe1749fc1009b14252030dda9142de624670c0
1
static int decode_ref_pic_marking(H264Context *h, GetBitContext *gb){ MpegEncContext * const s = &h->s; int i; if(h->nal_unit_type == NAL_IDR_SLICE){ //FIXME fields s->broken_link= get_bits1(gb) -1; h->mmco[0].long_arg= get_bits1(gb) - 1; // current_long_term_idx if(h->mmco[...
26,922
FFmpeg
5d97d9d53ea1cc2c28411ad734565372ddeccc32
1
static int decode_main_header(NUTContext *nut){ AVFormatContext *s= nut->avf; ByteIOContext *bc = &s->pb; uint64_t tmp, end; unsigned int stream_count; int i, j, tmp_stream, tmp_mul, tmp_pts, tmp_size, count, tmp_res; end= get_packetheader(nut, bc, 1); end += url_ftell(bc) - 4; ...
26,923
qemu
6f2d8978728c48ca46f5c01835438508aace5c64
1
void do_POWER_divso (void) { if (((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) || (int32_t)T1 == 0) { T0 = (long)((-1) * (T0 >> 31)); env->spr[SPR_MQ] = 0; xer_ov = 1; xer_so = 1; } else { T0 = (int32_t)T0 / (int32_t)T1; env->spr[SPR_MQ] = (int32_t)T0 %...
26,924
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
1
void add_migration_state_change_notifier(Notifier *notify) { notifier_list_add(&migration_state_notifiers, notify); }
26,925
FFmpeg
22cc57da64bfd73f2206969486b0aa183ee76479
1
static void enqueue_packet(RTPDemuxContext *s, uint8_t *buf, int len) { uint16_t seq = AV_RB16(buf + 2); RTPPacket **cur = &s->queue, *packet; /* Find the correct place in the queue to insert the packet */ while (*cur) { int16_t diff = seq - (*cur)->seq; if (diff < 0) ...
26,926
FFmpeg
432f1f11ea7f95b1c1f1adb546151f09c1d7a932
0
int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { RV34DecContext *r = avctx->priv_data; MpegEncContext *s = &r->s; AVFrame *pict = data; SliceInfo si; int i; int slice_c...
26,927
FFmpeg
802713c4e7b41bc2deed754d78649945c3442063
1
static av_cold int mss2_decode_init(AVCodecContext *avctx) { MSS2Context * const ctx = avctx->priv_data; MSS12Context *c = &ctx->c; int ret; c->avctx = avctx; avctx->coded_frame = &ctx->pic; if (ret = ff_mss12_decode_init(c, 1, &ctx->sc[0], &ctx->sc[1])) return ret; c->pal_s...
26,928
FFmpeg
25e3e53d4092e7b69a4d681824fa0f7b2731bb1e
1
static void build_file_streams(void) { FFStream *stream, *stream_next; AVFormatContext *infile; int i; /* gather all streams */ for(stream = first_stream; stream != NULL; stream = stream_next) { stream_next = stream->next; if (stream->stream_type == STREAM_TYPE_LIVE && ...
26,929
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
1
void OPPROTO op_addco (void) { do_addco(); RETURN(); }
26,930
qemu
e0e2d644096c79a71099b176d08f465f6803a8b1
1
static inline void vring_used_flags_set_bit(VirtQueue *vq, int mask) { VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches); VirtIODevice *vdev = vq->vdev; hwaddr pa = offsetof(VRingUsed, flags); uint16_t flags = virtio_lduw_phys_cached(vq->vdev, &caches->used, pa); virtio_st...
26,931
qemu
d832fb4d66ead62da4af7e44cce34cd939e865e1
1
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_...
26,932
FFmpeg
ca16618b01abfde44b4eaf92dc89b01aa1b4a91e
0
static void xan_unpack(unsigned char *dest, unsigned char *src) { unsigned char opcode; int size; int offset; int byte1, byte2, byte3; for (;;) { opcode = *src++; if ( (opcode & 0x80) == 0 ) { offset = *src++; size = opcode & 3; ...
26,936
qemu
ac531cb6e542b1e61d668604adf9dc5306a948c0
0
START_TEST(qdict_del_test) { const char *key = "key test"; qdict_put(tests_dict, key, qstring_from_str("foo")); fail_unless(qdict_size(tests_dict) == 1); qdict_del(tests_dict, key); fail_unless(qdict_size(tests_dict) == 0); fail_unless(qdict_haskey(tests_dict, key) == 0); }
26,937
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
static void spawn_thread(ThreadPool *pool) { pool->cur_threads++; pool->new_threads++; /* If there are threads being created, they will spawn new workers, so * we don't spend time creating many threads in a loop holding a mutex or * starving the current vcpu. * * If there are no ...
26,938
qemu
bf7aa45e7b378691ea0e8616a2aeae2aaabb7bc3
0
static void vnc_display_close(VncDisplay *vs) { if (!vs) return; g_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; } #ifdef CONFIG_VNC_WS g_free(vs...
26,939
qemu
de13d2161473d02ae97ec0f8e4503147554892dd
0
void kvm_s390_crw_mchk(S390CPU *cpu) { kvm_s390_interrupt_internal(cpu, KVM_S390_MCHK, 1 << 28, 0x00400f1d40330000, 1); }
26,940
qemu
9e41bade85ef338afd983c109368d1bbbe931f80
0
static int pxa2xx_i2c_slave_init(I2CSlave *i2c) { /* Nothing to do. */ return 0; }
26,942
qemu
5861a33898bbddfd1a80c2e202cb9352e3b1ba62
0
static void openpic_cpu_write_internal(void *opaque, hwaddr addr, uint32_t val, int idx) { openpic_t *opp = opaque; IRQ_src_t *src; IRQ_dst_t *dst; int s_IRQ, n_IRQ; DPRINTF("%s: cpu %d addr " TARGET_FMT_plx " <= %08x\n", __func__, idx, ad...
26,943
qemu
64a31d5c3d73396a88563d7a504654edc85aa854
0
static inline int dmg_read_chunk(BDRVDMGState *s,int sector_num) { if(!is_sector_in_chunk(s,s->current_chunk,sector_num)) { int ret; uint32_t chunk = search_chunk(s,sector_num); if(chunk>=s->n_chunks) return -1; s->current_chunk = s->n_chunks; switch(s->types[chunk]) { case 0x80000005: { /* ...
26,944
qemu
c021f8e65f5009a5ab5711d9d5326fcab553ef1c
0
static QObject *pci_get_dev_dict(PCIDevice *dev, PCIBus *bus, int bus_num) { int class; QObject *obj; obj = qobject_from_jsonf("{ 'bus': %d, 'slot': %d, 'function': %d," "'class_info': %p, 'id': %p, 'regions': %p," " 'qdev_id': %s }"...
26,948
qemu
b8c18e4c901edae8cc14c07baa36f852be1f1ad0
0
static void vga_draw_graphic(VGAState *s, int full_update) { int y1, y, update, page_min, page_max, linesize, y_start, double_scan, mask, depth; int width, height, shift_control, line_offset, page0, page1, bwidth, bits; int disp_width, multi_scan, multi_run; uint8_t *d; uint32_t v, addr1, addr...
26,949
qemu
aa15f497178a8a3d489bf410171c3b6dfa0d9f49
0
static void qtest_process_command(CharDriverState *chr, gchar **words) { const gchar *command; g_assert(words); command = words[0]; if (qtest_log_fp) { qemu_timeval tv; int i; qtest_get_time(&tv); fprintf(qtest_log_fp, "[R +" FMT_timeval "]", ...
26,950
qemu
c18ad9a54b75495ce61e8b28d353f8eec51768fc
0
static RemoveResult remove_hpte(PowerPCCPU *cpu, target_ulong ptex, target_ulong avpn, target_ulong flags, target_ulong *vp, target_ulong *rp) { CPUPPCState *env = &cpu->env; uint64_t token; target_ulong v...
26,951
qemu
2572b37a4751cc967582d7d04f21d9bf97187ae5
0
static void bdrv_aio_co_cancel_em(BlockDriverAIOCB *blockacb) { BlockDriverAIOCBCoroutine *acb = container_of(blockacb, BlockDriverAIOCBCoroutine, common); bool done = false; acb->done = &done; while (!done) { qemu_aio_wait(); } }
26,952
qemu
69970fcef937bddd7f745efe39501c7716fdfe56
0
static uint64_t vfio_rtl8168_window_quirk_read(void *opaque, hwaddr addr, unsigned size) { VFIOQuirk *quirk = opaque; VFIOPCIDevice *vdev = quirk->vdev; switch (addr) { case 4: /* address */ if (quirk->data.flags) { trace_vfio_...
26,954
qemu
7059384c7e27d68c502d8636eb711873a9a6a597
0
static void init_event_facility(Object *obj) { SCLPEventFacility *event_facility = EVENT_FACILITY(obj); DeviceState *sdev = DEVICE(obj); /* Spawn a new bus for SCLP events */ qbus_create_inplace(&event_facility->sbus, sizeof(event_facility->sbus), TYPE_SCLP_EVENTS_BUS, sd...
26,955
FFmpeg
0d194ee51ed477f843900e657a7edbcbecdffa42
0
static void vc1_decode_b_mb_intfi(VC1Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp = 0; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type...
26,956
FFmpeg
9f61abc8111c7c43f49ca012e957a108b9cc7610
0
static int hls_window(AVFormatContext *s, int last) { HLSContext *hls = s->priv_data; ListEntry *en; int64_t target_duration = 0; int ret = 0; AVIOContext *out = NULL; char temp_filename[1024]; int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - hls->size); snprintf(...
26,957
qemu
7f61f4690dd153be98900a2a508b88989e692753
0
pvscsi_dbg_dump_tx_rings_config(PVSCSICmdDescSetupRings *rc) { int i; trace_pvscsi_tx_rings_ppn("Rings State", rc->ringsStatePPN); trace_pvscsi_tx_rings_num_pages("Request Ring", rc->reqRingNumPages); for (i = 0; i < rc->reqRingNumPages; i++) { trace_pvscsi_tx_rings_ppn("Request Ring", r...
26,958
qemu
7e01376daea75e888c370aab521a7d4aeaf2ffd1
0
void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1, uint32_t ipb) { int cssid, ssid, schid, m; SubchDev *sch; ORB orig_orb, orb; uint64_t addr; int ret = -ENODEV; int cc; CPUS390XState *env = &cpu->env; uint8_t ar; addr = decode_basedisp_s(env, ipb, &ar); if (addr &...
26,959
FFmpeg
1c7a0161538a9e8417086759a5d6d3295337c433
0
static av_cold int imc_decode_init(AVCodecContext *avctx) { int i, j, ret; IMCContext *q = avctx->priv_data; double r1, r2; if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1) || (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) { av_log_ask_for_sample(av...
26,960
qemu
c650c008e326f3a1e84083bc269265456057a212
0
static void setup_frame(int sig, struct target_sigaction *ka, target_sigset_t *set, CPUPPCState *env) { struct target_sigframe *frame; struct target_sigcontext *sc; target_ulong frame_addr, newsp; int err = 0; int signal; frame_addr = get_sigframe(ka, env, sizeo...
26,961
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
void aio_context_ref(AioContext *ctx) { g_source_ref(&ctx->source); }
26,962
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static uint64_t mv88w8618_audio_read(void *opaque, target_phys_addr_t offset, unsigned size) { mv88w8618_audio_state *s = opaque; switch (offset) { case MP_AUDIO_PLAYBACK_MODE: return s->playback_mode; case MP_AUDIO_CLOCK_DIV: return s->clo...
26,963
qemu
f8b6cc0070aab8b75bd082582c829be1353f395f
0
static void free_drive(DeviceState *dev, Property *prop) { DriveInfo **ptr = qdev_get_prop_ptr(dev, prop); if (*ptr) { blockdev_auto_del((*ptr)->bdrv); } }
26,964
qemu
e48e84ea80cb2e7fe6e48196ce187cfba6e3eb2c
0
void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense) { SCSIRequest *req; while (!QTAILQ_EMPTY(&sdev->requests)) { req = QTAILQ_FIRST(&sdev->requests); scsi_req_cancel(req); } sdev->unit_attention = sense; }
26,966
qemu
dd673288a8ff73ad77fcc1c255486d2466a772e1
0
uint64_t cpu_get_apic_base(DeviceState *d) { if (d) { APICCommonState *s = APIC_COMMON(d); trace_cpu_get_apic_base((uint64_t)s->apicbase); return s->apicbase; } else { trace_cpu_get_apic_base(0); return 0; } }
26,967
qemu
a91246c95f913dc6fd391eee32f6c9796de70183
0
static int ram_save_complete(QEMUFile *f, void *opaque) { rcu_read_lock(); if (!migration_in_postcopy(migrate_get_current())) { migration_bitmap_sync(); } ram_control_before_iterate(f, RAM_CONTROL_FINISH); /* try transferring iterative blocks of memory */ /* flush all rem...
26,968
qemu
5d7fd045cafeac1831c1999cb9e1251b7906c6b2
0
uint32_t HELPER(lpxbr)(CPUS390XState *env, uint32_t f1, uint32_t f2) { CPU_QuadU v1; CPU_QuadU v2; v2.ll.upper = env->fregs[f2].ll; v2.ll.lower = env->fregs[f2 + 2].ll; v1.q = float128_abs(v2.q); env->fregs[f1].ll = v1.ll.upper; env->fregs[f1 + 2].ll = v1.ll.lower; return set_...
26,970
qemu
364031f17932814484657e5551ba12957d993d7e
0
static int v9fs_synth_statfs(FsContext *s, V9fsPath *fs_path, struct statfs *stbuf) { stbuf->f_type = 0xABCD; stbuf->f_bsize = 512; stbuf->f_blocks = 0; stbuf->f_files = v9fs_synth_node_count; stbuf->f_namelen = NAME_MAX; return 0; }
26,972
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void m5206_mbar_writew(void *opaque, target_phys_addr_t offset, uint32_t value) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset >= 0x200) { hw_error("Bad MBAR write offset 0x%x", (int)offset); } widt...
26,973
qemu
149f54b53b7666a3facd45e86eece60ce7d3b114
0
hwaddr memory_region_section_get_iotlb(CPUArchState *env, MemoryRegionSection *section, target_ulong vaddr, hwaddr paddr, ...
26,974
qemu
d57e4e482e3997b1382625c84149ad0b69155fc0
0
static void term_init(void) { struct termios tty; tcgetattr (0, &tty); oldtty = tty; tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP |INLCR|IGNCR|ICRNL|IXON); tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); tty.c_cflag &= ~(CSIZE|PARENB)...
26,975
qemu
f41389ae3c54bd5e2040e3f95a2872981c3ed965
0
static void xics_kvm_realize(DeviceState *dev, Error **errp) { KVMXICSState *icpkvm = KVM_XICS(dev); XICSState *icp = XICS_COMMON(dev); int i, rc; Error *error = NULL; struct kvm_create_device xics_create_device = { .type = KVM_DEV_TYPE_XICS, .flags = 0, }; if (!k...
26,976
FFmpeg
5eb765ef341c3ec1bea31914c897750f88476ede
1
static int http_prepare_data(HTTPContext *c, long cur_time) { int i; switch(c->state) { case HTTPSTATE_SEND_DATA_HEADER: memset(&c->fmt_ctx, 0, sizeof(c->fmt_ctx)); pstrcpy(c->fmt_ctx.author, sizeof(c->fmt_ctx.author), c->stream->author); pstrcpy(c->fmt_ctx.comment, sizeof(c...
26,977
qemu
df8bf7a7fe75eb5d5caffa55f5cd4292b757aea6
1
void net_rx_pkt_dump(struct NetRxPkt *pkt) { #ifdef NET_RX_PKT_DEBUG assert(pkt); printf("RX PKT: tot_len: %d, vlan_stripped: %d, vlan_tag: %d\n", pkt->tot_len, pkt->vlan_stripped, pkt->tci); #endif }
26,978
FFmpeg
bb29fee3a6a289f6b191177098ddce3720d8c417
1
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt) { BinkContext * const c = avctx->priv_data; GetBitContext gb; int blk; int i, j, plane, plane_idx, bx, by; uint8_t *dst, *prev, *ref, *ref_start, *ref_end; int v, col[2]; const uint8_t *scan; ...
26,979
qemu
cab4888136a92250fdd401402622824994f7ce0b
1
static void gen_msa_elm_df(CPUMIPSState *env, DisasContext *ctx, uint32_t df, uint32_t n) { #define MASK_MSA_ELM(op) (MASK_MSA_MINOR(op) | (op & (0xf << 22))) uint8_t ws = (ctx->opcode >> 11) & 0x1f; uint8_t wd = (ctx->opcode >> 6) & 0x1f; TCGv_i32 tws = tcg_const_i32(ws); TCGv_i32 t...
26,980
FFmpeg
0ecca7a49f8e254c12a3a1de048d738bfbb614c6
1
static int png_write_row(PNGContext *s, const uint8_t *data, int size) { int ret; s->zstream.avail_in = size; s->zstream.next_in = (uint8_t *)data; while (s->zstream.avail_in > 0) { ret = deflate(&s->zstream, Z_NO_FLUSH); if (ret != Z_OK) return -1; if (s->...
26,981
qemu
5e52e5f903b2648c59030637e1610b32e965d615
1
static uint32_t get_features(VirtIODevice *vdev, uint32_t features) { VirtIOSerial *vser; vser = DO_UPCAST(VirtIOSerial, vdev, vdev); if (vser->bus->max_nr_ports > 1) { features |= (1 << VIRTIO_CONSOLE_F_MULTIPORT); } return features; }
26,982
FFmpeg
2caf19e90f270abe1e80a3e85acaf0eb5c9d0aac
1
static void FUNCC(pred4x4_127_dc)(uint8_t *_src, const uint8_t *topright, int _stride){ pixel *src = (pixel*)_src; int stride = _stride/sizeof(pixel); ((pixel4*)(src+0*stride))[0]= ((pixel4*)(src+1*stride))[0]= ((pixel4*)(src+2*stride))[0]= ((pixel4*)(src+3*stride))[0]= PIXEL_SPLAT_X4((1<<...
26,985
FFmpeg
2bfa067d0b636e7b2004fb0ad5a53d0d48c6de32
1
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx) { VAAPIEncodeContext *ctx = avctx->priv_data; VAAPIEncodePicture *pic, *next; for (pic = ctx->pic_start; pic; pic = next) { next = pic->next; vaapi_encode_free(avctx, pic); } if (ctx->va_context != VA_INVALID_ID) ...
26,986
FFmpeg
ed1c83508ec920bfef773e3aa3ac1764a65826ec
0
static int trim_filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; TrimContext *s = ctx->priv; int drop; /* drop everything if EOF has already been returned */ if (s->eof) { av_frame_free(&frame); return 0; } if (s->st...
26,989
FFmpeg
13a099799e89a76eb921ca452e1b04a7a28a9855
0
static void RENAME(yuv2rgb32_2)(SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, ...
26,990
FFmpeg
43abef9fde0cf87153cc9031cad61f75b02cfa01
0
static int read_line(AVIOContext * pb, char* line, int bufsize) { int i; for (i = 0; i < bufsize - 1; i++) { int b = avio_r8(pb); if (b == 0) break; if (b == '\n') { line[i] = '\0'; return 0; } line[i] = b; } line[i...
26,991
FFmpeg
0e3dacb11eacf6a944691bb4a12f4dd56b6d7ce6
0
static int tiff_decode_tag(TiffContext *s) { unsigned tag, type, count, off, value = 0; int i, j, k, pos, start; int ret; uint32_t *pal; double *dp; tag = tget_short(&s->gb, s->le); type = tget_short(&s->gb, s->le); count = tget_long(&s->gb, s->le); off = tget_long(&...
26,992
FFmpeg
28b9ac4e48f3405a82e8e87ead336188215cf1e6
1
void av_log_default_callback(void *avcl, int level, const char *fmt, va_list vl) { static int print_prefix = 1; static int count; static char prev[1024]; char line[1024]; static int is_atty; AVClass* avc = avcl ? *(AVClass **) avcl : NULL; int tint = av_clip(level >> 8, 0, 256); ...
26,994
qemu
970311646a701eecb103eb28093e8924d2fa6861
1
void block_job_completed(BlockJob *job, int ret) { BlockDriverState *bs = job->bs; assert(bs->job == job); job->cb(job->opaque, ret); bs->job = NULL; bdrv_op_unblock_all(bs, job->blocker); error_free(job->blocker); g_free(job); }
26,995
qemu
b4ba67d9a702507793c2724e56f98e9b0f7be02b
1
static void set_tco_timeout(const TestData *d, uint16_t ticks) { qpci_io_writew(d->dev, d->tco_io_base + TCO_TMR, ticks); }
26,996
qemu
21ef45d71221b4577330fe3aacfb06afad91ad46
1
int vnc_display_password(DisplayState *ds, const char *password) { VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display; if (!vs) { return -EINVAL; } if (!password) { /* This is not the intention of this interface but err on the side of being safe */ ...
26,998
qemu
348295838384941d1e5420d10e57366c4e303d45
0
static void data_plane_remove_op_blockers(VirtIOBlockDataPlane *s) { if (s->blocker) { blk_op_unblock_all(s->conf->conf.blk, s->blocker); error_free(s->blocker); s->blocker = NULL; } }
26,999
qemu
74475455442398a64355428b37422d14ccc293cb
0
static int no_run_in (HWVoiceIn *hw) { NoVoiceIn *no = (NoVoiceIn *) hw; int live = audio_pcm_hw_get_live_in (hw); int dead = hw->samples - live; int samples = 0; if (dead) { int64_t now = qemu_get_clock (vm_clock); int64_t ticks = now - no->old_ticks; int64_t byte...
27,001
qemu
95251725e335af2b885e2ab33dd29c86f8084663
0
int vfio_region_setup(Object *obj, VFIODevice *vbasedev, VFIORegion *region, int index, const char *name) { struct vfio_region_info *info; int ret; ret = vfio_get_region_info(vbasedev, index, &info); if (ret) { return ret; } region->vbasedev = vbasedev;...
27,002
qemu
d1fdf257d52822695f5ace6c586e059aa17d4b79
0
static ssize_t nbd_co_send_reply(NBDRequestData *req, NBDReply *reply, int len) { NBDClient *client = req->client; ssize_t rc, ret; g_assert(qemu_in_coroutine()); qemu_co_mutex_lock(&client->send_lock); client->send_coroutine = qemu_coroutine_self(); ...
27,003
qemu
3dc6f8693694a649a9c83f1e2746565b47683923
0
static void kzm_init(MachineState *machine) { IMX31KZM *s = g_new0(IMX31KZM, 1); unsigned int ram_size; unsigned int alias_offset; unsigned int i; object_initialize(&s->soc, sizeof(s->soc), TYPE_FSL_IMX31); object_property_add_child(OBJECT(machine), "soc", OBJECT(&s->soc), ...
27,004