Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
qemu | gdbstub.c | static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)
{
#if defined(TARGET_I386)
cpu_synchronize_state(s->c_cpu);
s->c_cpu->eip = pc;
#elif defined(TARGET_PPC)
s->c_cpu->nip = pc;
#elif defined(TARGET_SPARC)
s->c_cpu->npc = pc + 4;
#elif defined(TARGET_ARM)
s->c_cpu->regs[15] = pc;
#elif defined... | [
1,
0
] |
FFmpeg | doc/APIchanges | av_cold int avcodec_close(AVCodecContext *avctx)
{
/* If there is a user-supplied mutex locking routine, call it. */
if (ff_lockmgr_cb) {
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))
return -1;
}
entangled_thread_counter++;
if (entangled_thread_counter != 1) {
av_log(avctx, AV_LOG... | [
1,
0
] |
FFmpeg | libavcodec/a64multienc.c | static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
{
DVVideoContext *s = avctx->priv_data;
FDCTDSPContext fdsp;
MECmpContext mecc;
PixblockDSPContext pdsp;
int ret;
s->sys = av_dv_codec_profile(avctx->width, avctx->height, avctx->pix_fmt);
if (!s->sys) {
av_log(avctx, AV_LOG_ERROR,... | [
1,
0
] |
qemu | hw/ppc/spapr.c | void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t window_size, int *pfd)
{
struct kvm_create_spapr_tce args = {
.liobn = liobn,
.window_size = window_size,
};
long len;
int fd;
void *table;
/* Must set fd to -1 so we don't try to munmap when called for
* destroying the table, w... | [
1,
1
] |
qemu | block/qed.c | static void bdrv_qed_invalidate_cache(BlockDriverState *bs, Error **errp)
{
BDRVQEDState *s = bs->opaque;
Error *local_err = NULL;
int ret;
bdrv_qed_close(bs);
memset(s, 0, sizeof(BDRVQEDState));
ret = bdrv_qed_do_open(bs, NULL, bs->open_flags, &local_err);
if (local_err) {
error_propagate(er... | [
1,
0
] |
qemu | hw/spapr_hcall.c | void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn)
{
spapr_hcall_fn *slot;
if (opcode <= MAX_HCALL_OPCODE) {
assert((opcode & 0x3) == 0);
slot = &papr_hypercall_table[opcode / 4];
} else {
assert((opcode >= KVMPPC_HCALL_BASE) && (opcode <= KVMPPC_HCALL_MAX));
slot = &kvm... | [
0,
0
] |
qemu | block.c | static BlockAIOCB *bdrv_co_aio_rw_vector(BlockDriverState *bs,
int64_t sector_num,
QEMUIOVector *qiov,
int nb_sectors,
BdrvRequestFlags flags,
... | [
0,
0
] |
qemu | async.c | static void bh_run_aio_completions(void *opaque)
{
QEMUBH **bh = opaque;
qemu_bh_delete(*bh);
qemu_free(bh);
qemu_aio_process_queue();
} | [
0,
0
] |
qemu | cpu-exec.c | static void tcg_handle_interrupt(CPUState *cpu, int mask)
{
int old_mask;
old_mask = cpu->interrupt_request;
cpu->interrupt_request |= mask;
/*
* If called from iothread context, wake the target cpu in
* case its halted.
*/
if (!qemu_cpu_is_self(cpu)) {
qemu_cpu_kick(cpu);
return;
... | [
1,
0
] |
FFmpeg | libavcodec/vc9.c | static int advanced_decode_picture_secondary_header(VC9Context *v)
{
GetBitContext *gb = &v->s.gb;
int index, status = 0;
switch (v->s.pict_type)
{
case P_TYPE:
status = decode_p_picture_secondary_header(v);
break;
case B_TYPE:
status = decode_b_picture_secondary_header(v);
break;
... | [
1,
0
] |
FFmpeg | libavfilter/vf_overlay.c | static void start_frame_overlay(AVFilterLink *inlink,
AVFilterBufferRef *inpicref)
{
AVFilterContext *ctx = inlink->dst;
OverlayContext *over = ctx->priv;
inpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,
ctx->outputs[0... | [
1,
0
] |
qemu | exec.c | static void reclaim_ramblock(RAMBlock *block)
{
if (block->flags & RAM_PREALLOC) {
;
} else if (xen_enabled()) {
xen_invalidate_map_cache_entry(block->host);
#ifndef _WIN32
} else if (block->fd >= 0) {
munmap(block->host, block->max_length);
close(block->fd);
#endif
} else {
qemu... | [
1,
0
] |
qemu | default-configs/i386-softmmu.mak | int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
{
/* On non-x86 we don't do PCI hotplug */
monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
return -1;
} | [
1,
0
] |
qemu | block-migration.c | int bdrv_in_use(BlockDriverState *bs)
{
return bs->in_use;
} | [
0,
0
] |
qemu | tcg/sparc/tcg-target.c | static inline void tcg_out_addi(TCGContext *s, int reg, tcg_target_long val)
{
if (val != 0) {
if (val == (val & 0xfff))
tcg_out_arithi(s, reg, reg, val, ARITH_ADD);
else
fprintf(stderr, "unimplemented addi %ld\n", (long)val);
}
} | [
0,
0
] |
qemu | block.c | int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
trace_bdrv_co_readv(bs, sector_num, nb_sectors);
return bdrv_co_do_readv(bs, sector_num, nb_sectors, qiov, 0);
} | [
0,
0
] |
qemu | hmp.c | static void test_qemu_strtosz_float(void)
{
const char *str = "12.345M";
char *endptr = NULL;
int64_t res;
res = qemu_strtosz(str, &endptr);
g_assert_cmpint(res, ==, 12.345 * M_BYTE);
g_assert(endptr == str + 7);
} | [
0,
0
] |
qemu | block/linux-aio.c | static BlockAIOCB *
raw_aio_submit(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque, int type)
{
BDRVRawState *s = bs->opaque;
if (fd_open(bs) < 0)
return NULL;
/*
* Check if the underlying device requi... | [
0,
0
] |
qemu | hw/s390x/css.c | void kvm_s390_interrupt_internal(S390CPU *cpu, int type, uint32_t parm,
uint64_t parm64, int vm)
{
CPUState *cs = CPU(cpu);
struct kvm_s390_interrupt kvmint;
int r;
if (!cs->kvm_state) {
return;
}
kvmint.type = type;
kvmint.parm = parm;
kvmint.parm64 = parm... | [
0,
0
] |
qemu | linux-user/elfload.c | static unsigned long copy_strings(int argc, char **argv, unsigned long *page,
unsigned long p)
{
char *tmp, *tmp1, *pag = NULL;
int len, offset = 0;
if (!p) {
return 0; /* bullet-proofing */
}
while (argc-- > 0) {
if (!(tmp1 = tmp = get_user(argv + argc))) {
... | [
0,
0
] |
qemu | HACKING | void mmio_ide_init(target_phys_addr_t membase, target_phys_addr_t membase2,
MemoryRegion *address_space,
qemu_irq irq, int shift,
DriveInfo *hd0, DriveInfo *hd1)
{
MMIOState *s = g_malloc0(sizeof(MMIOState));
ide_init2_with_non_qdev_drives(&s->bus, hd0,... | [
0,
0
] |
FFmpeg | libavcodec/proresdec2.c | static int decode_slice_luma(AVCodecContext *avctx, SliceContext *slice,
uint16_t *dst, int dst_stride,
const uint8_t *buf, unsigned buf_size,
const int16_t *qmat)
{
ProresContext *ctx = avctx->priv_data;
LOCAL_ALIGNED_16(i... | [
1,
0
] |
qemu | block/io.c | static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags) {
BlockDriver *drv = bs->drv;
int64_t sector_num;
unsigned int nb_sectors;
int ret;
if (drv-... | [
1,
0
] |
qemu | configure | static int vnc_tls_initialize(void)
{
static int tlsinitialized = 0;
if (tlsinitialized)
return 1;
if (gnutls_global_init() < 0)
return 0;
/* XXX ought to re-generate diffie-hellman params periodically */
if (gnutls_dh_params_init(&dh_params) < 0)
return 0;
if (gnutls_dh_params_generat... | [
1,
1
] |
qemu | hw/usb/dev-storage.c | static void usb_msd_realize_storage(USBDevice *dev, Error **errp)
{
MSDState *s = DO_UPCAST(MSDState, dev, dev);
BlockDriverState *bs = s->conf.bs;
SCSIDevice *scsi_dev;
Error *err = NULL;
if (!bs) {
error_setg(errp, "drive property not set");
return;
}
blkconf_serial(&s->conf, &dev->seri... | [
1,
1
] |
qemu | hw/core/qdev-properties-system.c | void qdev_prop_set_drive(DeviceState *dev, const char *name,
BlockBackend *value, Error **errp)
{
object_property_set_str(OBJECT(dev), value ? blk_name(value) : "",
name, errp);
} | [
1,
0
] |
FFmpeg | libavcodec/h264pred_template.c | static void FUNCC(pred16x16_horizontal)(uint8_t *_src, int stride) {
int i;
pixel *src = (pixel *)_src;
stride /= sizeof(pixel);
for (i = 0; i < 16; i++) {
((pixel4 *)(src + i * stride))[0] =
((pixel4 *)(src + i * stride))[1] =
((pixel4 *)(src + i * stride))[2] =
... | [
1,
0
] |
qemu | hw/virtio/virtio.c | static void virtio_queue_host_notifier_read(EventNotifier *n)
{
VirtQueue *vq = container_of(n, VirtQueue, host_notifier);
if (event_notifier_test_and_clear(n)) {
virtio_queue_notify_vq(vq);
}
} | [
1,
0
] |
qemu | hw/arm_gic.c | static struct scoop_info_s *spitz_scoop_init(struct pxa2xx_state_s *cpu,
int count) {
int iomemtype;
struct scoop_info_s *s;
s = (struct scoop_info_s *)
qemu_mallocz(sizeof(struct scoop_info_s) * 2);
memset(s, 0, sizeof(struct scoop_info_s) * count);
s... | [
1,
0
] |
qemu | hw/ipmi/ipmi_bmc_sim.c | static void rearm_sensor_evts(IPMIBmcSim *ibs,
uint8_t *cmd, unsigned int cmd_len,
uint8_t *rsp, unsigned int *rsp_len,
unsigned int max_rsp_len)
{
IPMISensor *sens;
IPMI_CHECK_CMD_LEN(4);
if ((cmd[2] >= MAX_SENSORS) ... | [
1,
0
] |
FFmpeg | libavcodec/flacenc.c | static uint32_t find_subframe_rice_params(FlacEncodeContext *s,
FlacSubframe *sub, int pred_order)
{
int pmin = get_max_p_order(s->options.min_partition_order,
s->frame.blocksize, pred_order);
int pmax = get_max_p_order(s->options.max_parti... | [
1,
0
] |
FFmpeg | Makefile | const char *avformat_configuration(void)
{
return FFMPEG_CONFIGURATION;
} | [
0,
0
] |
FFmpeg | libavfilter/framesync.c | int ff_framesync_dualinput_get_writable(FFFrameSync *fs, AVFrame **f0,
AVFrame **f1)
{
int ret;
ret = ff_framesync_dualinput_get(fs, f0, f1);
if (ret < 0)
return ret;
ret = ff_inlink_make_frame_writable(fs->parent->inputs[0], f0);
if (ret < 0) {
av_frame... | [
0,
0
] |
qemu | tests/e1000e-test.c | static uint8_t qvirtio_pci_get_status(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);
} | [
1,
0
] |
qemu | hw/loader.c | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz,
int bswap_needed, target_phys_addr_t target_page_size)
{
int fd, size, ret;
struct exec e;
uint32_t magic;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, &e, sizeof(e));
i... | [
1,
0
] |
FFmpeg | libavcodec/bmp.c | int ff_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
{
int i;
for (i = 0; i < 256; i++) {
int r, g, b;
switch (pix_fmt) {
case AV_PIX_FMT_RGB8:
r = (i >> 5) * 36;
g = ((i >> 2) & 7) * 36;
b = (i & 3) * 85;
break;
case AV_PIX_FMT_BGR8:
b ... | [
1,
0
] |
qemu | hw/virtio/vhost.c | static bool vhost_section(MemoryRegionSection *section)
{
return memory_region_is_ram(section->mr);
} | [
1,
0
] |
FFmpeg | libavcodec/dfa.c | static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width,
int height)
{
const uint8_t *frame_end = frame + width * height;
uint8_t *line_ptr;
int count, i, v, lines, segments;
lines = bytestream2_get_le16(gb);
if (lines > height)
return -1;
while (lines--) {
... | [
1,
0
] |
qemu | HACKING | static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
switch (size) {
case 1:
fw_cfg_write(opaque, (uint8_t)value);
break;
case 2:
fw_cfg_select(opaque, (uint16_t)value);
break;
}
} | [
1,
0
] |
qemu | hw/virtio-pci.c | void virtio_queue_notify(VirtIODevice *vdev, int n)
{
if (n < VIRTIO_PCI_QUEUE_MAX && vdev->vq[n].vring.desc) {
trace_virtio_queue_notify(vdev, n, &vdev->vq[n]);
vdev->vq[n].handle_output(vdev, &vdev->vq[n]);
}
} | [
1,
0
] |
qemu | hw/lsi53c895a.c | static void lsi_command_complete(SCSIRequest *req, uint32_t status,
size_t resid)
{
LSIState *s = DO_UPCAST(LSIState, dev.qdev, req->bus->qbus.parent);
int out;
out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
DPRINTF("Command complete status=%d\n", (int)status);
s->status = ... | [
1,
0
] |
qemu | cpu-exec.c | static unsigned int dec_move_pm(DisasContext *dc)
{
TCGv t0;
int memsize;
memsize = preg_sizes[dc->op2];
DIS(fprintf(logfile, "move.%c $p%u, [$r%u%s\n",
memsize_char(memsize),
dc->op2, dc->op1, dc->postinc ? "+]" : "]"));
/* prepare store. Address in T0, value in T1. */
... | [
1,
0
] |
qemu | hmp.c | static void test_event_d(TestEventData *data,
const void *unused)
{
UserDefOne struct1;
EventStructOne a;
UserDefZero z;
QDict *d, *d_data, *d_a, *d_struct1;
z.integer = 2;
struct1.base = &z;
struct1.string = g_strdup("test1");
struct1.has_enum1 = true;
struct1.enum... | [
0,
0
] |
qemu | linux-user/qemu.h | long do_sigreturn(CPUSH4State *regs)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_sigset_t target_set;
target_ulong r0;
int i;
int err = 0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_sigreturn\n");
#endif
frame_addr = regs->gregs[15];
if (!lock_user... | [
1,
0
] |
qemu | block/block-backend.c | static void spapr_create_nvram(sPAPREnvironment *spapr)
{
DeviceState *dev = qdev_create(&spapr->vio_bus->bus, "spapr-nvram");
DriveInfo *dinfo = drive_get(IF_PFLASH, 0, 0);
if (dinfo) {
qdev_prop_set_drive_nofail(dev, "drive",
blk_bs(blk_by_legacy_dinfo(dinfo)));
}
q... | [
0,
0
] |
qemu | block.c | void qmp_block_dirty_bitmap_remove(const char *node, const char *name,
Error **errp)
{
AioContext *aio_context;
BlockDriverState *bs;
BdrvDirtyBitmap *bitmap;
bitmap = block_dirty_bitmap_lookup(node, name, &bs, &aio_context, errp);
if (!bitmap || !bs) {
return;
... | [
0,
0
] |
qemu | block.c | static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {
return -EIO;
}
return bdrv_check_byte_request(bs, sector_num * BDRV_SECTOR_SIZE,
nb_sect... | [
1,
0
] |
qemu | darwin-user/main.c | static inline void gen_evsel(DisasContext *ctx)
{
if (unlikely(!ctx->spe_enabled)) {
RET_EXCP(ctx, EXCP_NO_SPE, 0);
return;
}
gen_op_load_crf_T0(ctx->opcode & 0x7);
gen_op_load_gpr64_T0(rA(ctx->opcode));
gen_op_load_gpr64_T1(rB(ctx->opcode));
gen_op_evsel();
gen_op_store_T0_gpr64(rD(ctx->... | [
0,
0
] |
FFmpeg | libavcodec/hevc.c | static int set_sps(HEVCContext *s, const HEVCSPS *sps)
{
#define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + CONFIG_HEVC_D3D11VA_HWACCEL)
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
int ret;
export_stream_params(s->avctx, &s->ps, sps);
pic_arrays_free(s);
ret = pic_arrays_init(s, sps);
... | [
1,
0
] |
FFmpeg | cmdutils.c | void uninit_opts(void)
{
int i;
for (i = 0; i < AVMEDIA_TYPE_NB; i++)
av_freep(&avcodec_opts[i]);
av_freep(&avformat_opts->key);
av_freep(&avformat_opts);
#if CONFIG_SWSCALE
av_freep(&sws_opts);
#endif
for (i = 0; i < opt_name_count; i++) {
// opt_values are only stored for codec-specific... | [
0,
0
] |
qemu | block.c | int bdrv_set_key(BlockDriverState *bs, const char *key)
{
int ret;
if (bs->backing_hd && bs->backing_hd->encrypted) {
ret = bdrv_set_key(bs->backing_hd, key);
if (ret < 0)
return ret;
if (!bs->encrypted)
return 0;
}
if (!bs->encrypted) {
return -EINVAL;
} else if (!bs->d... | [
1,
0
] |
qemu | hw/display/framebuffer.c | static void pxa2xx_lcdc_dma0_redraw_rot270(PXA2xxLCDState *s,
hwaddr addr, int *miny, int *maxy)
{
DisplaySurface *surface = qemu_console_surface(s->con);
int src_width, dest_width;
drawfn fn = NULL;
if (s->dest_width) {
fn = s->line_fn[s->transp][s->bpp];
... | [
1,
0
] |
qemu | tcg/aarch64/tcg-target.inc.c | static void tci_out_label(TCGContext *s, TCGLabel *label)
{
if (label->has_value) {
tcg_out_i(s, label->u.value);
assert(label->u.value);
} else {
tcg_out_reloc(s, s->code_ptr, sizeof(tcg_target_ulong), label, 0);
s->code_ptr += sizeof(tcg_target_ulong);
}
} | [
1,
0
] |
qemu | target-mips/cpu.h | target_ulong helper_rdhwr_cpunum(CPUMIPSState *env)
{
if ((env->hflags & MIPS_HFLAG_CP0) ||
(env->CP0_HWREna & (1 << 0)))
return env->CP0_EBase & 0x3ff;
else
do_raise_exception(env, EXCP_RI, GETPC());
return 0;
} | [
1,
0
] |
qemu | hw/net/virtio-net.c | void qemu_peer_set_offload(NetClientState *nc, int csum, int tso4, int tso6,
int ecn, int ufo)
{
if (!nc->peer || !nc->peer->info->set_offload) {
return;
}
nc->peer->info->set_offload(nc->peer, csum, tso4, tso6, ecn, ufo);
} | [
1,
0
] |
FFmpeg | libavcodec/libopencore-amr.c | static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AMRWBContext *s = avctx->priv_data;
int mode;
int packet_size;
static const uint8_t block_size[16] = {18, ... | [
1,
0
] |
qemu | hw/msix.c | uint32_t msix_bar_size(PCIDevice *dev)
{
return (dev->cap_present & QEMU_PCI_CAP_MSIX) ?
dev->msix_bar_size
: 0;
} | [
0,
0
] |
qemu | hw/gumstix.c | static void connex_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
struct pxa2xx_state_s *cpu;
int index;
... | [
1,
0
] |
qemu | hw/intc/arm_gic.c | int armv7m_nvic_acknowledge_irq(void *opaque)
{
nvic_state *s = (nvic_state *)opaque;
uint32_t irq;
irq = gic_acknowledge_irq(&s->gic, 0);
if (irq == 1023)
hw_error("Interrupt but no vector\n");
if (irq >= 32)
irq -= 16;
return irq;
} | [
0,
0
] |
qemu | include/exec/memory.h | static FlatView *address_space_get_flatview(AddressSpace *as)
{
FlatView *view;
qemu_mutex_lock(&flat_view_mutex);
view = as->current_map;
flatview_ref(view);
qemu_mutex_unlock(&flat_view_mutex);
return view;
} | [
0,
0
] |
FFmpeg | libavcodec/qdm2.c | static int qdm2_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
QDM2Context *s = avctx->priv_data;
if ((buf == NULL) || (buf_size < s->checksum_size))
return 0;
*data_size = s->channels * s->frame_si... | [
1,
0
] |
qemu | block/block-backend.c | static void bdrv_sync_complete(void *opaque, int ret)
{
/* do nothing. Masters do not directly interact with the backing store,
* only the working copy so no mutexing required.
*/
} | [
0,
0
] |
qemu | hw/net/e1000.c | set_phy_ctrl(E1000State *s, int index, uint16_t val)
{
/*
* QEMU 1.3 does not support link auto-negotiation emulation, so if we
* migrate during auto negotiation, after migration the link will be
* down.
*/
if (!(s->compat_flags & E1000_FLAG_AUTONEG)) {
return;
}
if ((val & MII_CR_AUTO_... | [
0,
0
] |
qemu | Makefile.objs | void qjson_finish(QJSON *json)
{
json_end_object(json);
} | [
0,
0
] |
qemu | qom/object.c | Object *object_dynamic_cast(Object *obj, const char *typename)
{
GSList *i;
/* Check if typename is a direct ancestor */
if (object_is_type(obj, typename)) {
return obj;
}
/* Check if obj has an interface of typename */
for (i = obj->interfaces; i; i = i->next) {
Interface *iface = i->data;
... | [
0,
0
] |
qemu | target/s390x/ioinst.c | void ioinst_handle_rchp(S390CPU *cpu, uint64_t reg1)
{
int cc;
uint8_t cssid;
uint8_t chpid;
int ret;
CPUS390XState *env = &cpu->env;
if (RCHP_REG1_RES(reg1)) {
program_interrupt(env, PGM_OPERAND, 2);
return;
}
cssid = RCHP_REG1_CSSID(reg1);
chpid = RCHP_REG1_CHPID(reg1);
trace_i... | [
0,
0
] |
FFmpeg | libavcodec/wmavoice.c | static int parse_packet_header(WMAVoiceContext *s)
{
GetBitContext *gb = &s->gb;
unsigned int res;
if (get_bits_left(gb) < 11)
return 1;
skip_bits(gb, 4); // packet sequence number
s->has_residual_lsps = get_bits1(gb);
do {
res = get_bits(gb, 6); // number of superframes per packet
// ... | [
0,
0
] |
qemu | hw/pci/msi.c | void msi_notify(PCIDevice *dev, unsigned int vector)
{
uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev));
bool msi64bit = flags & PCI_MSI_FLAGS_64BIT;
unsigned int nr_vectors = msi_nr_vectors(flags);
MSIMessage msg;
assert(vector < nr_vectors);
if (msi_is_masked(dev, vector)) {
ass... | [
1,
0
] |
qemu | block/nbd-client.c | int nbd_client_session_init(NbdClientSession *client, BlockDriverState *bs,
int sock, const char *export, Error **errp)
{
int ret;
/* NBD handshake */
logout("session init %s\n", export);
qemu_set_block(sock);
ret = nbd_receive_negotiate(sock, export,
... | [
0,
0
] |
qemu | configure | void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot,
qxl_async_io async)
{
if (async != QXL_SYNC) {
#if SPICE_INTERFACE_QXL_MINOR >= 1
spice_qxl_add_memslot_async(&ssd->qxl, memslot, 0);
#else
abort();
#endif
} else {
ssd->worker->add_memslot... | [
0,
0
] |
FFmpeg | cmdutils.c | int ffurl_register_protocol(URLProtocol *protocol)
{
URLProtocol **p;
p = &first_protocol;
while (*p != NULL)
p = &(*p)->next;
*p = protocol;
protocol->next = NULL;
return 0;
} | [
0,
0
] |
qemu | block.c | static int parse_block_size_shift(BDRVSheepdogState *s, QemuOpts *opt)
{
struct SheepdogInode *inode = &s->inode;
uint64_t object_size;
int obj_order;
object_size = qemu_opt_get_size_del(opt, BLOCK_OPT_OBJECT_SIZE, 0);
if (object_size) {
if ((object_size - 1) & object_size) { /* not a power of 2? *... | [
1,
0
] |
qemu | HACKING | static uint64_t mmio_ide_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
MMIOState *s = opaque;
addr >>= s->shift;
if (addr & 7)
return ide_ioport_read(&s->bus, addr);
else
return ide_data_readw(&s->bus, 0);
} | [
1,
0
] |
qemu | HACKING | static void dbdma_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
int channel = addr >> DBDMA_CHANNEL_SHIFT;
DBDMAState *s = opaque;
DBDMA_channel *ch = &s->channels[channel];
int reg = (addr - (channel << DBDMA_CHANNEL_SHIFT)) >> 2;
DBDMA_DPRINTF("... | [
1,
0
] |
FFmpeg | libavformat/rtp.c | static int rtp_write_header(AVFormatContext *s1)
{
RTPDemuxContext *s = s1->priv_data;
int payload_type, max_packet_size, n;
AVStream *st;
if (s1->nb_streams != 1)
return -1;
st = s1->streams[0];
payload_type = rtp_get_payload_type(st->codec);
if (payload_type < 0)
payload_type = RTP_PT_... | [
1,
0
] |
FFmpeg | libavcodec/v4l2_buffers.c | int ff_v4l2_context_dequeue_packet(V4L2Context *ctx, AVPacket *pkt)
{
V4L2Buffer *avbuf = NULL;
/* if we are draining, we are no longer inputing data, therefore enable a
* timeout so we can dequeue and flag the last valid buffer.
*
* blocks until:
* 1. encoded packet available
* 2. an input... | [
0,
0
] |
FFmpeg | libavcodec/ffv1.c | static av_cold int common_init(AVCodecContext *avctx) {
FFV1Context *s = avctx->priv_data;
s->avctx = avctx;
s->flags = avctx->flags;
avcodec_get_frame_defaults(&s->picture);
ff_dsputil_init(&s->dsp, avctx);
s->width = avctx->width;
s->height = avctx->height;
assert(s->width && s->height);
//... | [
1,
0
] |
qemu | acl.c | static SlirpState *slirp_lookup(Monitor *mon, const char *vlan,
const char *stack)
{
VLANClientState *vc;
if (vlan) {
vc = qemu_find_vlan_client_by_name(mon, strtol(vlan, NULL, 0), stack);
if (!vc) {
return NULL;
}
if (strcmp(vc->model, "user")) {
... | [
0,
0
] |
qemu | target-alpha/translate.c | static inline void gen_ins(DisasContext *s, TCGMemOp ot)
{
if (use_icount)
gen_io_start();
gen_string_movl_A0_EDI(s);
/* Note: we must do this dummy write first to be restartable in
case of page fault. */
tcg_gen_movi_tl(cpu_T[0], 0);
gen_op_st_v(s, ot, cpu_T[0], cpu_A0);
tcg_gen_trunc_tl_... | [
0,
0
] |
qemu | block/rbd.c | static void qemu_rbd_aio_event_reader(void *opaque)
{
BDRVRBDState *s = opaque;
ssize_t ret;
do {
char *p = (char *)&s->event_rcb;
/* now read the rcb pointer that was sent from a non qemu thread */
if ((ret = read(s->fds[RBD_FD_READ], p + s->event_reader_pos,
sizeof(s->eve... | [
1,
0
] |
FFmpeg | libavformat/matroska.c | matroska_parse_cluster(MatroskaDemuxContext *matroska)
{
int res = 0;
uint32_t id;
uint64_t cluster_time = 0;
uint8_t *data;
int64_t pos;
int size;
av_log(matroska->ctx, AV_LOG_DEBUG,
"parsing cluster at %" PRId64 "\n", url_ftell(&matroska->ctx->pb));
while (res == 0) {
if (!(id ... | [
0,
0
] |
FFmpeg | libavformat/rtpdec.c | void rtp_parse_close(RTPDemuxContext *s)
{
// TODO: fold this into the protocol specific data fields.
if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) {
ff_mpegts_parse_close(s->ts);
}
av_free(s);
} | [
1,
1
] |
FFmpeg | libavcodec/g723_1.c | static int scale_vector(int16_t *vector, int length)
{
int bits, max = 0;
int64_t scale;
int i;
for (i = 0; i < length; i++)
max = FFMAX(max, FFABS(vector[i]));
max = FFMIN(max, 0x7FFF);
bits = normalize_bits(max, 15);
scale = (bits == 15) ? 0x7FFF : (1 << bits);
for (i = 0; i < length; i+... | [
1,
0
] |
qemu | target-ppc/cpu.h | void do_subfe(void)
{
T0 = T1 + ~T0 + xer_ca;
if (likely(T0 >= T1 && (xer_ca == 0 || T0 != T1))) {
xer_ca = 0;
} else {
xer_ca = 1;
}
} | [
1,
0
] |
FFmpeg | libavcodec/cfhd.c | static av_cold int cfhd_decode_init(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
avctx->bits_per_raw_sample = 10;
s->avctx = avctx;
avctx->width = 0;
avctx->height = 0;
return ff_cfhd_init_vlcs(s);
} | [
0,
0
] |
FFmpeg | libavcodec/ac3dec.c | static inline void downmix_3f_2r_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] += (samples[i + 256] + samples[i + 768]);
samples[i + 256] = (samples[i + 512] + samples[i + 1024]);
samples[i + 512] = samples[i + 768] = samples[i + 1024] = 0;
}
} | [
0,
0
] |
qemu | block/mirror.c | static void mirror_write_complete(void *opaque, int ret)
{
MirrorOp *op = opaque;
MirrorBlockJob *s = op->s;
aio_context_acquire(blk_get_aio_context(s->common.blk));
if (ret < 0) {
BlockErrorAction action;
bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors);
action = mirro... | [
1,
0
] |
qemu | target/ppc/cpu.h | uint64_t kvmppc_hash64_read_pteg(PowerPCCPU *cpu, target_ulong pte_index)
{
int htab_fd;
struct kvm_get_htab_fd ghf;
struct kvm_get_htab_buf *hpte_buf;
ghf.flags = 0;
ghf.start_index = pte_index;
htab_fd = kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &ghf);
if (htab_fd < 0) {
goto error_out;
... | [
1,
0
] |
qemu | block/qcow2-cluster.c | static coroutine_fn int qcow2_co_pwrite_zeroes(BlockDriverState *bs,
int64_t offset, int count,
BdrvRequestFlags flags)
{
int ret;
BDRVQcow2State *s = bs->opaque;
uint32_t head = offset % s->cluster_size;
uint32_... | [
1,
0
] |
qemu | hw/i386/acpi-build.c | static void build_pci_bus_state_init(AcpiBuildPciBusHotplugState *state,
AcpiBuildPciBusHotplugState *parent,
bool pcihp_bridge_en)
{
state->parent = parent;
state->device_table = build_alloc_array();
state->notify_table = build_alloc... | [
0,
0
] |
qemu | cpu-exec-common.c | void s390x_cpu_debug_excp_handler(CPUState *cs)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
CPUWatchpoint *wp_hit = cs->watchpoint_hit;
if (wp_hit && wp_hit->flags & BP_CPU) {
/* FIXME: When the storage-alteration-space control bit is set,
the exception should only be trigge... | [
1,
1
] |
FFmpeg | libavcodec/vorbis_enc.c | static void floor_fit(venc_context_t *venc, floor_t *fc, float *coeffs,
int *posts, int samples) {
int range = 255 / fc->multiplier + 1;
int i;
for (i = 0; i < fc->values; i++) {
int position = fc->list[fc->list[i].sort].x;
int begin = fc->list[fc->list[FFMAX(i - 1, 0)].sort].x;... | [
1,
0
] |
qemu | target-ppc/cpu.h | static hwaddr ppc_hash64_pte_raddr(ppc_slb_t *slb, ppc_hash_pte64_t pte,
target_ulong eaddr)
{
hwaddr mask;
int target_page_bits;
hwaddr rpn = pte.pte1 & HPTE64_R_RPN;
/*
* We support 4K, 64K and 16M now
*/
target_page_bits = ppc_hash64_page_shift(slb);
mas... | [
1,
0
] |
qemu | tests/io-channel-helpers.c | void qio_channel_test_validate(QIOChannelTest *test)
{
g_assert_cmpint(memcmp(test->input,
test->output,
test->len),
==, 0);
g_assert(test->readerr == NULL);
g_assert(test->writeerr == NULL);
g_free(test->inputv);
g_free(test->outputv... | [
1,
0
] |
qemu | target-s390x/kvm.c | static int handle_intercept(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
struct kvm_run *run = cs->kvm_run;
int icpt_code = run->s390_sieic.icptcode;
int r = 0;
DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code,
(long)cs->kvm_run->psw_addr);
switch (icpt_code) {
case ICPT_INSTRUCTION:
... | [
1,
0
] |
qemu | tests/test-cutils.c | static void test_qemu_strtol_full_max(void)
{
const char *str = g_strdup_printf("%ld", LONG_MAX);
long res;
int err;
err = qemu_strtol(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, LONG_MAX);
} | [
1,
0
] |
qemu | hw/ppc/spapr_cpu_core.c | char *spapr_get_cpu_core_type(const char *model)
{
char *core_type;
gchar **model_pieces = g_strsplit(model, ",", 2);
core_type = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);
g_strfreev(model_pieces);
/* Check whether it exists or whether we have to look up an alias name */
if (!ob... | [
1,
0
] |
FFmpeg | libavcodec/dxtory.c | static int dx2_decode_slice_420(GetBitContext *gb, AVFrame *frame,
int line, int left,
uint8_t lru[3][8])
{
int x, y;
int width = frame->width;
int ystride = frame->linesize[0];
int ustride = frame->linesize[1];
int vstride = frame->lines... | [
1,
0
] |
FFmpeg | libavcodec/h264.c | static void ff_h264_idct_add16intra_mmx2(uint8_t *dst, const int *block_offset,
DCTELEM *block, int stride,
const uint8_t nnzc[6 * 8]) {
int i;
for (i = 0; i < 16; i++) {
if (nnzc[scan8[i]])
ff_h264_idct_add_mmx(dst + blo... | [
1,
0
] |
qemu | HACKING | static void nvram_writel(void *opaque, target_phys_addr_t addr, uint32_t value)
{
M48t59State *NVRAM = opaque;
m48t59_write(NVRAM, addr, (value >> 24) & 0xff);
m48t59_write(NVRAM, addr + 1, (value >> 16) & 0xff);
m48t59_write(NVRAM, addr + 2, (value >> 8) & 0xff);
m48t59_write(NVRAM, addr + 3, value & 0... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.